CPU load on RPi 3B

Just set up SonicPi 3.3.1 (from the official .deb) on a fresh install of Raspberry Pi OS on a RPi 3B I had in the drawer.
Sonic Pi is using abt 50% to 100% CPU when idle according to top with default settings. Is this normal load?
Disabling the scope takes the CPU load down to 10%

I’m running the RPi headless, just VNC. That might be “confusing” the graphics rendering?

Running strace on the process shows it spinning “fast” on the syscalls shown below, repeated EAGAIN. Is this normal?

poll([{fd=5, events=POLLIN}, {fd=6, events=POLLIN}, {fd=9, events=POLLIN}, {fd=21, events=POLLIN}], 4, 813) = 1 ([{fd=5, revents=POLLIN}])
read(5, "\1\0\0\0\0\0\0\0", 16)         = 8
recvmsg(6, {msg_namelen=0}, 0)          = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(6, {msg_namelen=0}, 0)          = -1 EAGAIN (Resource temporarily unavailable)

Investigating /proc/fd// shows that fd 6 is a (unix) socket

1 Like

Hey there @hrafnkelle,

It’s quite possible that the latest version of Sonic Pi is a little bit demanding for a 3B.
Others of us on the core team might have more to say about that.
There are no doubt optimisations that can be made - we’re always interested in outside help if you’re motivated! :grinning_face_with_smiling_eyes:

I’m not sure myself whether VNC would be affecting it.

I have no idea what EAGAIN means either. Perhaps it has to do with Sonic Pi’s method of communicating between its various components over the local network?

1 Like