aMule Forum

English => aMule Help => Topic started by: mg on January 30, 2011, 12:05:03 PM

Title: Limit RAM usage
Post by: mg on January 30, 2011, 12:05:03 PM
Hello everybody! I'm trying to run aMule on a Seagate Dockstar, a little embedded platform with a 1.2GHz CPU and 128MB of RAM. The machine is running Debian Squeeze, and I installed aMule from the repository with apt-get.
As this machine doesn't have a screen, I'm running only amuled and amuleweb.
The problem is that after a few hours, the system gets crippled and I can't even SSH in (the connection is accepted, but the login prompt is never shown). So I set up a cron job to write the output of  "top" to a file every minute, and I see that amuled is sucking a ton of ram:

Code: [Select]
top - 11:41:57 up 22:59,  1 user,  load average: 9.07, 8.46, 7.54
Tasks:  59 total,   1 running,  56 sleeping,   0 stopped,   2 zombie
Cpu(s):  5.1%us,  1.8%sy,  0.0%ni, 60.0%id, 33.0%wa,  0.0%hi,  0.1%si,  0.0%st
Mem:    125732k total,   123044k used,     2688k free,      196k buffers
Swap:   262136k total,   128892k used,   133244k free,    10136k cached

PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND               
...
 1093 root      20   0  196m  73m 2000 S  1.9 59.6  46:24.44 amuled
...
 1096 root      20   0 11960  544  448 S  0.0  0.4   3:59.62 amuleweb         

As you can see, amule is sucking 196MB of ram out of 128MB, so it's using a ton of swap and the swap is in a slow SD card so it's not helping a lot. I know that I shouldn't run it as root, but I'm still trying to solve an issue (http://forum.doozan.com/read.php?2,3561) and I will switch to a normal user as soon as I fix it.

Does anyone have any suggestion to help me solve my problems? Any help is greatly appreciated.
Thank you!
Title: Re: Limit RAM usage
Post by: Kry on January 30, 2011, 12:38:42 PM
You probably want to recompile aMule with the --enable-mmap option, which is specifically there for embedded systems.
Title: Re: Limit RAM usage
Post by: Stu Redman on January 30, 2011, 03:06:37 PM
You probably want to recompile aMule with the --enable-mmap option, which is specifically there for embedded systems.
You have to use the SVN version for this, mind.

You can also try to disable Kad.
Title: Re: Limit RAM usage
Post by: mg on February 06, 2011, 01:57:43 PM
Thank you all guys!! Now on to learn how to compile for this platform... But I still have a doubt; the package I installed should already have been compiled for my platform, so why didn't they compile it with the --enable-mmap option already? Is there a way to know if this is the case? I'll try disabling KAD first, while I figure out how to recompile.
Thanks a lot again!!
Have a nice day  ;D
Title: Re: Limit RAM usage
Post by: Stu Redman on February 06, 2011, 08:26:20 PM
If it's 2.2.6 - the option doesn't exist there. Only in the SVN version.