Sabnzbd on Linux Ubuntu never use more than 500Mo RAM

Report & discuss bugs found in SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
kwy
Newbie
Newbie
Posts: 10
Joined: March 5th, 2012, 1:56 pm

Sabnzbd on Linux Ubuntu never use more than 500Mo RAM

Post by kwy »

Everything is in title.

I have sabnzbd running on Ubuntu server (headless server) and I noticed that the amount of used RAM never excess 500Mo. I tried to add 1Gig and 2Gigs of RAM but the maximum use is still 500Mo...
Metrics collection were done over 2 months.

DLed files weight from some megs to some dozen of gigs.

Any tips to maximize the use of the available memory ?
User avatar
sander
Release Testers
Release Testers
Posts: 9062
Joined: January 22nd, 2008, 2:22 pm

Re: Sabnzbd on Linux Ubuntu never use more than 500Mo RAM

Post by sander »

Normally the question is the opposite: "why is SAB using so much memory?". ;-)

Anyway: why do you want SAB to use more memory?
kwy
Newbie
Newbie
Posts: 10
Joined: March 5th, 2012, 1:56 pm

Re: Sabnzbd on Linux Ubuntu never use more than 500Mo RAM

Post by kwy »

As memory is more efficient than the disks I wondered that adding more RAM will help sabnzbd to be also more efficient.

Well I often notice huge delays in the GUI (and some errors apears in the logs) when I try to pause sab after a long time or when downloading big files (>10gigs), the files is not damaged at all so I did worry about it.

Adding some CPU slots helps but does not make a big difference for the issue I just described.
User avatar
sander
Release Testers
Release Testers
Posts: 9062
Joined: January 22nd, 2008, 2:22 pm

Re: Sabnzbd on Linux Ubuntu never use more than 500Mo RAM

Post by sander »

Here's the memory usage of my SABnzbd:

Code: Select all

sander@R540:~$ top -bn1 | grep -e VIRT -e SABnzbd
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                                  
 4904 sander    20   0  628m 121m 4428 S    0  3.2  28:32.24 SABnzbd.py                                                                               
sander@R540:~$ 

sander@R540:~$ free -bm
             total       used       free     shared    buffers     cached
Mem:          3760       3628        132          0         35        635
-/+ buffers/cache:       2957        803
Swap:         4766        609       4157
sander@R540:~$
User avatar
sander
Release Testers
Release Testers
Posts: 9062
Joined: January 22nd, 2008, 2:22 pm

Re: Sabnzbd on Linux Ubuntu never use more than 500Mo RAM

Post by sander »

What CPU do you use?

And: there is some setting in SABnzbd to specify RAM usage, but I can't find it and I have never used it myself.
kwy
Newbie
Newbie
Posts: 10
Joined: March 5th, 2012, 1:56 pm

Re: Sabnzbd on Linux Ubuntu never use more than 500Mo RAM

Post by kwy »

Usage when sab is idle

Code: Select all

ps auwx |grep sab
user       1119  3.1  [b]6.4[/b] 268780 65816 ?        Sl   Mar22  42:50 /usr/bin/python -OO /usr/bin/sabnzbdplus --daemon --server X.X.X.X
%MEM in bold
So used physical memory by sab is 6.4% on 1024MB => ~65MB

Code: Select all

free -m
             total       used       free     shared    buffers     cached
Mem:          1001        831        170          0        105        572
-/+ buffers/cache:        153        847
Swap:          387          0        387
Used include cached memory so it is inacurate.
Really used memory is 831-572 = 259Megs

Here are some graphes:
Last hour memory usage
Image
Last week memory usage
Image
Last month memory usage
Image

CPU:

Code: Select all

cat /proc/cpuinfo
model name      : Intel(R) Xeon(R) CPU           E5520  @ 2.27GHz
User avatar
sander
Release Testers
Release Testers
Posts: 9062
Joined: January 22nd, 2008, 2:22 pm

Re: Sabnzbd on Linux Ubuntu never use more than 500Mo RAM

Post by sander »

That "ps auwx" shows my SABnzbd is using 1.0% of my 4GB, so 40 MB.

Question: is ps auwx a better method than htop (which 514 MB virutal memory usage)? In other words: does the output of ps auwx add up to the memory used (as seen by free -m)?

Back to your real question: the web interface is slow, right? You don't run X, do you? What does "uptime" show? Are the three numbers on the right above 1.00?

Code: Select all

sander@R540:~$ ps auwx |grep -i sabnzbd
sander   15782  0.1  1.0 526968 41116 pts/2    Sl+  Mar23   0:46 /usr/bin/python -OO ./SABnzbd.py
sander   20011  0.0  0.0  12964   912 pts/3    S+   08:15   0:00 grep --color=auto -i sabnzbd

sander@R540:~$ top -bn1 | grep -e VIRT -e SABnzbd
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                                  
15782 sander    20   0  514m  40m 3248 S    0  1.1   0:46.69 SABnzbd.py                                                                               
sander@R540:~$
kwy
Newbie
Newbie
Posts: 10
Joined: March 5th, 2012, 1:56 pm

Re: Sabnzbd on Linux Ubuntu never use more than 500Mo RAM

Post by kwy »

Everything seems fine with the load (sorry I am too lazy to export the load graphes this time). The 2 allocated vCPU's are doing their job fine, sometimes for a short period of time load is 2 (100% of each CPU) but I noticed that this occurs only when rar is working. I also take care to check that my issue does not come from other processing like rar or post-proc used on the system. The issue (slow/unresponsive gui) mainly occurs when downloading big files.

NB: Adding a second CPU only helped to extract rar and par2 checks, adding more than 2 CPU did not make a significant difference. Most of the time even download the CPU's are almost idling.

Regarding your question vmem is just reserved but not allocated pointers.

2 questions:
- Well now I think that some IO bottleneck can be the reason so I will monitor the IO's but any hints on memory usage tuning are welcome.
- Did you try running sab inside a pypy environment ?
Post Reply