Kodi Community Forum
v17 Comparison CPU Usage - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Android (https://forum.kodi.tv/forumdisplay.php?fid=164)
+---- Thread: v17 Comparison CPU Usage (/showthread.php?tid=299883)

Pages: 1 2 3


Comparison CPU Usage - CiNcH - 2016-12-09

Device: Sony BRAVIA 2015
SoC: MediaTek MT5890 (2x ARM Cortex A17 @ 1GHz, ARM Mali T624 MP2)
OS: Android TV 6.0.1 (Linux kernel 3.10.79)

Video: TS (H.264 [email protected] 720p50 5-6mbps / AC3)

Idle:
User: ~2% System: ~2% (~4%) (mainly consumed by top command)

Kodi 18.0-ALPHA1 (2017-04-27) (AC3 via PT)

MediaCodec Surface
User: ~16% System: ~16% (~32%)
org.xbmx.kodi ~14%
/system/bin/surfaceflinger ~7%
/system/bin/mediasurfer ~2%

MediaCodec
User: ~26% System: ~35% (~60%)
org.xbmx.kodi ~25%
/system/bin/mediasurfer ~12%
/system/bin/surfaceflinger ~7%

720p50 already suffers from occasional stuttering in non-Surface mode on the weak SoC, especially when overlaying menus. Peaks can be way higher than the above figures when some system service (e.g. system_server) kicks in sporadically. Surface mode is a must on Sony and Philips TVs!
What is the mediaserver process and why does it consume so much more CPU in non-Surface mode?


Video (AC3 via PT)

User: ~2% System: ~4% (~6%)
/system/bin/surfaceflinger ~1%

Video app seems to use Surface mode as a screencap results in a blank image.


VLC (AC3 via PT)

User: ~12% System: ~13% (~25%)
org.videolan.vlc 10%
/system/bin/surfaceflinger ~4%
/system/bin/mediasurfer ~1%


MX Player (HW video acceleration mode)

User: ~7% System: ~8% (~15%)
/system/bin/mediasurfer ~6%
/system/bin/surfaceflinger ~2%

This looks like Surface mode, as it is not possible to take screencaps of the video.


MX Player (HW+ video acceleration mode)

User: ~7% System: ~16% (~23%)
/system/bin/mediasurfer ~7%
/system/bin/surfaceflinger ~7%

Screencaps are possible, so this is most probably a non-Surface mode. This one uses way less resources compared to Kodi though.



Conclusion

Kodi does not run without problems on Sony and Philips Android TV with the low performance MediaTek SoCs, especially non-Surface mode eats up a lot of CPU time, which seems to perform way better in other media player apps.

Some videos even stutter in non-Surface mode, despite CPU usage being low, see this thread. Due to the low complexity of the provided sample video (720p25), it plays smoothly in non-Surface mode (which is a no-go for videos with higher resolution and frame rate though). Video app does not suffer from this issue, even though it also seems to be using Surface.


RE: Comparison CPU Usage - fritsch - 2016-12-09

Known. Old Jarvis throttled itself cpu wise in rendermanager. 24 fps on 60 Hz would mean: 24 frames. In Krypton render is running with Display refreshrate. If you want 24 fps only use adjust refreshrate setting.

Sony app is not comparable at all.


RE: Comparison CPU Usage - CiNcH - 2016-12-09

The sample I played was 25i deinterlaced to 50fps though. That should match the display refresh rate already. So it was 50Hz in all cases.


RE: Comparison CPU Usage - CiNcH - 2016-12-09

I now tried with 720p50 material, which is played at 50Hz I assume. CPU usage numbers are pretty much the same as the above.


RE: Comparison CPU Usage - fritsch - 2016-12-09

Assumptions don't help. Enable Sync Playback to Display and revisit.


RE: Comparison CPU Usage - CiNcH - 2016-12-09

I set it to 'Always' and it does not change the above numbers.


RE: Comparison CPU Usage - fritsch - 2016-12-09

There is no Always for this setting ...


RE: Comparison CPU Usage - CiNcH - 2016-12-09

Ah right, wrong one... 'Sync playback to display' even increased usage to about 18% on the Sony, most likely due to audio decoding that is taking place now. I added the number to the initial posting for comparison.


RE: Comparison CPU Usage - fritsch - 2016-12-09

Thanks for your investigation. Please redo the numbers by also correlation the cpu speed. As a percentage value is worth nothing if we don't know in which state the cpu currently is. You know 20 % with 800 Mhz is much less than 10 % with 1500 Mhz.


RE: Comparison CPU Usage - CiNcH - 2016-12-09

It is not easy to profile with Android TV. top command only gives me combined usage over both cores. The value is totally different from what Kodi thinks the CPU usage is.

I don't think that the ARM Cortex A7 cores are "speed-stepped". AFAIK they always run at a pretty low frequency.

It is all just assumptions, so probably the whole measurement is borked. But I don't think so.


RE: Comparison CPU Usage - fritsch - 2016-12-09

What makes you think so? Does it get hotter? Does something else not work anymore? Should I do the great raspbmc hack? E.g. just defaulting cpu load to 10% fixed?


RE: Comparison CPU Usage - CiNcH - 2016-12-09

I rest my case ^^


RE: Comparison CPU Usage - fritsch - 2016-12-09

So for now: The numbers you cannot prove and not correlate to CPU load confuse you and make you feel unhappy, right? While all the functionality still works without issues?

Is removing the CPU load value improving user experience? Shall I remove these?


RE: Comparison CPU Usage - CiNcH - 2016-12-09

I was only referring to values returned by top command. You can't remove those Tongue .


RE: Comparison CPU Usage - fritsch - 2016-12-09

Jep - I can't. So the less CPU load kodi will do and the less cpu clock you have - the higher the per centage will get :-)