Ticket #1963 (closed defect: fixed)

Opened 3 years ago

Last modified 4 months ago

WCPU footprint is large.

Reported by: anonymous Owned by: asterix
Priority: highest Milestone: 0.12
Component: None Version: 0.11.1
Severity: major Keywords: cpu, freebsd
Cc: OS: Unix

Description

The CPU footprint of Gajim is rather large on FreeBSD. Would it be possible to reduce it?

FreeBSD hovel.york.ac.uk 6.0-STABLE FreeBSD 6.0-STABLE #5: Wed Apr 19 08:47:44 BST 2006 root@…:/usr/obj/usr/src/sys/GENERIC i386

last pid: 27796; load averages: 0.84, 0.90, 0.76 up 27+00:33:09 09:36:26 85 processes: 6 running, 78 sleeping, 1 zombie CPU states: 91.0% user, 0.0% nice, 8.6% system, 0.4% interrupt, 0.0% idle Mem: 209M Active, 171M Inact, 93M Wired, 16M Cache, 60M Buf, 4160K Free Swap: 512M Total, 49M Used, 463M Free, 9% Inuse

PID USERNAME THR PRI NICE SIZE RES STATE TIME WCPU COMMAND

27781 yann 1 123 0 35840K 29320K RUN 1:11 88.58% python 17422 yann 1 97 0 111M 87524K RUN 199:07 2.20% Xorg

Attachments

gajim_profile.txt (141.4 kB) - added by antemil 15 months ago.
Without the patch
gajim_profile_56.txt (140.9 kB) - added by antemil 15 months ago.
With the 56 patch

Change History

  Changed 3 years ago by dkirov

Yes, I just e-mailed the maintainer. This bug is already fixed in svn and

he have to apply the patch. http://trac.gajim.org/changeset/6314?format=diff

  Changed 3 years ago by asterix

  • status changed from new to closed
  • resolution set to fixed
  • milestone set to 0.11

  Changed 16 months ago by antemil

  • keywords cpu, freebsd added
  • resolution fixed deleted
  • status changed from closed to reopened
  • os set to Unix
  • version changed from 0.10 to 0.11.1

Although this was fixed, I realize this is happening again.

The Gajim About dialog: Gajim 0.11.1 A GTK+ jabber client GTK+ Version: 2.10.14 PyGTK Version: 2.10.6

antemil@caleac:~$ uname -a FreeBSD caleac 6.2-STABLE FreeBSD 6.2-STABLE #1: Wed May 9 20:05:13 CEST 2007 root@…:/usr/src/sys/amd64/compile/MYKERNEL amd64

antemil@caleac:~$ top last pid: 10360; load averages: 3.04, 1.97, 1.84 up 0+03:27:30 12:11:37 83 processes: 5 running, 78 sleeping CPU states: 81.2% user, 0.0% nice, 18.4% system, 0.4% interrupt, 0.0% idle Mem: 324M Active, 295M Inact, 110M Wired, 5916K Cache, 111M Buf, 204M Free Swap: 1024M Total, 1024M Free

PID USERNAME THR PRI NICE SIZE RES STATE TIME WCPU COMMAND

10325 antemil 1 132 0 152M 67332K RUN 2:33 94.20% python2.4

X Window System Version 7.2.0 Release Date: 22 January 2007 X Protocol Version 11, Revision 0, Release 7.2 Build Operating System: FreeBSD 6.2-STABLE amd64

The provided old patch is just the actual code now. I tried python2.5 too (in fact, I get back to 2.4 trying to avoid this behaviour). Any suggestion about how to know which part of gajim is really eating the CPU?

  Changed 15 months ago by anonymous

  • milestone changed from 0.11 to 0.12

follow-up: ↓ 6   Changed 15 months ago by asterix

could you try to add 56 to the list in src/common/proxy65_manager.py line 256:

if errnum in (errno.EINPROGRESS, errno.EALREADY, errno.EWOULDBLOCK, 56):

does that help ?

see #3396 and [8572]

in reply to: ↑ 5   Changed 15 months ago by antemil

  • status changed from reopened to closed
  • resolution set to fixed

Replying to asterix:

could you try to add 56 to the list in src/common/proxy65_manager.py line 256: {{{ if errnum in (errno.EINPROGRESS, errno.EALREADY, errno.EWOULDBLOCK, 56): }}} does that help ? see #3396 and [8572]

Using Gajim 0.11.1.0 with that modification solves the problem:

last pid: 76040; load averages: 1.28, 1.68, 1.60 up 0+20:42:38 16:36:06 93 processes: 2 running, 90 sleeping, 1 zombie CPU states: 1.5% user, 95.9% nice, 1.1% system, 1.5% interrupt, 0.0% idle Mem: 352M Active, 368M Inact, 125M Wired, 40M Cache, 111M Buf, 1736K Free Swap: 1024M Total, 72K Used, 1024M Free

PID USERNAME THR PRI NICE SIZE RES STATE TIME WCPU COMMAND

70931 boinc 2 171 52 78660K 70172K RUN 9:48 89.11% setiathome-5. 57634 antemil 1 96 0 336M 73920K select 1:41 2.83% Xorg 70892 antemil 1 96 0 90448K 50300K select 2:40 0.88% firefox-bin 76024 antemil 1 4 0 199M 68392K kqread 0:05 0.49% python2.5

Thanks!

  Changed 15 months ago by asterix

(In [8585]) fixes large WCPU footprint under freebsd. fixes #1963

  Changed 15 months ago by roidelapluie

(In [8587]) fixes large WCPU footprint under freebsd. fixes #1963 for 0.11.2.

  Changed 15 months ago by roidelapluie

  • milestone changed from 0.12 to 0.11.2

  Changed 15 months ago by anonymous

  • status changed from closed to reopened
  • resolution fixed deleted

  Changed 15 months ago by f@…

This is a bad idea, under freebsd, 56 is EISCONN, so you probably do not want to retry. With this patch my gajim just hangs, resolving one proxy over and over.

  Changed 15 months ago by asterix

ok so EISCONN was handled in the next if. do you see large WCPU footprint if you simply reverse this patch ?

  Changed 15 months ago by f@…

No, nor have I seen it before the patch was applied.

Changed 15 months ago by antemil

Without the patch

Changed 15 months ago by antemil

With the 56 patch

  Changed 15 months ago by antemil

I generated two profile logs using Gajim 0.11.1.0, the first without the patch, and the second with the 56 at line 256. Without the patch, WCPU tends to 100% while with the patch, WCPU tends to 0%

I hope this files to be someway useful. I ordered them using internal time, and generated it with the following command line:

....gajim/src $ python -m cProfile -s 'time' ./gajim.py

  Changed 15 months ago by asterix

  • milestone changed from 0.11.2 to 0.12

I reverted last commit for 0.11.2 as it makes Gajim hangs. We'll see if a better solution is found

  Changed 13 months ago by asterix

I don't understand why behaviour is diferent under BSD. Gajim doesn't use 100% CPU under linux ...

  Changed 11 months ago by asterix

  • status changed from reopened to closed
  • resolution set to fixed

I don't have a BSD installed, so I can't test, but I don't see why behaviour under BSD would be different...

  Changed 4 months ago by anonymous

I use FreeBSD (7.0) too and I still have the same problem.

Now I disabled the function "do_connect" (return at first line) and it works fine.

What is the task of this function ?

Add/Change #1963 (WCPU footprint is large.)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.