0.7.3 OS X 100% CPU Core Used

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.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: 0.7.3 OS X 100% CPU Core Used

Post by shypike »

It's always useful to find out what is communicating without your knowledge,
but judging from your logs, it's not frequent enough to explain the high load.
There are two other potential internal causes.
1. Some situation causes SABnzbd to enter and endless loop.
2. The Web UI somehow manages to make too many API calls (those are not logged).

#2 seems less likely and can be tested by using another skin, I recommend "smpl".
I will probably only discover #1 when a reproducible scenario can be discovered.
fanclerks
Newbie
Newbie
Posts: 28
Joined: September 8th, 2010, 1:18 am

Re: 0.7.3 OS X 100% CPU Core Used

Post by fanclerks »

So I believe I tracked it down to the new CouchPotato for OS X. It for some reason seems to be querying SAB a lot. The exact same queries for the queue and history for some reason. Whenever CouchPotato is running, SAB and CP both hit the CPU hard. I shutdown CP and SAB is perfectly fine and fans aren't going nuts.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: 0.7.3 OS X 100% CPU Core Used

Post by shypike »

Good detective work.
But I'm still a bit surprised by this, as the calls aren't that frequent.
However, what I don't know is how much data is requested.
When you have a large history (say 500 items) and CP queries the full history
every few seconds, this will be quite a load for both parties.
SABnzbd's own Plush and smpl skins ask only for the first page (default 10 items).
I need to add to this that currently, SABnzbd api-queries aren't optimized at all.
Future task.
fanclerks
Newbie
Newbie
Posts: 28
Joined: September 8th, 2010, 1:18 am

Re: 0.7.3 OS X 100% CPU Core Used

Post by fanclerks »

Well I know my history is huge as I haven't cleared it out in a while. It's up to 252 pages now. I wonder if I cleared that out if it'd help things...
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: 0.7.3 OS X 100% CPU Core Used

Post by shypike »

Well, you can backup the file admin/history1.db first.
That one contains the history.

BTW: if this solves the issue, you should file a bug report for CouchPotato.
Querying the full history is not a good idea.
fanclerks
Newbie
Newbie
Posts: 28
Joined: September 8th, 2010, 1:18 am

Re: 0.7.3 OS X 100% CPU Core Used

Post by fanclerks »

I renamed the history file to a backup and restarted SAB. Then I started CouchPotato and it seems to be good. CP is still showing the queries in the logs for the history and queue every few seconds though. I guess since the history is empty it's not hitting SAB as hard now so not spiking the CPU. It seems to be at least a temporary fix until CP is fixed.
d4rk
Newbie
Newbie
Posts: 1
Joined: September 25th, 2012, 5:53 pm

Re: 0.7.3 OS X 100% CPU Core Used

Post by d4rk »

Thank you both so much for figuring this out. I have 5610 items in my history and am also experiencing the 100% cpu core issue as well. I tried completely removing SAB and reinstalling it (while keeping my settings and history). I just recently installed CouchPotato v2 though and it looks like that is the issue. I will submit a bug over there.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: 0.7.3 OS X 100% CPU Core Used

Post by shypike »

You can also install 0.7.4RC1, that has a work-around for this issue (see Announcements).
Feedback is appreciated.
Post Reply