-
Notifications
You must be signed in to change notification settings - Fork 68
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 Zero WH maxes out at 100% constantly #46
Comments
This is something that's bugged me for a long time, and I have had a few different debugging sessions with no real improvement. I did the original development work on a Pi 3 and like you found it to be a lot smoother, but had to sacrifice the performance for the convenient form factor of the Zero. However with the recent release of the Zero 2 I am hoping we can have the best of both worlds! I have one arriving in a few days and will put it to work in my sign when I get a chance. |
I've got one coming next week as well. What device would it be under in Balena Cloud? |
I have a zero 2 and am seeing 78 - 82% CPU utilisation. I'm running the python code directly as it doesn't seem to be supported under Balena Cloud as yet. |
We're still working on adding the device type to balenaCloud but it shouldn't be too much longer. This is the issue to follow for updates: balena-os/balena-raspberrypi#725 |
@LeePorte what effective frame rate does the code report in the logs when you're running on the Zero 2? |
I've seen highs of 17.91 and lows of 10.86
|
Excellent - might give that a try while I'm waiting for the device type to appear on BalenaCloud (physical device arrived today). |
If it would help I can post up the systemd service file. |
Exellent - if you can! |
Here's my service file to use as a base
|
Perfect - thank you. I'll give it a go later tonight on the Zero2 and let you know how I get on. |
Thanks, @LeePorte - For some reason I couldn't get the service file to work, so instead I edited config.py (I also had to put VERSION in the home directory (I think that was a Path statement thing though - or lack thereof). |
@LeePorte - Odd, I've noticed that this seems to stop running after a while (after 30 mins this morning). I checked using: Anyt thoughts on this? |
I had seen some network timeouts that caused it to die. Though since using the systemd service file, I've not had that issue as it has restart on failure set. I used the following to create and enable the systemd service file
What method did you use to try and install it? |
I seem to remember doing something similar (with nano, though, not vi). |
Nano is fine, use your editor of choice The contents of train-sign.service was the following with some of the details adjusted (<STATION_CODE>, <API_KEY> and <STATION_NAME>) to suit my info.
It might we worth checking your python3 path with |
Yep, I set python3 to run as default and in the script anyway, I call python3 .... Next, if this keeps terminating (which it seems to be OK up to now), I'll try belt and braces in a shell script like this:
Messy, but it looks like it would work :-) |
OK, I got it working as a service now. I'll see how long it stays up. The only difference I used here (and that seemed to get it working) was instead of: Fingers crossed.... |
@mattanorak How's it been holding up? |
Hey @LeePorte @mattanorak since balena now has support for the Pi Zero 2 I wonder if you guys have given it a try? |
I confess i have not. I've been working on the dual display. If I get a chance I'll give it a spin in the next few days. |
Hi - also not had chance to test. I'll see if I can do that this week. I've got a couple of Zero W 2's now and some spare memory cards, so if I get some time I'll give it a whirl. |
Just a heads up guys, I haven't attached a display to my Zero 2 yet but I did try building the project for the Zero 2 and it fails. The way to get it to work at the moment is to set the default device type for the balenaCloud application to the Zero 1 (as you would have done before), then add a Zero 2 to the Zero 1 application. This way the builders build for the 32 bit architecture of the Zero 1 but it still runs on the Zero 2 (64 bit) as it's backward compatible. I will look into the changes necessary to update the project to make it build for 64 bit architectures. |
Scratch that, it should work now due to the workaround in #56 |
@mattanorak what is the performance like now with the latest version? |
@chrisys I've just updated and it's running much faster. Possibly a bit too fast. Though that may just be me being used to how it was before. I'll try and grab a video. |
Must admit I've not tried it in the dashboard for a while, I've been running standalone - I'll plug my spare in and give it a go. |
Here's a video of it running on a PI zero 2W And the resulting htop Definitely much lower resource use |
@LeePorte oh wow that's definitely scrolling too fast for me! We might need to close this issue and start a new one for scrolling speed to fast now - whodathinkit! |
It's much easier to slow things down though! |
Looking in the dashboard, I see that my RPi Zero WH is constantly maxing out at 99-100% CPU and the effective FPS is anywhere from about 2.2 to 2.22 - consequently the refresh on the screen (when text scrolls) is very slow and jumpy rather than smooth as with the Pi3. I also notice that the clock at the bottom sometimes misses a second or catches up after a pause (especially at the time when scrolling begins on the 'calling at' stations).
It could well be that the Pi Zero WH is just not powerful enough for this, but wanted to raise it in case it's something else causing an issue with this device.
This is only for the Pi Zero WH - the Pi3 is fine.
The text was updated successfully, but these errors were encountered: