Jump to content

High CPU usage with Kodi client


ursli
 Share

Recommended Posts

First of all I'm not sure if the high CPU usage is caused by me using Gotham and having to change some bits in the client code (for reference check here: http://emby.media/community/index.php?/topic/22286-script-error-with-gotham/) but I thought it's worth posting about it anyway.

 

I did some CPU time measurements while playing a recording from my TV backend, which is not included in emby so there is no transcoding skewing the results. Emby is also idle, there is no syncing or anything going on.

 

Here are 10min without emby client running, the short spike is me un-pausing my recording.

 

post-49212-0-41072900-1434368320_thumb.png

 

And here 10min with emby client enabled:

 

post-49212-0-84226800-1434368329_thumb.png

 

One more from htop while running emby client

 

post-49212-0-65781900-1434370373_thumb.jpg
 

 

As you can see CPU usage is a lot higher, if emby then starts to sync my library the CPU is 100% in use and I get stutters playing back video files. For the record on my HTPC I'm running an oldish celeron dual core at 1.2 GHZ (Intel SU2300) with lubuntu. Is that really normal behaviour or is something going wrong here?

 

Server Version 3.0.5621.4

Kodi: 13.2

Kodi addon Version 1.0.0

Edited by ursli
Link to comment
Share on other sites

Thanks for the reply. I've changed the parts mentioned by xnappo here: http://emby.media/community/index.php?/topic/22286-script-error-with-gotham/&do=findComment&comment=218532

 

Just for easier overview he mentioned changing these:

while not self.KodiMonitor.abortRequested():

to

while 1:
if self.KodiMonitor.waitForAbort(5):

to

if 1==0:

(Also had to change these to make it work)

if self.KodiMonitor.waitForAbort(1):

to

if 1==0:

Files changed where service.py, WebSocketClient.py and UserClient.py after that I've got a successful connect and sync on Gotham.

 

So thats causing the issue? Anything I can do about it?

Link to comment
Share on other sites

Angelblue05

Any waitForAbort(5) are sleeps to limit cpu usage. Replace them with xbmc.sleep(1000) instead.

 

 

Sent from my iPhone using Tapatalk

Link to comment
Share on other sites

Thanks a lot, after some fiddling I seem to be back to normal CPU usage. :)

 

Any plans to officially (re)add Gotham support? I know, I know Gotham is old news by now but I guess it wouldn't hurt being backwards compatible (if it's not using too much time better spent on other things of course).

Edited by ursli
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...