-
Notifications
You must be signed in to change notification settings - Fork 651
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uses unexpected level of CPU while idle #567
Comments
Could you confirm if you see a reduction when using the ALSA back end directly? IIRC, Rodio has some overhead, that becomes noticeable on less powerful devices. |
I'll try that. If it does reduce overhead, would you recommend building the Alpine package with the ALSA backend across the board? That's the package build script did before I took it over, but it was building a git snapshot from 2018. |
Some more context #277 (comment) |
I have rebuilt with the Alsa backend and confirmed that it idles without CPU. It looks like RustAudio/rodio#299 may be the relevant Rodio issue tracking this. On the package build: I've taken over maintaining the package in the Alpine testing repos, and would like to provide a generally-useful build for Alpine users generally. It seems that at least on the I see a few options:
|
You could always build in both back-ends, and let users choose? |
Thanks! Didn't realize that was possible. Will give it a try. |
Since the root cause of this seems to be a Rodio issue, I am fine with this issue being closed if that's what project maintainers want to do. Not closing it myself in case you want to leave it open to check librespot's cpu usage after rodio addresses the problem (if they do). |
Looking over that issue, rodeo appears to return a |
If my foggy memory serves me right, @willstott101 was also exploring ditching Rodio, and using EDIT: bingo! #317 (comment) |
We're seriously considering switching from Rodio to cpal, with some initial code already proposed. For now I'll be closing this issue. The buffering on Rodio-on-Alsa is indeed not so great, so better to use the direct |
I am noticing an unexpectedly high level of CPU usage in librespot while it is idle. This is with Librespot 0.1.3 built in release mode with the Rodio backend (from the Alpine package).
On my Raspberry Pi Zero W, with a single-core 1GHz ARM processor (Broadcom 2835, ARMv6 ISA) and a HiFiBerry DAC Zero hat, the librespot process is constantly using 12-14% CPU. An
strace
indicates that it's receiving messages from various machines on the local LAN, but not a large number of them (one ever 5 seconds or so). During playback CPU usage is about 30%.I don't know what is going on with this, but it doesn't seem like an idle music player should use so much CPU.
The text was updated successfully, but these errors were encountered: