Why are my downloads so slow?

Get help with all aspects of 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
dtrobson099
Newbie
Newbie
Posts: 6
Joined: February 19th, 2013, 9:13 pm

Why are my downloads so slow?

Post by dtrobson099 »

Before I begin, I'm going to take a guess and say that I probably need to upgrade my hardware, but I want to do some due diligence before I upgrade hardware here.

I recently reconfigured my NAS with Windows Server 2012 - added Storage Spaces, and I have a nice thin provisioned 45TB disk with about 18TB worth of actual HDDs. (I'm planning for the future here.) Anyway - set up SAB+SB+CP and everything worked fine out of the gate. Very promising until I started trying to set up a nice sized backlog so I could fill up that disk space.

My internet connection pegs around 2.3 MB/s. I like to throttle SAB down to about 1.8 MB/s, so I'll be able to actually surf the web and what not while it's working. My backlog is still being filled, but right now it looks like SAB has a backlog of about 3,000 items. Should fill around 7TB of space when it's all said and done in a few months. ;D

The NAS is a little underpowered. It was originally intended to simply be an unRAID server that did nothing but host the files... but I figured my MSDN subscription was going to waste if I didn't install Windows Server. I like it a lot better. The machine has 4 GB of RAM, which isn't terrible, but here are my CPU/Motherboard specs:

AMD Sempron 145 Sargas 2.8GHz Socket AM3 45W Single-Core Desktop Processor SDX145HBGMBOX
ASUS M5A78L-M LX PLUS AM3+ AMD 760G Micro ATX AMD Motherboard

Surprise, surprise, SABnzbd+ is pegging my processor. But before I go out and try a) a more powerful processor to fit in an AM3+ socket, or b) replace the whole getup with a proper Intel configuration, I'd like to see if I can optimize this somehow without making the download process more manual. I like to configure these servers for friends and family and set it and forget it is the motto here... not everyone is as technical as I am.

Here is my server configuration if that helps:

Primary server - secure.usenetserver.com
Alternate server 1 - ssl.astraweb.com
Alternate server 2 - reader.extremeusenet.nl
Backup/Fill server - news.tweaknews.eu

The bandwidth has been fairly equally spread between all 3 servers, I don't know that I've set them up in SAB (or that I can) as primary/alternate, but I like to think of them that way. ;)

I guess what I'm really asking is, SAB seems to be doing extra processing based on the size of the backlog, and I'm not entirely sure why. Is there a way for SAB to fetch the NZB's needed, build the backlog, but only work on say, the first 20 items? Whatever SAB needs with the rest can just be saved to disk until they reach the top 20. So I'd like to avoid a solution that involves sacrificing my queue size, disabling my backup server, etc. Any ideas? And will throwing hardware at it even help if that is actually the only solution?
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Why are my downloads so slow?

Post by shypike »

I can only give a generic advice.
Make sure you have an ample article cache in Config->General, like 256M
Don't overdo the amount of connections per server.
I don't know the CPU that you are using.
But even an average Intel Atom should be capable of doing 6MByte/sec,
but maybe not with Windows.
User avatar
sander
Release Testers
Release Testers
Posts: 9061
Joined: January 22nd, 2008, 2:22 pm

Re: Why are my downloads so slow?

Post by sander »

... and in case of a underpowered system: do NOT use SSL; SSL / NNTPS consumes extra CPU power ...
dtrobson099
Newbie
Newbie
Posts: 6
Joined: February 19th, 2013, 9:13 pm

Re: Why are my downloads so slow?

Post by dtrobson099 »

Disabling SSL is not really an option in my mind. I think the issue is directly related to the size of the backlog. CPU usage returns to normal when I purge the backlog and start fresh. I did end up upgrading to an 8-core processor and 8 GB of RAM, (I figure I'll use the server for Hyper-V and some other stuff, it's already running MySQL and XBMC 24/7) but I suspect that the issue might still exist. If there's any information (logs, etc) I can provide to help the development team track this issue down, I'd be happy to do so.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Why are my downloads so slow?

Post by shypike »

dtrobson099 wrote:I think the issue is directly related to the size of the backlog. CPU usage returns to normal when I purge the backlog and start fresh.
Sounds like some form of queue corruption.
Didn't a SABnzbd restart fix this?
An alternative would be to "Repair" in the Status->Queue-Repair tab.

Another question:
Did parts of the backlog jobs already download?
dtrobson099
Newbie
Newbie
Posts: 6
Joined: February 19th, 2013, 9:13 pm

Re: Why are my downloads so slow?

Post by dtrobson099 »

Restarts, pausing and resuming the queue, clearing the logs all seemed to give a short burst of speed but not much else. Speeds would quickly return from 1.8 MB/s to 40 kB/s or lower. I did repair the queue but that just made it worse. The downloads wouldn't even get started at that point, so I would purge.

I didn't notice any partial downloading other than when SickBeard would insert a high priority item at the top of my list and take over. For the most part, other than the first 2/3 items, the backlog was being processed in a linear fashion. Also, SickBeard's high priority downloads didn't seem to suffer from the slowdowns I got from CouchPotato now that I think about it further. Perhaps this is an issue with CouchPotato? I've noticed it inserts files with .cp extensions to the backlog since upgrading to 2.0, and I hadn't given it much thought but I suppose that's what it's using to track download progress in SAB and manage retry logic and renaming on completion? CouchPotato is #2 in terms of CPU abuse in this scenario, SAB will be responsible for about 60% and CP maybe 25%. I'm curious to see what happens when I get rid of the single core configuration this weekend.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Why are my downloads so slow?

Post by shypike »

I don't recognize any of this.
I also doubt that it has anything to do with "single core".
dtrobson099
Newbie
Newbie
Posts: 6
Joined: February 19th, 2013, 9:13 pm

Re: Why are my downloads so slow?

Post by dtrobson099 »

Well it wouldn't be the first time, or the last time that I've had a hypothesis that had one or more logical fallacies, but that's how I learn.

Anyway, the upgrade went rather well, the problem did manifest itself again on the upgraded hardware, though to a lesser extent. Restarting SAB earned me a longer period of reprieve from the issue, however, and I have yet to see my downloads stop entirely as I did before. I have the feeling that after a restart a few days ago, it happily plugged away at maximum capacity for a few days. Doesn't seem to be the issue with the CPU perpetually at 100%, either. Still had to restart a few minutes ago, with a queue that size restart will take a solid 5 minutes, if not longer.

Anyway, I can personally live with the functionality as is, so I'm good. However, in return for the assistance I was given I'd be happy to do further testing, share logs or answer any further questions to assist in pinpointing the issue, if anyone is interested in that sort of thing.
SebNYD
Newbie
Newbie
Posts: 6
Joined: February 8th, 2012, 5:30 am

Re: Why are my downloads so slow?

Post by SebNYD »

shypike wrote:I can only give a generic advice.
Make sure you have an ample article cache in Config->General, like 256M
Don't overdo the amount of connections per server.
I don't know the CPU that you are using.
But even an average Intel Atom should be capable of doing 6MByte/sec,
but maybe not with Windows.
I had an ATOM under Windows Home Server for a few years and got a stable 6,5 MB/s connexion (with SSL), so no problem there.
It was probably the max for that specific configuration since I recently upgraded to a Core i3 (3220T + Win 7 + More RAM + SSD as system drive) and i'm now getting 11+ Mb/s.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Why are my downloads so slow?

Post by shypike »

dtrobson099 wrote: Anyway, I can personally live with the functionality as is, so I'm good. However, in return for the assistance I was given I'd be happy to do further testing, share logs or answer any further questions to assist in pinpointing the issue, if anyone is interested in that sort of thing.
SABnzbd does have some scaling issues, although I have never seen it happen on systems with a beefy CPU and plenty of memory.
But you should realize that my view of the world is limited.
Most of the time, I cannot reproduce other peoples complex environments and even plenty of logging doesn't always give
insight into the dynamic behavior of systems.
Such are the limits of small-scale software development.
Things work for 99% of the users and I have a hard time figuring out why it doesn't work for the 1%.
Post Reply