Page 2 of 2
Re: 0.7.3 OS X 100% CPU Core Used
Posted: September 16th, 2012, 1:27 pm
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.
Re: 0.7.3 OS X 100% CPU Core Used
Posted: September 20th, 2012, 12:55 am
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.
Re: 0.7.3 OS X 100% CPU Core Used
Posted: September 20th, 2012, 5:08 am
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.
Re: 0.7.3 OS X 100% CPU Core Used
Posted: September 20th, 2012, 11:12 am
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...
Re: 0.7.3 OS X 100% CPU Core Used
Posted: September 20th, 2012, 1:00 pm
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.
Re: 0.7.3 OS X 100% CPU Core Used
Posted: September 21st, 2012, 4:45 pm
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.
Re: 0.7.3 OS X 100% CPU Core Used
Posted: September 25th, 2012, 6:01 pm
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.
Re: 0.7.3 OS X 100% CPU Core Used
Posted: September 26th, 2012, 1:58 am
by shypike
You can also install 0.7.4RC1, that has a work-around for this issue (see Announcements).
Feedback is appreciated.