Moode Forum
Version 5 - CPU over 200%, slow interface - Printable Version

+- Moode Forum (https://moodeaudio.org/forum)
+-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3)
+--- Forum: Support (https://moodeaudio.org/forum/forumdisplay.php?fid=7)
+--- Thread: Version 5 - CPU over 200%, slow interface (/showthread.php?tid=1404)

Pages: 1 2 3 4


Version 5 - CPU over 200%, slow interface - rb0135 - 05-22-2019

Hi All,

I love keeping up-to-date with the latest, but I am having so many issues with V5 and wondering why as V4 was perfect on the same hardware.

I find the Interface much slower than V4 and with regard to the sound, I thinnk V4 was better but why.

Anyway, during playback, the interface is laggy, so I went looking.

I did a TOP command and this came up.... CPU constantly begin used over 200% by Chromium.


Here is the information from the TOP command:


Quote:Tasks: 131 total,   1 running,  81 sleeping,   0 stopped,   0 zombie
%Cpu(s): 52.8 us,  0.9 sy,  0.0 ni, 46.3 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem :   949264 total,    46044 free,   204240 used,   698980 buff/cache
KiB Swap:        0 total,        0 free,        0 used.   471716 avail Mem

 PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
1229 pi        20   0  656592 343288 256212 S 209.9 36.2 116:11.60 chromium-browse
 989 pi        20   0  790412 126168 107092 S   4.0 13.3   2:30.36 chromium-browse
 785 mpd       10 -10  135804  30344  20672 S   1.7  3.2   1:02.72 mpd
7374 pi        20   0    8228   3368   2808 R   1.0  0.4   0:00.17 top
 948 root      20   0  135356  35060  25836 S   0.7  3.7   0:23.43 Xorg
  10 root      20   0       0      0      0 I   0.3  0.0   0:01.35 rcu_sched



Here are my versions I'm running:
Linux RPi 4.19.34-v7+ #1211 SMP Mon Apr 8 22:56:37 BST 2019 armv7l GNU/Linux
Kernel 4.19.34-v7+, Raspbian 9.6, moOde 5.0 2019-04-12

I have a Raspberry Pi 3, with a HiFiBerry Digi+ hat. I have an official Raspberry PI 7" screen attached and connect at the same time via Chrome (tried MS Edge too) on a Windows 10 PC also. I use SDHC Sandisk 16GB SD Card.

Music is streamed from a QNAP NAS (I dont stream internet music), via Ethernet (which is also another issue as I use to stream it over wireless, including hidef Flac files and never had an issue. However, with V5, I cant stream these hidef Flac files at all. The buffer cannot fill fast enough, yes even when changing the buffer size).. Nothing has changed with the wireless either)...

I dont connect to the PI any other way other than through the Web interface.. No BT, UPNP, AIRPLAY, etc.

As mentioned, never had this issue with V4. CPU usage rarely got over 15%.

When I updated to the sub releases (5.2 I think), then the system (web interface) would freeze constantly (would take 10 minutes for the system to be ready to start playing a song), although the sound played eventually and would keep playing, but the interface would not update.

I dont want to go back to V4.

Any ideas of what to try?

Thanks All,
Rob


RE: Version 5 - CPU over 200%, slow interface - TheOldPresbyope - 05-22-2019

@rb0135

Of course that seems an absurdly high usage. What it means is that the Chromium process is keeping two CPUs busy (out of four, hence the ca 50% usage total). This seems anomalous.

Chromium is running solely to drive the local UI display. I don't have one so I can't try directly to repo your problem. What happens if you turn off the local UI in System config? [EDIT: you might then have to reboot; I don't remember.] Do you get the kind of UI responsiveness on the remote browser you want? 

Regards,
Kent


RE: Version 5 - CPU over 200%, slow interface - Tim Curtis - 05-22-2019

Try reverting the kernel to 4.19.34

Instructions in this post :-)
http://moodeaudio.org/forum/showthread.php?tid=1394&pid=10605#pid10605

-Tim


RE: Version 5 - CPU over 200%, slow interface - rb0135 - 05-23-2019

Hi Kent/Tim

Silly me forgot TOP shows the combination of the all cores.

I decided to run HTOP to show a bit more information

Kent - I actually did try your suggestion and it did drop slightly to 145-190%.

Tim
What I did (before I saw your reply), was to start from scratch with V5.0.  Upon configuring it and playing from the NAS, it was still running around 145-190% (seems to increase over time). So, I ran this command:

Quote:sudo apt-get update && sudo apt-get upgrade -y

This upgraded the Kernel to Linux RPi 4.19.42-v7+ #1219 SMP Tue May 14 21:20:58 BST 2019 armv7l GNU/Linux and seem to upgrade Chromium as well amongst other things.

This took a little while, but once finished, tested the system and now it is between 14-25% (just like previous).

The only problem i snow it seems to take a few more minutes to load the system (probably all the junk that doesn't need to be loaded). Maybe a trade-off for a working system. I might see if I can just upgrade what I need, or, downgrade the Kernel as Tim suggest.

Now, I thought I would try 5.2 (updates from the System Menu) and I still got the lag/hanging and CPU 200+%

I might try 5.1 tonight and see how that goes.

Thanks for your replies.
Rob


RE: Version 5 - CPU over 200%, slow interface - Tim Curtis - 05-23-2019

The 5.2 update installs 4.19.40 but regardless the symptoms suggest something external to moOde software for example a bad SDCard etc.

Here is an example of one of my test systems showing CPU utilization is < 10% while playing a FLAC track from NAS while the 7" Touch is displaying the Playback screen and its also being displayed in Safari on my Mac.

The system consists of:
- Pi-3B
- Pi 7" Touch
- built in WiFi adapter
- no DAC board
- 5.2 ISO image
- Sandisk Ultra Class 10 card

Code:
Authenticated to rp5 ([192.168.1.197]:22).
Kernel 4.19.40-v7+, Raspbian 9.9, moOde 5.2 2019-05-07

pi@rp5:~ $ moodeutl -m
CPU: 1.2 GHz | LOAD: 6% | TEMP: 60°C | RAM_USED: 36% | DISK_USED: 78% | FPM_POOL: 5 workers  



RE: Version 5 - CPU over 200%, slow interface - TheOldPresbyope - 05-23-2019

And I got similar numbers in a quick-n-dirty test running a stock moOde r5.0 on an RPi3B+ connected via HDMI to my desktop monitor. When I turn off the Local UI display as I suggested, Chromium processes cease running and the CPU usage drops even further.

Like Tim I use only SanDisk Ultra Class 10 uSD cards. They're cheap so I always have a bunch on hand and, for me at least, they've been 'ultra' reliable through many flashing cycles as I test different systems. These and good power sources have helped avoid a lot of head scratching.

Regards,
Kent


RE: Version 5 - CPU over 200%, slow interface - rb0135 - 05-23-2019

Thanks Tim/Kent.

As stated previously, I use the same SD cards as both of you, and tried two of them and got the same result. Went back to V4 and it was fine (both cards and exactly same setup)

Also as mentioned, when I updated the OS manually, it was fine, but only with version 5.0.

Tim, it seems we have the exact setup, but I have a Hifi Berry Digi+ attached to my PI.

I'm not saying it is Moode that is causing the issue, but a huge difference in processor usage between 5.0 and 5.2 and as this is a "hobby", I would like to find out what is causing it.

One thing for sure on my setup, it is definitely the Chromium process for the 7" inch display that is pushing the CPU and not the Chromium process for the remote browser.

Looks like I will be "playing" a lot over the coming weekend to see if I can pinpoint what's the cause on my setup.

Thanks again.


RE: Version 5 - CPU over 200%, slow interface - swizzle - 05-23-2019

Did you try reverting the kernel like Tim suggested? There aren’t a lot of changes between 5.0 and 5.2 that’d impact perf and certainly not in that direction (or to that degree!)

If you did try reverting the kernel to no avail and have this behavior on a desktop computer as well we can try using the chrome dev tools to get an idea of what is going on behind the scenes.


RE: Version 5 - CPU over 200%, slow interface - Tim Curtis - 05-23-2019

@rb0135,

Are u able to replicate my configuration? If so then we should get same results regarding CPU utilization. This would be a good baseline for helping to isolate the problem.

- Pi-3B
- Pi 7" Touch
- built in WiFi/BT adapter or Ethernet (NOTE: if using Ethernet-only then turn off built in WiFi/BT adapter in System config)
- no DAC board
- 5.2 ISO image


RE: Version 5 - CPU over 200%, slow interface - rb0135 - 05-24-2019

Hi All

What I did was to download 5.2 image (rather than updating through System Menu). I used a brand new Sandisk Ultra Class 10 SD card.

Same results as previous tests.

However, after experimenting, I have found what is causing Chromium to use over 200% CPU.

In Appearance settings, Coverview options, I turned on Automatic Display to 1 minute and this totally blew the CPU usage to 200%+. The Backdrop Style was set to Animated and actually, it doesn't matter what Style is used, except pure black drops the usage to about 160%+.

These settings totally blew the CPU usage.

Now, I did have these on when using V5.0 and V4 without issues.

Before these settings were turned on, and after I turned them back off, CPU sits around 6% for the Chromium process.

Also to note, the memory is only about 1/3 used, no swapping (I thought maybe swapping was slowing down as I know on a PI, swapping is pretty CPU intensive... so Ive heard)

So, Tim, I would have presumed just showing the cover wouldn't put that much load on the system, since when I have Coverview off, there is more happening on the screen such as the time, showing cover, showing the play list, etc and it is only using 6-10%... Any ideas?

As suggested, I am going to drop the OS version down just to see if that does fix it.

Thanks again,
Rob