aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: Limit RAM usage  (Read 3196 times)

mg

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 2
Limit RAM usage
« 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!
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: Limit RAM usage
« Reply #1 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.
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: Limit RAM usage
« Reply #2 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.
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

mg

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 2
Re: Limit RAM usage
« Reply #3 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
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: Limit RAM usage
« Reply #4 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.
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