[PROBLEM] High CPU usage - from 'now playing' icon!? - 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: [PROBLEM] High CPU usage - from 'now playing' icon!? (/showthread.php?tid=5514) |
High CPU usage - from 'now playing' icon!? - robin - 04-18-2023 Chromium seems to cause extremely high CPU usage in a specific condition (as shown by 'top' command) Hardware: Raspberry pi 3B or 3B+ or 4 Software: 32 bit moode 8.30 or 8.31. Screen: local HDMI attached to Pi. Previous questions on high CPU usage haven't noted a distinction between screens states. I observe: CPU in 'album view' screen is 15% for the most greedy 'chromium-browse' when PLAYING or paused. CPU in 'playback' screen is 15% for the most greedy 'chromium-browse' when PAUSED. CPU in 'playback' screen is 70% for the most greedy 'chromium-browse' when PLAYING. I figured it might relate to rendering on the playing screen, and found that turning off 'Now-Playing icon' in 'Preferences' removes the problem completely (i.e. CPU no longer shoots up to during play when on 'playback' screen. I presume the tiny graphic beside the item Now Playing shouldn't take half the Pi's processor power to render! Happy to send 'top' output, but the problem is consistent & repeatable with numerous SD cards across numerous PIs. Is this a (known) bug, and if not, might it be looked into? Thanks! RE: High CPU usage - from 'now playing' icon!? - Tim Curtis - 04-18-2023 I don't think it's necessarily a bug in chromium-browser but maybe some sort of rendering efficiency issue having to do with SVG animations in chromium or possibly the coding of the SVG icon files themselves. Here's a link to the files in the repo. The 4-band icon is currently being used. https://github.com/moode-player/moode/tree/develop/www/images Here's the help from the Now-pkaying icon option: Code: Show the EQ bars animation icon next to the currently playing item in the Queue. Note that showing the icon may impact performance when using an attached local display. RE: High CPU usage - from 'now playing' icon!? - TheOldPresbyope - 04-18-2023 A little more data: 1. I don't see quite such high usage, more like 51% with 32-bit legacy 8.3.0 on a Pi3B+ (local official 7" LCD display) and 26% with 64-bit 8.3.1 on an Pi4B (external HDMI monitor) 2. These are 4-cpu SBCs. If you enter "1" while top is running you'll see that the total load on each CPU is considerably lower. The process scheduler is distributing the load. 3. This process doesn't seem to affect moOde's performance in playing back music. 4. As Tim points out, the feature can be turned off. All in all, this seemingly alarming usage doesn't seem like anything to worry about. Just my 2-cents worth. Regards, Kent RE: High CPU usage - from 'now playing' icon!? - robin - 04-19-2023 Thanks Tim & Kent, If I was still vaguely competent, I'd try compiling with a still icon instead of svg. I'm not. Still, turning off the icon provides adequate work around. Sounds like the potential for performance impact was already noted, Tim, so my finding was far from revelationary. Appreciate the point re 'top', Kent - hadn't used '1' before. I guess it isn't hammering the processor as badly as it appers: there is a surprising jump though... I've put my general top recordings below: pi4b, 'now playing' screen, HDMI, playing mp3, 'now playing' icon off PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 1571 pi 20 0 496312 164148 113004 R 32.5 4.2 2:11.88 chromium-browse 1653 pi 20 0 520660 109088 96460 S 4.3 2.8 0:47.84 chromium-browse 1268 mpd 20 0 209172 36084 22884 S 1.7 0.9 0:05.62 mpd pi4b, 'now playing' screen, HDMI, playing mp3, 'now playing' icon on PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 1571 pi 20 0 496568 165364 113248 S 55.8 4.2 1:33.10 chromium-browse 1653 pi 20 0 520916 109436 96684 S 9.0 2.8 0:30.55 chromium-browse 1268 mpd 20 0 209172 36084 22884 S 1.7 0.9 0:04.03 mpd pi3b, 'now playing' screen, HDMI, playing mp3, 'now playing' icon off PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 1378 pi 20 0 544792 201648 150600 S 39.6 21.3 1:16.65 chromium-browse 1455 pi 20 0 514580 108172 95452 S 5.9 11.5 0:14.45 chromium-browse 1078 mpd 20 0 209176 36676 22932 S 2.0 3.9 0:03.69 mpd pi3b, 'now playing' screen, HDMI, playing mp3, 'now playing' icon on PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 1378 pi 20 0 547836 203556 151468 S 82.1 21.5 1:57.59 chromium-browse 1455 pi 20 0 520980 108232 95580 S 12.3 11.5 0:35.99 chromium-browse 1078 mpd 20 0 209176 36676 22932 S 2.3 3.9 0:06.13 mpd With the icon on, I see a few degrees increase in temperature on a non-heatsinked pi3b. Anyhow, all working well, just mentioning my figures for info. |