aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Pages: 1 [2] 3

Author Topic: high cpu usage since rc4  (Read 13027 times)

phoenix

  • Evil respawning bird from aMule Dev Team
  • Developer
  • Hero Member
  • *****
  • Karma: 44
  • Offline Offline
  • Posts: 2503
  • The last shadow you'll ever see
Re: high cpu usage since rc4
« Reply #15 on: November 06, 2004, 09:23:45 PM »

My compilation line, this is for debug, it has performance issues. For performance, use the one GonoszTopi gave before:

$ ./configure --enable-debug --disable-optimise --enable-debug_flag --enable-debug_info --enable-debug_gdb --enable-gtk2 --disable-unicode --prefix=/usr/local/wxWidgets-cvs && make && sudo make install

Notice that with the prefix I gave, aMule will not normally find the wx libraries. That has the advantage that I can have a different version of wx installed on my system, an I can easily erase it with

$ rm -rf /usr/local/wxWidgets-cvs

So when compiling aMule, I have to:

$ ./autogen.sh && ./configure --enable-debug --disable-optimize --enable-verbose --enable-webserver --enable-webservergui --enable-amulecmd --enable-amulecmdgui --enable-ccache --enable-amule-daemon --with-wx-config=/usr/local/wxWidgets-cvs/bin/wx-config && make

Notice also that I do not make install aMule, that is because I have to test several versions at the same time. So, to run a particular version of aMule, you do:

$ LD_LIBRARY_PATH=/usr/local/wxWidgets-cvs/lib/ ~/youramuledir/src/amule &

This way, you can have several versions of wxWidgets and several versions of aMule, all in different directories, so you can test wich configuration suits you best. For example, I have:

Code: [Select]
$ ls -d /usr/local/wx*
/usr/local/wxAmulePatches  /usr/local/wxWidgets-2.5.2  /usr/local/wxWidgets-cvsu   /usr/local/wxWindows-2.5.1
/usr/local/wxBase-2.4.2    /usr/local/wxWidgets-cvs    /usr/local/wxWindows-2.4.2  /usr/local/wxWindows-2.5.1u

And a corresponding version of aMule for each wx configuration. If you use the default prefix, that is, /usr/local, you will not be able to have more than one wx in your system. Also, notice that you can install all wx with a prefix like ~/wx/wxWidgets-2.5.3, so you dont even have to be root to have a new version of wx working for you.
Logged

snicker

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 15
Re: high cpu usage since rc4
« Reply #16 on: November 08, 2004, 11:45:01 AM »

wow, thanks for all the response, you guys rock!

I recompiled using wxWidgets 2.5.3.
I first erased everything: amule (make uninstall?) and wxwidgets (using the how-to at the wiki)
Then compiled the 2.5.3 version (don't forget to get the patch to the eggtrayicon.h, otherwise it will not compile!). I used the flag '--enable-gtk2' this time.
Then, recompiled amule using:
$ ./autogen.sh
$ ./configure --enable-debug --enable-optimise --prefix=/usr --enable-verbose --disable-systray
$ make && make install

now aMule looks great (gtk2), BUT cpu usage is still around 35-40%!!! (and what is more: I noticed that as times goes, it raises, up to 87%!!!!)
how come!?!
I must be doing something terribly wrong...
I even tried without the '--enable-debug' and '--enable-verbose' flags, but nothing changed..

more info on what I'm using here:
145 .part files
300 connections allowed (in preferences).
143 shared files

I'm damned! there has to be another way...
Logged

stefanero

  • Some Support
  • Developer
  • Hero Member
  • *****
  • Karma: 8
  • Offline Offline
  • Posts: 4235
Re: high cpu usage since rc4
« Reply #17 on: November 08, 2004, 12:06:51 PM »

yup

gtk2 is still not really good suppored by wxGTK, thats why you have so high CPU usage and also it will eat up a lot of Memory.

compile wxGTk with gtk1 and be amazend by the huge difference in cpu and mem usage.

so its not really amule problem its wxGTK problem. and atm not much you can do about it. basically only hope that wxGTK will fix this gtk2 issue in next release.

greez
stefanero
Logged
In its default setup, Windows XP on the Internet amounts to a car
parked in a bad part of town, with the doors unlocked, the key in
the ignition and a Post-It note on the dashboard saying, "Please
don't steal this."

snicker

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 15
Re: high cpu usage since rc4
« Reply #18 on: November 08, 2004, 12:12:28 PM »

well, I'll try that, but the thing is, the cpu usage is very similar to what it was before (with gtk1)...
I'm still wondering... I'll go compile (again!!!) and get back here.
Logged

snicker

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 15
Re: high cpu usage since rc4
« Reply #19 on: November 08, 2004, 12:52:41 PM »

here I go again:
compiled wx WITHOUT gtk2 (and using phoenix's method):
$ ./configure --with-gtk --disable-gtk2 --prefix=/usr/wxWidgets-gtk1 --enable-unicode
then compiled amule:
$ ./autogen.sh
$ ./configure --enable-optimise --disable-systray -with-wx-config=/usr/wxWidgets-gtk1/bin/wx-config
$  make
then ran amule:
$ LD_LIBRARY_PATH=/usr/local/wxWidgets-gtk1/lib/ ~/MYamuledir/src/amule

and...: still using 30-50% cpu!!!
so... sorry, stefanero, but I think you were wrong.... (to my despair!)

By the way, I'm using amule-cvs for today (08/11/04).

I also noticed that cpu usage starts at ~6-11% when I start amule, then goes up as the connection to the server starts (to about 18%), then, it gets even higher when I start to download files (to ~25%) and finally to ~30% when uploads start. don't know if this helps...
Logged

stefanero

  • Some Support
  • Developer
  • Hero Member
  • *****
  • Karma: 8
  • Offline Offline
  • Posts: 4235
Re: high cpu usage since rc4
« Reply #20 on: November 08, 2004, 01:23:44 PM »

what cpu you have?
I have hear a amd 2000+ and runs with debug amule and debug wxWidgets around 15% with gtk1 and 5-10 downloads....
of course in the sources searching process and while downloads are really high cpu rises but not really that much here.

btw unicode and gtk1 dont work

stefanero
Logged
In its default setup, Windows XP on the Internet amounts to a car
parked in a bad part of town, with the doors unlocked, the key in
the ignition and a Post-It note on the dashboard saying, "Please
don't steal this."

snicker

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 15
Re: high cpu usage since rc4
« Reply #21 on: November 08, 2004, 01:43:03 PM »

I have an athlon XP 2400+ (real clock: 2Ghz)
as I said, I compiled without debugs and cpu usage is very high... maybe I'm constantly searching for sources, could that be it? I have 148 downloads, of which about 10 at the same time (meaning: are currently being downloaded) the others are in queue or something similar.

"btw unicode and gtk1 dont work" yep, I noticed.

thanks again for all the attention!
Logged

Jacobo221

  • Hero Member
  • *****
  • Karma: 3
  • Offline Offline
  • Posts: 2712
Re: high cpu usage since rc4
« Reply #22 on: November 08, 2004, 03:13:51 PM »

first, i believe a 2400+'s real clock is 1500MHz ;)

going into what the issue is:

Make sure you are using amule.org's rpms, not your distro's ones.
also linking wx 2.4.x against gtk2 could be the problem too

Greetings!
Logged

stefanero

  • Some Support
  • Developer
  • Hero Member
  • *****
  • Karma: 8
  • Offline Offline
  • Posts: 4235
Re: high cpu usage since rc4
« Reply #23 on: November 08, 2004, 03:33:06 PM »

Jacobo221:maybe you should not only read the last post sometimes ;)
Logged
In its default setup, Windows XP on the Internet amounts to a car
parked in a bad part of town, with the doors unlocked, the key in
the ignition and a Post-It note on the dashboard saying, "Please
don't steal this."

snicker

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 15
Re: high cpu usage since rc4
« Reply #24 on: November 08, 2004, 03:54:09 PM »

:D

btw, 2400 clock's is 2Ghz:
$ cat /proc/cpuinfo
processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 6
model           : 8
model name      : AMD Athlon(TM) XP 2400+
stepping        : 1
cpu MHz         : 2001.026
cache size      : 256 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse syscall mmxext 3dnowext 3dnow
bogomips        : 3964.92

but I don't think this matters....
Logged

stefanero

  • Some Support
  • Developer
  • Hero Member
  • *****
  • Karma: 8
  • Offline Offline
  • Posts: 4235
Re: high cpu usage since rc4
« Reply #25 on: November 08, 2004, 05:12:46 PM »

have you let it run for a while and look after the cpu usage after its done with finding sources!?!?
but with gtk1 ;) not gtk2
Logged
In its default setup, Windows XP on the Internet amounts to a car
parked in a bad part of town, with the doors unlocked, the key in
the ignition and a Post-It note on the dashboard saying, "Please
don't steal this."

snicker

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 15
Re: high cpu usage since rc4
« Reply #26 on: November 08, 2004, 07:53:46 PM »

yep.
it is active for 7 hours now and cpu usage is steady at 30%...
Logged

phoenix

  • Evil respawning bird from aMule Dev Team
  • Developer
  • Hero Member
  • *****
  • Karma: 44
  • Offline Offline
  • Posts: 2503
  • The last shadow you'll ever see
Re: high cpu usage since rc4
« Reply #27 on: November 08, 2004, 08:01:25 PM »

Quote
Originally posted by snicker
I also noticed that cpu usage starts at ~6-11% when I start amule, then goes up as the connection to the server starts (to about 18%), then, it gets even higher when I start to download files (to ~25%) and finally to ~30% when uploads start. don't know if this helps...

I can confirm that, I have a secondary slower machine and I get high cpu usage that grows in the long run. Don't know if this is related, but this is a lowid machine.

Cheers!
Logged

snicker

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 15
Re: high cpu usage since rc4
« Reply #28 on: November 09, 2004, 02:39:04 PM »

is this thread really dead.... I'm so sad... ;(
and my cpu is so tired...

no, really. what is the status here? should I give up? is this a bug? is there anything else I can do?
Logged

stefanero

  • Some Support
  • Developer
  • Hero Member
  • *****
  • Karma: 8
  • Offline Offline
  • Posts: 4235
Re: high cpu usage since rc4
« Reply #29 on: November 09, 2004, 02:47:39 PM »

I think not much you can do....

all of the things we use did not work for you...and like I said except usung 2.5.3 with gtk1 is not much you can do to save your cpu.
you can try CVS snapshot which has a lot of socket/sources work done from Kry which made CPU usage drop also a lot here.
give that a shoot and if that does not help I am out of answers here.
sorry pal

stefanero
Logged
In its default setup, Windows XP on the Internet amounts to a car
parked in a bad part of town, with the doors unlocked, the key in
the ignition and a Post-It note on the dashboard saying, "Please
don't steal this."
Pages: 1 [2] 3