Page 1 of 1

High CPU Usage and Multiple Instances

Posted: November 16th, 2008, 10:40 pm
by kryptonyte
First of all I want to thank the developers for making such a great newsreader, I've been using SABnzbd+ for a few months now on Windows machines and have not had a single problem until now.

I recently purchased a Asus WL-500W after finding it had two USB ports and plenty of ROM and RAM.  So I figured with Linux pretty much running on it why not try to run SABnzbd+ off of it.  I started with DD-WRT Standard + USB and began to add support for USB drives.  Once I got all that running and had some Swap space as well as a usenet partition I began install SABnzbd+.

At this point my average CPU usage was around 20% and memory usage under 50%.  After I got everything needed to run SABnzbd+ installed I began setting up and configuring it.  After adding a couple nzbs I noticed the CPU usage and memory usage spiking fairly high.  After looking at the top results I noticed there were about 20+ SABnzbd.py processes running.  Now at first I figured there had to be a new process for each usenet connection, but I only have 12. After a while the router eventually lock up and I have to restart it.

After looking at a few things I noticed this seems to happen when a download finishes.  I also tried disabling all post-processing features both in the config and for each download.  This didn't seem to help much.

Are there any possible ways to avoid this or is SABnzbd+ simply too much for a simple router?

Router Stats:
Broadcom BCM4704 chip rev 9  at 264MHz
32MB onboard RAM
8mb ROM
7GB Linux Swap Space (Confirmed working)
DD-WRT v24-sp2 build 10923M

Any possible alternatives or suggestions are welcome.

Edit: I also forgot to include this is with the latest 0.4.5 version.  I also just tried compiling the python code using -OO and saw no improvement.

Edit2: I starting experimenting with the nice command and found this to help a little, but I'm still wondering why there are so many instances showing up in top.

Re: High CPU Usage and Multiple Instances

Posted: November 17th, 2008, 2:54 am
by shypike
I don't think 32M of memory is enough.
E..g. reading in a 5M NZB file will (temporarily) require 15M or memory.

Even people with 128M must be careful in not overloading their system.

-OO will only reduce memory usage a bit, no influence on performance.

SABnzbd uses a number of threads (12 could be right), but not a thread per connection.