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 [4]

Author Topic: memory usage  (Read 26081 times)

niels

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 3
Re: memory usage
« Reply #45 on: January 21, 2007, 04:42:32 AM »

Hi phoenix,

Quote
Originally posted by phoenix
Ezeltje,

aMule runs in my computer for days without noticeable increase in memory usage, and believe me, I do stress aMule. I stress it to the point that I have reached a limit of open files in my system, when aMule starts to download like 800 files, it starts to fail. My next task will be to test a patch from a user that claims to only open the files when they are needed, thus increasing that limit a lot. My memory consumption is always around 10-13%. I have 512 mega of ram. I share 1580 files.
Code: [Select]
aMule CVS rev. 6988 has been running for 4:18 h
xxxxxxxxxx is connnnected to xxxxxxxxxxxxxxxx [xxx.xxx.xxx.xxx:xxxx] with HighID | Kad: ok
Total Download: 948.26 Gb, Upload: 345.63 Gb
Session Download: 491.68 Mb, Upload: 328.31 Mb
Download: 58.0 kB/s, Upload: 23.7 kB/s
Sharing: 1580 file(s), Clients on queue: 5000
$ ps u -C amule
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
xxxxxx   31592 21.4 10.0 263472 103576 pts/3   Dl+  Dec08  55:30 /home/xxxxxx/amule --even-if-lfroen-complains-this-will-
Maybe your leak is somewhere else, maybe in wxGTK or gtk itself. I have heard that there could be a problem between two certain versions of wxGTK and gtk.

Can you tell me which configure options did you use for wxGTK and aMule CVS? Have you compiled GTK too?

Thank you
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: memory usage
« Reply #46 on: January 22, 2007, 10:05:13 PM »

Quote
Originally posted by niels
Hi phoenix,
Can you tell me which configure options did you use for wxGTK and aMule CVS? Have you compiled GTK too?

Thank you
Sure, but please notice that I am not the usual user. I always use debug flags, and I have more than one wxWidget version installed in my system. If you have any doubts, please ask.

I have not compiled gtk.

For wxGTK I do:

$ ./configure --enable-debug --disable-optimise --enable-debug_flag --enable-debug_info --enable-debug_gdb --with-opengl --enable-gtk2 --enable-unicode --enable-largefile --prefix=/home/myuser/usr/local/wxWidgets-2.8.0 && make && sudo make install

For aMule I will correspondingly do (notice the --prefix parameter above):

$ ./autogen.sh && ./configure --with-denoise-level=3 --enable-debug --disable-optimize --enable-verbose --enable-webserver --enable-webservergui --enable-amulecmd --enable-amulecmdgui --enable-ccache --enable-amule-daemon --with-wx-config=/home/myuser/usr/local/wxWidgets-2.8.0/bin/wx-config --enable-cas --enable-amule-gui && LD_LIBRARY_PATH=/home/myuser/usr/local/wxWidgets-2.8.0/lib/ make

If you want, you can add a --prefix to the amule compilation line too. Notice also that I do not mess with the system directories, I always install stuff in my own home directory, unless I use a system package like rpm or deb. I don't eve run make install on aMule, I run it from the command line in the directory it has been compiled like this (trunk, in this case):

$ LD_LIBRARY_PATH=/home/myuser/usr/local/wxWidgets-2.8.0/ LANG=en_US.UTF-8 trunk/src/amule --even-if-lfroen-complains-this-will-stay

As you can see, this can be simplified a lot. You probably do not need to build all the stuff like I do. Also, if you install wxGTK in a directory listed in ld.so.conf, you dont need the LD_LIBRARY_PATH stuff. Also, if your LANG is set, you dont need it too.

Good luck!
Logged

niels

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 3
Re: memory usage
« Reply #47 on: January 27, 2007, 11:52:31 PM »

Thank you phoenix.

I'll test the aMule compiled with your instructions for a few days.
I have the same memory leak than Ezeltje, but i installed the aMule rpm for openSuse 10.2 from http://gw78.ja-nee.de/suse/10.2/

I don't know if the configure options will fix the problem.

I'll post the results.

Thanks again.
Logged

Ezeltje

  • Full Member
  • ***
  • Karma: 1
  • Offline Offline
  • Posts: 130
    • Home page
Re: memory usage
« Reply #48 on: January 28, 2007, 12:04:27 AM »

Niels,

I will be very interested in hearing about your experiences.

One thing: have you also compiled wxGTK? If so, can you run vlc to see whether it works under your configuration? It is the only other wx-based program I use, and it would be really inconvenient if a custom wx install nuked it.

TIA
Logged

niels

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 3
VLC and compiled wxGTK
« Reply #49 on: January 28, 2007, 01:12:34 PM »

Hi Ezeltje,

      If you have problem with vlc and two versions of wxGTK, one installed in your home directory and another installed in the system directories, you can do one thing:

      Instead use the path of vlc (for example: /usr/bin/vlc) in aMule -> Preferences -> Directories -> Video Player, use the path to a script (for example: /home/myuser/bin/startvlc.sh) with this code:

Code: [Select]
#/bin/bash

declare +x LD_LIBRARY_PATH

/usr/bin/vlc "$1"

   Remember make it executable: chmod u+x /home/myuser/bin/startvlc.sh

   This script "delete" the LD_LIBRARY_PATH variable that was set in the command line to launch amule:  
LD_LIBRARY_PATH=/home/myuser/usr/local/lib/ LANG=en_US.UTF-8 ./amule --even-if-lfroen-complains-this-will-stay.

   VLC will find the libraries that are installed in the system and not in your home directory

   I hope this will be useful for you.
Logged

Ezeltje

  • Full Member
  • ***
  • Karma: 1
  • Offline Offline
  • Posts: 130
    • Home page
Re: memory usage
« Reply #50 on: November 26, 2007, 09:54:03 PM »

Hi all,

I was hoping this memleak bug was fixed in wxGTK v2.8 (if indeed it is there and not amule monolithic) but I just got it by it again after an uptime of 24 hours. Here is the top output I managed to capture before killing amule:

Code: [Select]
20:05:55 up 1 day, 27 min,  6 users,  load average: 22.20, 29.16, 32.42
Tasks: 209 total,  14 running, 195 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.2%us, 99.1%sy,  0.0%ni,  0.0%id,  0.1%wa,  0.1%hi,  0.6%si,  0.0%st
Mem:   2074936k total,  2025640k used,    49296k free,      796k buffers
Swap:  1020116k total,  1020116k used,        0k free,     4948k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 3743 xxxxx     20   0 2493m 1.8g  440 R   17 89.6 216:59.54 amule
 0164 xxxxx     20   0  200m 1080  444 S   10  0.1  63:20.15 audacious
  221 root      15  -5     0    0    0 D   12  0.0  10:06.68 kswapd0
 5317 xxxxx     20   0  110m 5676  996 D    7  0.3  40:17.46 k3b                                                                                       
 3291 root      20   0  110m  35m  232 R    6  1.7  73:50.54 X
10164 xxxxx     20   0  200m 1124  488 S   10  0.1  63:22.28 audacious
 3648 xxxxx     20   0 56948 1528  400 D    6  0.1   4:00.23 gnome-netstatus

Here, FWIW, is the cas output:

Code: [Select]
aMule CVS Fri Nov  9 07:01:54 CET 2007 has been running for 23:03 h
xxxxx is connected to ### xxxxxx ### [xxx.xxx.xxx.xxx] with HighID | Kad: ok
Total Download: 2.08 TB, Upload: 3.90 TB
Session Download: 1.99 GB, Upload: 1.10 GB
Download: 37.4 kB/s, Upload: 21.2 kB/s
Sharing: 853 file(s), Clients on queue: 925
Time: Nov 26 2007, 20:23

As I have indicated before, this bug does not occur with amuled.

Code: [Select]
$ rpm -qa | grep wx
wxGTK-2.8.4-6.fc8
wxGTK-devel-2.8.4-6.fc8
wxGTK-gl-2.8.4-6.fc8
compat-wxGTK26-2.6.3-8

$ uname -r
2.6.23.1-49.fc8[code]
[/code]
Logged

Ezeltje

  • Full Member
  • ***
  • Karma: 1
  • Offline Offline
  • Posts: 130
    • Home page
Re: memory usage
« Reply #51 on: March 27, 2010, 09:40:27 PM »

Wow, this mem leak is still in the code; it bit me in the ass again this evening:

Code: [Select]
top - 21:27:23 up 16 days,  8:05, 11 users,  load average: 31.47, 33.96, 37.49
Tasks: 341 total,   2 running, 338 sleeping,   0 stopped,   1 zombie
Cpu(s):  0.2%us,  0.9%sy,  0.0%ni, 19.8%id, 79.0%wa,  0.0%hi,  0.1%si,  0.0%st
Mem:   3355684k total,  3265356k used,    90328k free,     1856k buffers
Swap:  2048248k total,  2048248k used,        0k free,    13428k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND           
 5621 xxxx     20   0 2728m 2.2g  552 D  0.0 67.6   1675:46 amule             
 5459 xxxx     20   0  678m 129m  144 S  0.0  3.9 433:35.64 java               
18557 xxxx     20   0  713m  65m  412 S  0.0  2.0  47:15.33 thunderbird-bin   
20162 xxxx     20   0  624m  56m 1204 D  0.6  1.7  32:25.90 chrome             
28988 xxxx     20   0  524m  43m  260 S  0.0  1.3  46:33.79 acroread           
 2291 root     20   0  241m  37m  632 D  0.0  1.1 528:52.23 Xorg               
15502 xxxx     20   0  146m  33m  264 S  0.0  1.0   0:12.53 chrome 
...
As you can see, when I finally killed it, amule was using 67% of the 4G RAM.

Code: [Select]
$ rpm -qa | egrep "(amule|wx)" | sort
amule-2.2.6-1.fc12.i686
amule-nogui-2.2.6-1.fc12.i686
wxBase-2.8.10-7.fc12.i686
wxGTK-2.8.10-7.fc12.i686
wxGTK-devel-2.8.10-7.fc12.i686
wxGTK-gl-2.8.10-7.fc12.i686
wxGTK-media-2.8.10-7.fc12.i686
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: memory usage
« Reply #52 on: March 27, 2010, 10:05:24 PM »

How fast is your upload speed?
If it's very fast (LAN speed) try the SVN version. There is a fix for such a memleak problem in it.
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon
Pages: 1 2 3 [4]