| View previous topic :: View next topic |
| Author |
Message |
spongebob neophyte
Joined: 14 Apr 2005 Posts: 37 Location: CH
|
Posted: Sat Feb 03, 2007 3:40 pm Post subject: |
|
|
hey guys!
i'm also experiencing high cpu consumption on my 1.2ghz athlon with 512 mb ram, of which mld eats 1/2 currently after 54 days uptime.
however unlike some of you, i cannot see any wait state of the cpu, it's all eaten by user processes.
after reading this thread here, i tried disabling the bt plugin (without restart of mldonkey), but this did not change the fact, that mldonkey likes to use 99% of my cpu quite often (load average: 0.72, 0.66, 0.57).
before i try restarting, cleaning configs or anything, i'd like to ask what things i should do, to help your ongoing investigations.
i have lots of free time on my hands currently and am willing to try some stuff to resolve this problem! |
|
| Back to top |
|
 |
fabtar Sage

Joined: 04 Feb 2004 Posts: 1575 Location: Italy
|
Posted: Sat Feb 03, 2007 5:07 pm Post subject: |
|
|
Hi spongebob
I'm not a developer but I think you could try two things( I suggest to do these experients in this order):
IMHO
Experiment 1:
1) compile your core with profiling as mentioned above.Your situation is interesting cause it seems your CPU problme is always triggered.
Start your donkey for few days and post here your profile results.
Experiment 2:
2) Eliminate GeoIP database usage and restart mldonkey (eliminate webinfos about and your LOcal GeoIP.dat located in .mldonkey abysses).
After a resonable time: Is your mlnet performing better ? (yes/no/Don't know)
Experiment 3:
Mantain the same directory structure, same eshared files folder, simply start mldonkey anew with config files FROM SCRATCH..no files.ini.. nothing ...
The best thing is to do this with an empty download list (I have noted that recovering the old downloads from temp is sometimes long and hard and heavy for mlnet), so , I suggest to not recover your old /temp but to delete your pending downloads.
Prhaps you can obtain same effect by launching anew mldonkey using another user and simply using another temp directory but same shared and incoming folder.
Is the fresh mldonkey performing better (with new donwloads)?
I think this is useful to track problems related to corrupted ini files.
/IMHO |
|
| Back to top |
|
 |
spiralvoice Sage
Joined: 06 Jan 2003 Posts: 3982 Location: Germany
|
Posted: Mon Feb 05, 2007 10:27 pm Post subject: |
|
|
Selected IRC log from February 3th, 2007:
| Quote: | Feb 03 09:25:47 <Commandante_Che> when i start mlnet first, everything ist ok: i have high ids and the webinterface is fast.
Feb 03 09:26:54 <Commandante_Che> but after a cupple of hours he starts to get low ids and every 10-15min. the webinterface stucks for about 1-2 min.
Feb 03 09:27:17 <Commandante_Che> the running networks are: bittorrent and donkey
Feb 03 09:27:44 <Commandante_Che> is a xubuntu 6.10
Feb 03 09:28:20 <Commandante_Che> i compiled mldonkey-2.8.2 by myself
Feb 03 09:36:38 <Commandante_Che> also my files.ini is very big (5MB!) i have now 66 downloads, but i can remember that the files.ini used to be smaller. maybe a change since the last version?
Feb 03 09:37:12 <pango> started lots of BT downloads ? BT requires much more metadata than donkey...
Feb 03 09:38:09 <Commandante_Che> 32 bt-downloads
Feb 03 09:38:51 <pango> Personally, I think one shouldn't start more than 2 or 3 BT downloads at once
Feb 03 09:38:58 <Commandante_Che> oh
Feb 03 09:39:14 <pango> they compete for bandwidth, so I don't see the point of starting that many at once
Feb 03 09:39:21 <pango> (that said, I'm not a big BT user)
Feb 03 09:39:48 <pango> and they can be very taxing in both memory and cpu
Feb 03 09:40:49 <Commandante_Che> Real memory 757 MB total, 170 MB used
Feb 03 09:42:26 <pango> yes, and when mldonkey thinks the memory is too fragmented, it triggers a memory compaction, that makes the box swap like crazy... probably what you're observing every 15 minutes or so
Feb 03 09:42:55 <pango> btw, I think mldonkey badly untunes OCaml's gc
Feb 03 09:43:26 <Commandante_Che> untunes ocaml's gc?
Feb 03 09:43:55 <pango> yes, making it trying too much to recover memory, and compact it
Feb 03 09:45:04 <pango> I use space_overhead = 80 and compaction_overhead = 500, which should more closely match default OCaml's settings
Feb 03 09:52:37 <pango> Commandante_Che: it seems there's some inefficiencies in the way BT in-memory metadata are translated to .ini format, maybe that's the problem
Feb 03 09:53:25 <pango> Commandante_Che: in the english forum, fabtar posted some profiling infos pointing to CommonSwarming.intervals_to_string function, that should be involved in that (not sure yet)
Feb 03 09:54:14 <pango> well, I'm not sure what the problem really is, and how/if it can be fixed
Feb 03 09:54:31 <pango> in the meanwhile, not starting too many BT downloads at once should help
Feb 03 10:14:19 <pango> I think the official BT client gets around the problem by not saving runtime metadata, like intervals, at all; Instead, the whole file is rehashed if the client is stopped/restarted
Feb 03 10:19:37 <pango> but I'm not even sure yet this function is involved in saving, maybe it's in clients connecting/leaving |
Please follow pangos advices and report back about the results. _________________ Link overview and precompiled cores here: http://mldonkey.sourceforge.net/DownloadLinks |
|
| Back to top |
|
 |
spiralvoice Sage
Joined: 06 Jan 2003 Posts: 3982 Location: Germany
|
|
| Back to top |
|
 |
spiralvoice Sage
Joined: 06 Jan 2003 Posts: 3982 Location: Germany
|
Posted: Mon Feb 05, 2007 11:07 pm Post subject: |
|
|
compaction_overhead = 500 is too high here, after ~ 5 minutes
MLDonkey used 120MB RAM instead of the normal 50MB.
Then I set compaction_overhead = 200, RAM usage raises
to around 75MB, then a GC is running (up- /download stops
for a second) and it goes back to 50MB, which is ok.
Current DL speed 82 kb/s, UL 28 kb/s (reported by Sancho).
Machine has 256MB RAM, AMD K6 300 MHz.
Each GC leaves a small hole in the upload statistic:
Ini file saving does not produce any holes in the stats with ED2K-keep_sources = false. _________________ Link overview and precompiled cores here: http://mldonkey.sourceforge.net/DownloadLinks |
|
| Back to top |
|
 |
spongebob neophyte
Joined: 14 Apr 2005 Posts: 37 Location: CH
|
Posted: Tue Feb 06, 2007 1:36 pm Post subject: |
|
|
I had to restart my machine 2 days ago (kernel update). After the restart, the problem with the high CPU usage is gone. I did not remove any downloads or change ini files. Also the memory usage dropped from about 290 MB after 54 days uptime to initial 50 MB. Now after 2 days of operation and several completed downloads (also from BT), mldonkey currently uses 67 MB.
During these 2 day I've been checking the memory and CPU usage from time to time, and there were no abnormalities.
I have now set compaction_overhead to pango's proposed value of 500. Just out of curiosity
[update]
After some hours with the new compaction_overhead value, the memory usage is stable around 75 MB. The CPU usage has not increased. From the webgui statistics graph I can however not see clearly if there occur the same "holes" during GC - there is currently to much turbulence. I'll keep an eye on it. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © phpBB Group
|
|
|
|