Jump to content

Refresh guide 100% CPU usage


Recommended Posts

groenator
Posted

I deployed my emby server inside a Docker container that runs on Ubuntu 18.4 LTS. I noticed that when the refresh guide is updating the CPU usage goes nuts. It reaches 100% usage. I am using the latest version of Emby Server. 

 

Is there a way to reduce CPU usage? 

 

Below is my Top command output. 

 

top - 21:19:58 up 22:39,  1 user,  load average: 1.02, 1.03, 1.00
Tasks: 252 total,   1 running, 159 sleeping,   0 stopped,   0 zombie
%Cpu0  :  0.0 us,  0.0 sy,  0.0 ni,100.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu1  :  0.3 us,  0.0 sy,  0.0 ni, 99.7 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu2  :  0.0 us,  0.0 sy,  0.0 ni,100.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu3  :  0.0 us,  0.0 sy,  0.0 ni,100.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu4  :  0.0 us,  0.0 sy,  0.0 ni,100.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu5  :  0.0 us,  0.0 sy,  0.0 ni,100.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu6  :  0.0 us,  0.0 sy,  0.0 ni,100.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu7  :  0.3 us,  0.0 sy,  0.0 ni, 99.7 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu8  :  0.0 us,  0.0 sy,  0.0 ni,100.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu9  :  0.0 us,  0.0 sy,  0.0 ni,100.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu10 : 97.7 us,  2.0 sy,  0.0 ni,  0.0 id,  0.3 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu11 :  0.0 us,  0.0 sy,  0.0 ni,100.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem :  8067192 total,  1080664 free,  2593556 used,  4392972 buff/cache
KiB Swap:        0 total,        0 free,        0 used.  5145180 avail Mem
 
  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
21055 root      20   0 5947984 467248  48200 S 100.0  5.8 212:32.00 /system/EmbyServer -programdata /config -ffdetect /bin/ffdetect -ffmpeg /bin/ffmpeg -ffprobe /bin/ffprobe -restartexitcode 3
 1227 root      20   0 1358256  64748  35916 S   0.3  0.8   3:58.60 dockerd -G docker --exec-root=/var/snap/docker/321/run/docker --data-root=/var/snap/docker/common/var-lib-docker --pidfile=/var/snap/d+
13625 root      20   0 1795872 347828  31720 S   0.3  4.3  30:54.63 mono --debug /app/Lidarr.exe --nobrowser --data=/config/app
21482 grosub    20   0   44676   4132   3352 R   0.3  0.1   0:01.24 top
groenator
Posted (edited)

Seems that is not only when refreshing the guide, but it is also happening when downloading subtitles, updating the library. Basically, every time when a scheduled job starts.

Edited by groenator
Posted

Please try removing the following plugins, then restarting the server and see if this helps:

	Auto Organize 1.3.7.0
	CoverArt 4.0.93.0
	Statistics 2.0.8.0

Thanks.

groenator
Posted

Cool, I will do that. Would I be able to use the plugin again?

groenator
Posted

I will do it tonight.

groenator
Posted

One quick question: is emby single threaded application or not?

Posted

It is multi-threaded.

groenator
Posted

Hi,

 

Nothing changed, I removed the plugins, restarted the container. I started to refresh the guide, it's still using one CPU.

 

Does it make any difference that the emby settings were imported from my qnap?

 

I migrated the container from qnap to Ubuntu.

groenator
Posted

I'll try building a new emby server with clean settings.

Posted

Please attach a new emby server log. Thanks

groenator
Posted

These logs are from the new server I configured now. Emby is still using one CPU with the new server. 

 

If you want me to send you the debug logs let me know. 

 

Regards, 

Posted

So what happens is the guide data gets read multiple times, once for each channel. We will make this more efficient in a future update. thanks.

groenator
Posted

Thanks buddy for your quick answer.

  • 4 weeks later...
groenator
Posted

The refreshing of the guide is really testing my patient ...:)

 

Any idea when this fix will be implemented? Is there a bug open already for it?

 

I dont to be dramatic, but hearing the fan spinning like crazy all the time is a bit upsetting..

Posted

It's going to come with the upcoming revamp of channel management. Thanks.

  • 1 month later...
groenator
Posted

So what happens is the guide data gets read multiple times, once for each channel. We will make this more efficient in a future update. thanks.

Any news when this fix will be implemented?

Posted

Hopefully soon, thanks.

  • 2 years later...
Posted (edited)

hello guys, some news? My server is about to explode every time autoupdate the epg guide.... @Luke

This is a serious problem, yesterday proxmox completely crashed with all vm's

Edited by Nikoh77
Posted
57 minutes ago, Nikoh77 said:

hello guys, some news? My server is about to explode every time autoupdate the epg guide.... @Luke

This is a serious problem, yesterday proxmox completely crashed with all vm's

@Nikoh77 please attach the emby server log from when this happened. Thanks.

EODCrafter
Posted (edited)
5 hours ago, Nikoh77 said:

hello guys, some news? My server is about to explode every time autoupdate the epg guide.... @Luke

This is a serious problem, yesterday proxmox completely crashed with all vm's

Interesting, mine barely ticks above 3% usage on all four.

EDIT: Whoops...maybe not......image.png.695cc72129b2d57bb4f640abcdd82435.png

Settled down after guide refresh done, does seem a little excessive for simple xml file refresh.....image.png.00df549c858964dce34250cfd7e2e39e.png

Edited by EODCrafter
Posted

@Luke i always see this command (on htop) which has many active processes and which consumes a lot of cpu time and mem during updating epg guide, is this normal?

Quote

/opt/emby-server/system/EmbyServer.dll -programdata /home/nikoh/embymediaserver -ffdetect /opt/emby-server/bin/ffdetect -ffmpeg /opt/emby-server/bin/ffmpeg -ffprobe /opt/emby-server/bin/ffprobe -restartexitcode 3 -updatepackage emby-server-deb_{version}_amd64.deb

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...