Skip to content
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

Stuttering performance on RPi 3B+ #18

Open
twstokes opened this issue Nov 28, 2021 · 0 comments
Open

Stuttering performance on RPi 3B+ #18

twstokes opened this issue Nov 28, 2021 · 0 comments

Comments

@twstokes
Copy link

I had a difficult time troubleshooting intermittent animation stutters on my RPi 3B+ and wanted to share some findings.

To reproduce:

Prerequisites: Animated Snake Eyes Bonnet for Raspberry Pi, RPi 3B+, 2x 240x240 IPS displays

  1. Clean install 2021-05-07 "Buster" armhf image of Raspberry Pi OS Lite
  2. Install the script from the tutorial
  3. Observe that at times the frame rate will drop to ~1FPS and CPU utilization for eyes.py will climb to ~100%

I found that when eyes.py or fbx2 run on core 0, CPU utilization skyrockets. I could monitor this in real time by running top and adding the "Last used CPU" column. I could also consistently reproduce the issue if I used taskset to pin these processes on core 0 (if both are on core 0, they'll split full utilization, if one is on core 0 it'll hit 100%).

I was able to get consistently smooth animations by forcing the CPU affinity for these processes to cores 1-3 (excluding 0).

My paths differ from the install script, but this was my solution using taskset. The e mask includes cores 1-3.

taskset e /home/pi/robot/eyes/Pi_Eyes/fbx2 -i &
cd /home/pi/robot/eyes/Pi_Eyes;taskset e python3 eyes.py --radius 240 &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant