1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

SOLVED High cpu usage of hyperiond

Discussion in 'Software Support' started by humdinger, 14 January 2021.

  1. humdinger

    humdinger New Member

    Messages:
    12
    Hardware:
    RPi3
    Hi there!

    I recently installed Raspberry Pi OS + Kodi 18.7 + HyperionNG from scratch on a RPi3+, having happily used the old hyperion for about 2 years.
    I start hyperiond from a script I call from ~/.config/lxsession/LXDE-pi/autostart. It all works quite well, even my tiny Kodi add-on to toggle the LEDs on/off and the CEC power-on/off-toggler.

    I haven't looked at the CPU usage of the old hyperion, but for the NG it seems a bit high: "top" reports about 55% usage of one core. Is this normal?

    Thanks!
    humdinger
     
  2. wladi

    wladi Member

    Messages:
    38
    Hardware:
    RPi3
    Depends in resolution and scaling factor. If you set 720x480 and scsling factor to 4, both absolutely enough for ambylight, then you should have approx. 15% on RPi 3 b+.
     
  3. humdinger

    humdinger New Member

    Messages:
    12
    Hardware:
    RPi3
    I have to admit, I never touched those parts and just now found them in the web config (Capture Hardware | Platform Capture).
    The defaults there seem to be much lower than what you suggested:

    Width: 80px
    Height: 45px
    Capture frequency: 10Hz
    Crop left/right/top/bottom: 0px
    Are those the settings I should tweak as suggested?
    Thanks!
    Humdinger
     
  4. humdinger

    humdinger New Member

    Messages:
    12
    Hardware:
    RPi3
    Forgot, the "Type" is set to "DispmayX"
     
  5. wladi

    wladi Member

    Messages:
    38
    Hardware:
    RPi3
    Do you use plattform capture or USB? My answer was for USB.
     
  6. humdinger

    humdinger New Member

    Messages:
    12
    Hardware:
    RPi3
    "Platform". I had a suspicion that you were talking aboout USB capture as I didn't find a "scaling factor" in the settings...
    Thanks anyway for playing. :)

    Can anyone doing Platform Capture confirm 55% 1-core usage is high but normal?
    Or maybe even have configuration tip to lower resources?
    I suppose it's no biggy, as 55% of one core should leave enough oomph for the little pi guy to do its work, but I'm all for saving energy when possible.
    Thanks!
    Humdinger
     
  7. TPmodding

    TPmodding Administrator Staff Member Administrator

    Messages:
    1,994
    Hardware:
    RPi1/Zero, RPi2, RPi3, +Arduino, +nodeMCU/ESP8266
    could you please post your config
     
  8. humdinger

    humdinger New Member

    Messages:
    12
    Hardware:
    RPi3
    Where exactly is my config saved?
    The Doc's page says it "defaults to your home directory", but I can't find anything in ~/.
    hyperiond --help says it "defaults to home directory of current user (/home/pi/.hyperion)", but in there is only a "custom-effects" and "db" folder.
    I assume it's not ~/.hyperion/db/hyperion.db you need?

    Sorry, I'm still an NG noob...
    Thanks,
    Humdinger
     
  9. TPmodding

    TPmodding Administrator Staff Member Administrator

    Messages:
    1,994
    Hardware:
    RPi1/Zero, RPi2, RPi3, +Arduino, +nodeMCU/ESP8266
    you can export it from the web-ui
     
  10. humdinger

    humdinger New Member

    Messages:
    12
    Hardware:
    RPi3
    Thanks. I pasted it to
     
  11. TPmodding

    TPmodding Administrator Staff Member Administrator

    Messages:
    1,994
    Hardware:
    RPi1/Zero, RPi2, RPi3, +Arduino, +nodeMCU/ESP8266
    i would try this settings for your grabber:
    720 × 576on a pixel decimation of 2
     
  12. humdinger

    humdinger New Member

    Messages:
    12
    Hardware:
    RPi3
    I don't use a USB grabber, I only use the RPi to play back media (from DVD/HD/online). I don't find a setting for resolution for "Platform Capture", which I learned this is called.
    Did I miss something, or did you? :)

    Thanks.
    Humdinger
     
  13. TPmodding

    TPmodding Administrator Staff Member Administrator

    Messages:
    1,994
    Hardware:
    RPi1/Zero, RPi2, RPi3, +Arduino, +nodeMCU/ESP8266
    and from where did you have those?
     
  14. humdinger

    humdinger New Member

    Messages:
    12
    Hardware:
    RPi3
    I left everything to the defaults and only adapted the LED hardware to my config.
     
  15. humdinger

    humdinger New Member

    Messages:
    12
    Hardware:
    RPi3
    Update: I found that if I ssh to the Rasp, "killall hyperiond" and then call my script that starts hyperiond - exactly as it is done in "autostart" - the hyperiond process only gobbles up ~10% of a core.
    No idea what to make of that...

    I'm not really a Linux user (see my sig :) ), are there better ways to auto start Kodi + hyperion? I do want to boot into the desktop to have a fallback when having to exit Kodi.

    Thanks,
    Humdinger
     
  16. humdinger

    humdinger New Member

    Messages:
    12
    Hardware:
    RPi3
    To bring this to a close. Before I got to the "low-cpu" config I mentioned in my comment #14 above, I played around with the USB capture settings (I don't have a USB grabber), but I reverted all in the end, the web interface showed the same default values as before. Nonetheless, the exported json config does differ compared to my initial "high-cpu" json config.

    Here is the diff between 'high cpu" (left) and "low cpu" (right): https://linediff.com/?id=60044542687f4b941b8b4567

    I have now reverted each setting - one by one - to the old "high cpu" value. You'll never guess which setting made difference!

    The culprit was "effect": "Trails" !
    "Trails" has a core chugging away with 55%, a change to "Rainbow swirl" puts it back to around 10%. Weird, because the effect is only played when hyperiond is launched, I suppose...

    Extremely weird: When I use a text editor to switch Trails/Rainbow and import the resulting json, I see the cpu usage difference. When I use the webinterface to switch effects, I don't! I'm at a total loss here...

    Anyway, I'm happy cpu usage is back to normal.
     
    Last edited: 17 January 2021 at 15:11
  17. humdinger

    humdinger New Member

    Messages:
    12
    Hardware:
    RPi3
    The stupid diff-site keeps losing the result...
    Here's a screenshot:
     

    Attached Files:

  18. TPmodding

    TPmodding Administrator Staff Member Administrator

    Messages:
    1,994
    Hardware:
    RPi1/Zero, RPi2, RPi3, +Arduino, +nodeMCU/ESP8266
    afaik the effect engine makes some perfomance issues...could you try it with disabled boot effect?
     
  19. humdinger

    humdinger New Member

    Messages:
    12
    Hardware:
    RPi3
    Indeed, this did further lower cpu usage. From 50+ % with "Trails", 10% with "Rainbow swirl" to now ~3% with disabled boot effect. I think I'll keep that setting, thanks! :)

    One has to wonder though, why a setting that just has the LEDs blink for a second when hyperiond launches should waste cycles once it's done the blinking...

    Anyhoo, thanks for bearing with me...