2.2.1 uses much more cpu than 2.2.0

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
Puzzled
Full Member
Full Member
Posts: 160
Joined: September 2nd, 2017, 3:02 am

2.2.1 uses much more cpu than 2.2.0

Post by Puzzled »

I'm using two usenet servers, one is IPv4 and one is IPv6. I get a total of about 1 MB/s, limited by the usenet servers and not my connection. Without bandwidth limiting the CPU usage is about 30% on a 4 core CPU in Windows 10 64 bit (1 core is running 100%), and about the same when I run SABnzbd in a virtual Debian machine. If I put the bandwidth limit at 20% less than the top speed (0.8 MB/s) the CPU usage falls to about 10% in both Windows and Debian. After downgrading to 2.2.0 the CPU usage is about 3% without bandwidth limit in Windows. I haven't tried downgrading in Debian.
User avatar
safihre
Administrator
Administrator
Posts: 5521
Joined: April 30th, 2015, 7:35 am
Contact:

Re: 2.2.1 uses much more cpu than 2.2.0

Post by safihre »

It's a bit more complicated:

When you do not set a speedlimit, SABnzbd will indeed use too much CPU because it constantly checks if more articles are available.
Therefore we introduced a throttle mechanism in 1.1.0, but this killed download-speed on some VM's or VPNs. Because of that, during the first ~15 seconds of the downloading we measure the speed, we enable the throttling (reducing CPU usage) and then check if the speed stays the same. If the speed starts to fluctuate, we disable the throttle and CPU usage will be higher but at least on those VM's and VPN's it will work fine. We introduced this in some 1.1.x version.

So if the speed fluctuates during the first 15 seconds, we play it safe and CPU usage will be higher.

If you always want low CPU usage, just set your download-limit to 95% of your connection speed :)
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
Puzzled
Full Member
Full Member
Posts: 160
Joined: September 2nd, 2017, 3:02 am

Re: 2.2.1 uses much more cpu than 2.2.0

Post by Puzzled »

Thanks for your reply, but that doesn't explain why 2.2.1 uses 10x more CPU when I'm not setting a bandwidth limit manually. It does so permanently and every time, not just for a few seconds.
User avatar
safihre
Administrator
Administrator
Posts: 5521
Joined: April 30th, 2015, 7:35 am
Contact:

Re: 2.2.1 uses much more cpu than 2.2.0

Post by safihre »

I can't explain 10x..
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
Temujin
Newbie
Newbie
Posts: 12
Joined: September 4th, 2017, 1:43 pm

Re: 2.2.1 uses much more cpu than 2.2.0

Post by Temujin »

I'm seeing a marked decreases in performance as well;r especially in my browser since the latest upgrade. Lag across my tabs in chrome even before the quickpar repair or extraction process begins which did not occur before the upgrade. No settings changed in quite some time other than the upgrade.
I can try setting that throttle down to 95 as you mentioned although not sure if that will resolve. Will advise.
User avatar
safihre
Administrator
Administrator
Posts: 5521
Joined: April 30th, 2015, 7:35 am
Contact:

Re: 2.2.1 uses much more cpu than 2.2.0

Post by safihre »

2.3.0Alpha1 should resolve this hopefully, let me know if it doesn't.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
Temujin
Newbie
Newbie
Posts: 12
Joined: September 4th, 2017, 1:43 pm

Re: 2.2.1 uses much more cpu than 2.2.0

Post by Temujin »

Oh great news, thanks for the suggestion - will grab that later today or tomorrow and let you know.
Puzzled
Full Member
Full Member
Posts: 160
Joined: September 2nd, 2017, 3:02 am

Re: 2.2.1 uses much more cpu than 2.2.0

Post by Puzzled »

I just installed 2.3.0 Alpha 2, and the CPU usage is back to being neglible. Thanks. I tried installing 2.2.1 first just to make sure and it used 25%+ on the same file, so the new version definitely fixed it for me. I have multiple servers but only one was active on the file I was testing.
User avatar
safihre
Administrator
Administrator
Posts: 5521
Joined: April 30th, 2015, 7:35 am
Contact:

Re: 2.2.1 uses much more cpu than 2.2.0

Post by safihre »

Good :)
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
Temujin
Newbie
Newbie
Posts: 12
Joined: September 4th, 2017, 1:43 pm

Re: 2.2.1 uses much more cpu than 2.2.0

Post by Temujin »

Installed Alpha 2 today and tested with a small 1gb download, seems better - will advise again after a larger download to confirm issue is either better or resolved.
Thanks!

EDIT: Confirmed after grabbing larger and multiple files, performance seems to be increased and not seeing lag in browser while large downloads or file extracts occur.
Thanks again
Post Reply