aMule Forum
English => aMule Help => Topic started by: snicker on November 03, 2004, 11:53:46 PM
-
Hi folks,
I've been using aMule for a while now. But there is one thing that bugs me a lot: since I started using it, cpu usage is at about 30-60%, which is completely incomprehensible for me. actually it is almost unacceptable. sometimes I can't even use my computer, because all the resources are being drained.
Maybe it is my fault and I'm doing something wrong...
... can you give me tips about how to mend this problem ?
Perhaps some preferences I can change?
Or is it because I have too many downloads at the time?
I don't know... I thought rc6-7 would have this solved, but all stayed the same...
By the way: this is not a hashing problem, cpu usage is constantly up...
I'm running Debian usntable on an AMD 2400 (2Ghz clock: 700 just for aMule!!).
Thanks a lot in advance!!!
-
Are you on wxWidgets 2.4 ?
-
how do I find that out???
I just did an 'apt-get install amule' on debian unstable....
-
ls -l /usr/bin/wx*
ls -l /usr/local/bin/wx*
-
$ ls -l /usr/bin/wx*
-rwxr-xr-x 1 root root 342440 2004-10-19 19:29 /usr/bin/wxcas
lrwxrwxrwx 1 root root 3 2004-10-26 13:58 /usr/bin/wxvlc -> vlc
$ ls -l /usr/local/bin/wx*
ls: /usr/local/bin/wx*: not found
guess I have... right? so, now what?
-
uh... you didn't compile it, didn't you? you installed from rom maybe?
If so, use wx rpms here at amule.org The wx rpms provided by distros a BROKEN (and they know, but they don't mind fixing them) and take HUGE amounts of CPU and frequent crashes.
Greetings!
-
no I didn't compile. I installed the '.deb' from debian repositories.
so what should I do:
- compile myself [in this case: with or without wx? how would I do that (I mean, enable or disable wx)?]
- get an rpm and install even though I'm in Debian (don't even know how to do that! or if is is 'legal'...)
by the way, thanks to all the help you've been giving me!
oh, another thing:
"The wx rpms provided by distros a BROKEN (and they know, but they don't mind fixing them) "
is this really true for debian packages??? is there a way to verify that? who is responsible for that!?
it doesn't seem like a good practice...
-
The best way is to download wxWidgets-2.5.3 from http://wxwidgets.org and compile/install it yourself. (Note: do not compile with unicode if you plan to use the webserver, it's now broken for unicode builds).
After this is finished, download amule (CVS, or rc7 if you really don't like CVS) source and compile it for yourself. (use configure with --disable-optimize --enable-debug ...etc what you like -- configure --help gives a full list of switches)
This should fix your problem, my aMule here uses about 6-9% of CPU
-
ok, so I downloaded:
-wxGTK-2.4.2 (here: http://download.berlios.de/amule/wxGTK-2.4.2.tar.gz)
-wxBase-2.4.2 (here: http://download.berlios.de/amule/wxBase-2.4.2.tar.gz)
then, did a:
$ apt-get install libgtk1.2-dev libcurl2-dev
(required to install sources in debian)
installed the wx (see http://www.amule.org/wiki/index.php/HowTo_Compile_In_Debian), everything went ok.
got aMule from CVS:
$ cvs -d:pserver:anonymous@cvs.amule.berlios.de:/cvsroot/amule login
(press enter when prompted for password, took me a while to figure that one out!!)
$ cvs -z3 -d:pserver:anonymous@cvs.amule.berlios.de:/cvsroot/amule co amule-cvs
then I:
$ ./autogen.sh
and then:
$ ./configure --enable-debug --enable-optimise --prefix=/usr
and, finally:
$ make
and I got:
gcc -Wall -g -ggdb -fno-inline -D__DEBUG__ -g -O2 -o cas cas.o -L/usr/lib -lcurl -lssl -lcrypto -ldl -lssl -lcrypto -ldl -lz -lcryptopp
/usr/bin/ld: cannot find -lcryptopp
collect2: ld returned 1 exit status
make[2]: ** [cas] Erro 1
make[2]: Leaving directory `/home/rhwinter/compactados/aMule/amule-cvs/src'
make[1]: ** [all-recursive] Erro 1
make[1]: Leaving directory `/home/rhwinter/compactados/aMule/amule-cvs'
make: ** [all] Erro 2
which made me realise this is not the correct CVS.... wonder where it is at...
got a tarball here:
http://amule.hirnriss.net/
(today's version! 05/11/04)
$ tar -xjvf aMule.(etc).tar.bz2
$ ./configure --enable-debug --enable-optimise --prefix=/usr
$ make && make install
(make gave me A LOT of warnings, guess that is normal...)
and now, cpu usage is the same !!! :(
I even tried with the "disable-optimise" flag you mentioned, but all stayed the same...
well... maybe it did go down a bit, but still ~30-40% is too much, isn't it?!?
GonoszTopi, how many downloads do you have?
is that what influences, maybe?
-
and oh.... searching is not working on the cvs version...
(at least I hope that is the problem, if it is wx instead, then I'll just go and kill myself right away)
so, back to:
$ apt-get remove amule
$ apt-get install amule
-
Install wxWidgets 2.5.3 instead of 2.4.2. There are many chenges in wx since 2.4.2, and a lot regarding performance.
(The only thing known to not work is the webserver, but only with gtk2 and unicode enabled build)
You will also have to recompile amule !
Note: before starting, remove ALL wxWidgets installations and previous aMule versions (this may save you some desperate hours) :)
btw, currently I have ~140 partfiles, ~500 clients to download from, 642 clients in the upload queue, and 21 shared files - CPU musage is 10.1% atm)
-
ok. I downloaded wxWidgets from the wxwidgets.org
but now I don't know what I should do to install it.
in the 'from scratch' installation guide at amule's wiki the files are different.
I downloaded wxAll-2.5.3.tar.bz2 (http://prdownloads.sourceforge.net/wxwindows/wxAll-2.5.3.tar.bz2)
which means I don't have those 'base' and 'GTK' packages they mention at the wiki...
how do I install this new version, I see a INSTALL-X11.txt on the extracted dir, should I follow that?
"this may save you some desperate hours"
why ?
-
To install wxWidgets:
$ ./configure --with-gtk --disable-gtk2
or
$ ./configure --with-gtk --enable-gtk2
or
$ ./configure --with-gtk --enable-gtk2 --enable-unicode
then
$ make
and as root do
$ make install
$ ldconfig
Then recompile aMule, and enjoy 8)
"this may save you some desperate hours" - because if you accidentally miss one step, aMule may configure itself to one version, and link to the other - this has happened to me once :( was real fun to find out why it doesn't do what I'd like to.
Have fun!
-
dont forget the prefix=/usr/
since amule will look in /usr/ not /usr/local/
-
For me it's installed into /usr/local/, and works fine.
-
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:
$ 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.
-
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...
-
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
-
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.
-
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...
-
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
-
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!
-
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!
-
Jacobo221:maybe you should not only read the last post sometimes ;)
-
: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....
-
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
-
yep.
it is active for 7 hours now and cpu usage is steady at 30%...
-
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!
-
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?
-
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
-
Well, after doing some research (on my distro), I have found that there is an issue with wxGTK-2.5.3 with opengl support. So, you might want to recompile wxGTK-2.5.3 without opengl support.
I had the same CPU issue but because I had 2.5.3 installed with opengl support. I'm now downgrading to 2.4.2 and recompiling amule. I"m going to try compiling with and withou gtk2 support to see how it works for myself.
[edit]
I ended up compiling amule without gtk2 support. I'll wait until wxGTK-2.5.3 has it glitches worked out. My CPU usage dropped and remains consistant.
-
Hi, i know the thread is old, but the Preblem is still the same, s i guess its better to use this thread.
I have AMD XP2000 (funny, no intel-users around) and my CPU-usage is around 30-40% with 15 downloads, and it wont get lower after searching all sources. I have wxGTK 2.5.
How much cpu-usage would i get, if i compile without GTK2? Any other news about this problem?
Edit:
Argh: Should have tried this earlier, disabled GTK, and now i get around 5% CPU-Usage. Great, at least i can keep running amule while using the computer.
Edit2: Damn it, i posted too fast, after connecting to a server cpu-usage gor back to 30%... So it seems that its not a gui-Problem, but something in the networkcode. Is everyone experiencing such a high cpu-usage, or does it only happen on "some" systems? I already switched to 200 connections, didnt help much.