-
-
Notifications
You must be signed in to change notification settings - Fork 503
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
Raspberry Pi | Booting from USB causes load average to be 1.0. Fix proposed. #4602
Comments
Indeed this is a default behaviour of Raspberry OS to constantly search for a SD card even if booted from USB. And DietPi is a scripts on top of Raspberry OS, means it's behaving same. @MichaIng |
Totally makes sense. I wasn't aware that the induced load is THAT extreme and it looks like there must be something done firmware-wise. Especially, since I guess no one inserts an SD card while the Pi is running, so it doesn't make sense at all to continue polling that slot in any frequency near or inducing measurable CPU load. Where did you find the fix, i.e. do you have some Raspberry Pi forum of GitHub link where this is discussed? |
this fit's the behaviour of the blinking green LED raspberrypi/rpi-eeprom#147 I noticed similar on my RPi's booting from USB but simply turned of the LED 🤣 plus on older issue raspberrypi/linux#3286 https://cohob.de/raspberry-pi-hohe-cpu-auslastung-durch-kworker |
I wonder if polling the SD card is even reasonable when booting from SD card. I mean one does not remove it from a running system, else havoc in any case. So probably we should ship this by default. I'll test if it works fine here when booting from SD card. https://github.com/raspberrypi/firmware/blob/e83f413/boot/overlays/README#L223
Not sure how multiple cards would be used on a Raspberry Pi with a single slot only? 🤣 |
Probably you could insert a SD card while the system is already running and booted from USB. Disabling the polling would make this unusable. But to be honest I never heard somebody was exchanging SD cards or even enter one during operation. Or are there SD cards who will take longer to become available and the polling will ensure them to be mounted correctly? Strange option 🤔 |
Same thought here. If you boot from USB already, why the hack would you continue using micro SD cards at all? But more and more users switch to USB boot and having a core constantly fully loaded is a real problem, also from heat and power consumption point of view. SD card boot btw works pretty fine and with same speed with the option applied. |
Disabled by default from now on (new images): e662281 Shall we check for any present SD card on next update and in case offer to have the option added? The following should be a reliable command to detect whether any lsblk -nro NAME |
I just started googling High CPU on idle, then added the USB boot and found some threads relating Kworker CPU (https://www.raspberrypi.org/forums/viewtopic.php?p=1775887#p1775887) I finally hit this page: https://jamesachambers.com/raspberry-pi-reclaim-1-cpu-usage-when-ssd-msd-booting/ which references the new overlay dtparam=sd_poll_once, and the old way with dtoverlay=sdtweak,poll_once=on. |
Wow clearly you both got it sorted. I hadn´t noticed that this also relates to the LED blinking (I have my rpi in a case). |
Actually a good idea and an improved for our users. |
@MichaIng |
Done: addadee |
Creating a bug report/issue
Required Information
cat /boot/dietpi/.version
G_DIETPI_VERSION_CORE=7
G_DIETPI_VERSION_SUB=4
G_DIETPI_VERSION_RC=2
G_GITBRANCH='master'
G_GITOWNER='MichaIng'
G_LIVE_PATCH_STATUS[0]='not applied'
Linux DietPiUK-pihole 5.10.17-v8+ #1421 SMP PREEMPT Thu May 27 14:01:37 BST 2021 aarch64 GNU/Linux
Additional Information (if applicable)
Steps to reproduce
Expected behaviour
Actual behaviour
Extra details
dtparam=sd_poll_once
on the last line of/boot/config.txt
. Would like to propose that it is added on future releases (or at least investigate and consider it when you can).WITHOUT FIX:
WITH FIX:
Thanks.
The text was updated successfully, but these errors were encountered: