Page 1 of 1
Download performance issue when using 1.1.0
Posted: September 23rd, 2016, 4:06 am
by asarian
Ever since I upgraded my (Synology) Sabnzbd to 1.1.0 [8abcf08] (upgraded from 1.0.3), download-performance seems to have been cut in half. I used to download at ca. 4.8 Mbps, and now it's never higher than ca. 2.6 Mbps.
I have 2 servers at priority 0, both with 8 connections defined. Lowering those, are adding more, didn't make a real difference.
Re: Download performance issue when using 1.1.0
Posted: September 23rd, 2016, 4:53 am
by shypike
In 1.1.0 we chose tuning parameters that turn out to be non-optimal for some low-CPU systems.
In 1.2.0, we'll change that and also look at optimizations that benefit such systems.
Re: Download performance issue when using 1.1.0
Posted: September 23rd, 2016, 5:08 am
by asarian
shypike wrote:In 1.1.0 we chose tuning parameters that turn out to be non-optimal for some low-CPU systems.
In 1.2.0, we'll change that and also look at optimizations that benefit such systems.
Thanks.
My system is hardly low-CPU, though. It's Synology DSM 6 inside a VM, with 4x i7 980X virtual CPU's, and 4G RAM. CPU usage, as a result, is therefore not an issue here (repair, for instance, takes around 17% CPU, at the most). It's just the download speed which has dropped significantly (downloading itself takes only ca. 6% CPU or less).
I even briefly reniced the process (to -n1), but that made no visible difference.
EDIT: P.S. Is there a manual way to undo the new 'tuning parameters'?
Re: Download performance issue when using 1.1.0
Posted: September 23rd, 2016, 7:44 am
by safihre
Only if you can get to the python code, can you?
Re: Download performance issue when using 1.1.0
Posted: September 23rd, 2016, 8:19 am
by jcfp
On my system, commenting out the following code in sabnzbd/downloader.py around line 487 (first introduced in
this commit) causes download speed to go up significantly:
Code: Select all
# Why check so often when so few things happend?
if len(readkeys) >= 8 and len(read) < len(readkeys)/4:
time.sleep(0.05)
Re: Download performance issue when using 1.1.0
Posted: September 23rd, 2016, 9:38 am
by asarian
safihre wrote:Only if you can get to the python code, can you?
Sure, I can get to it just fine.

Please, tell me what to do!
Re: Download performance issue when using 1.1.0
Posted: September 23rd, 2016, 9:41 am
by asarian
jcfp wrote:On my system, commenting out the following code in sabnzbd/downloader.py around line 487 (first introduced in
this commit) causes download speed to go up significantly:
Code: Select all
# Why check so often when so few things happend?
if len(readkeys) >= 8 and len(read) < len(readkeys)/4:
time.sleep(0.05)
Thanks, will do!

Re: Download performance issue when using 1.1.0
Posted: September 23rd, 2016, 12:01 pm
by safihre
Right, so clearly this optimization works on Windows and Mac, but not on Linux.
Guess will have to make that conditional.
Re: Download performance issue when using 1.1.0
Posted: September 23rd, 2016, 2:45 pm
by asarian
asarian wrote:jcfp wrote:On my system, commenting out the following code in sabnzbd/downloader.py around line 487 (first introduced in
this commit) causes download speed to go up significantly:
Code: Select all
# Why check so often when so few things happend?
if len(readkeys) >= 8 and len(read) < len(readkeys)/4:
time.sleep(0.05)
Thanks, will do!

Yep, this worked immediately.

Thanks again.
Re: Download performance issue when using 1.1.0
Posted: September 26th, 2016, 3:50 am
by GTunney
jcfp wrote:On my system, commenting out the following code in sabnzbd/downloader.py around line 487 (first introduced in
this commit) causes download speed to go up significantly:
Code: Select all
# Why check so often when so few things happend?
if len(readkeys) >= 8 and len(read) < len(readkeys)/4:
time.sleep(0.05)
Thank you so much, took my speed from 5.3MB/s back up to what it was before the update 7.9MB/s