puithove 209 Posted January 30, 2017 Posted January 30, 2017 First, let me be clear that I'm talking about the CPU utilization of the Emby server "Main" process - not the ffmpeg process which of course will use CPU if transcoding. This affects LiveTV streams whether they are Direct Play or Transcode. I've noticed previously that the Main process was running unusually high CPU when clients were active. I hadn't really tracked it down to a pattern. However, I just started experimenting with hardware transcoding using NVENC. I happened to notice that CPU was still pretty high even when the ffmpeg-transcode log showed it was definitely using NVENC. So then looking at TOP, I noticed that ffmpeg was quite low, and that the CPU usage was from "Main". Typically I see "Main" process taking 200% CPU - here is an example: PID TID RUID EUID THR SYSCPU USRCPU VGROW RGROW RDDSK WRDSK ST EXC S CPUNR CPU CMD 1/3 23032 - emby emby 22 2.66s 24.97s 124.9M -5648K 0K 1292K -- - S 1 194% Main 23209 - emby emby 43 0.19s 7.28s 1164K 1304K 0K 13196K -- - S 8 52% ffmpeg So then bells went off. I played a transcoded stream of a library item - and saw that the Main process was very low CPU, and also ffmpeg was very low (compared to a CPU transcode) - so all good there. All the above was using the UWP version of ET with bandwidth setting set low in order to force transcoding. Then I tried with the desktop version of ET to see what direct play would look like. Even here, when not transcoding (so no ffmpeg process spun up), the "Main" process still ran up around 200% just to stream the Live TV. PID TID RUID EUID THR SYSCPU USRCPU VGROW RGROW RDDSK WRDSK ST EXC S CPUNR CPU CMD 1/3 25852 - emby emby 30 2.43s 26.33s 675.1M 17456K 0K 1348K -- - S 5 206% Main Direct play of a Library file again showed low CPU on "Main". So this seems to be all about LiveTV streaming. With Direct Stream of Live TV, the only thing the "Main" process should have to be doing is sucking in the stream, and spitting it back out (with a pass through a temp file in the filesystem of course) so it shouldn't be using anywhere near that much CPU. I'm thinking maybe an un-controlled loop or something maybe? I'm attaching logs that show the activity from what I describe above. UWP - ffmpeg-transcode-fab458f4-23c0-4fc2-af91-849abb726d73.txt UWP - LiveTV - ffmpeg-transcode-5b72395c-973e-471c-8ca6-287b8b3218ec.txt UWP - server-63621394469.txt WinDesktop - server-63621395227.txt
puithove 209 Posted January 30, 2017 Author Posted January 30, 2017 Crap - just realized - this might not be a Linux-specific issue - probably should have posted it in the server testing area. This was done using BETA .289, but I've noticed the high CPU going back several versions.
Luke 42077 Posted January 30, 2017 Posted January 30, 2017 Try removing all plugins and see if the issue persists. thanks !
puithove 209 Posted January 30, 2017 Author Posted January 30, 2017 I should have known LOL... Ok, fair point. The issue persists with NO plugins. Here's a log after removing them all. PID TID RUID EUID THR SYSCPU USRCPU VGROW RGROW RDDSK WRDSK ST EXC S CPUNR CPU CMD 1/3 28317 - emby emby 21 2.28s 23.91s 0K 4K 0K 1208K -- - S 11 200% Main server-63621396644.txt
saed 6 Posted January 31, 2017 Posted January 31, 2017 (edited) I got confused as a post Edited January 31, 2017 by saed
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now