• Hardware
  • 'Safe' CPU level for long-term use

Hi all!

I'm running a complex Pd patch on the Bela, that takes in 3 continuous analog signals, and uses them to control a polyphonic synth.

Recently the Bela/BBB has been crashing - sometimes after little over an hour of use, sometimes after 10 minutes or less.

According to the IDE, my patch tends to use around 48% of CPU, with occasional jolts up to around 51%. It might well be that there are sudden spikes at times when I run the patch for longer periods, but I can't be sure.

Admittedly, the more frequent crashes have occurred during times of warmer weather. But the setup is still prone to crashing in less demanding environments.

I'm trying to optimise my patch as best I can, without losing too much functionality or responsiveness. But before decimating everything, I wanted to ask your advice:

Is a patch running at 48-51% expected to crash the Bela/BBB over the course of a few hours, or is this unusual? Should I focus more on controlling the environment, instead of simplifying the program?

And finally, is there a maximum threshold of CPU% usage you would consider 'safe' and not likely to crash under normal conditions, when running a program for periods of 2-3 hours?

Thank you for all of your help!

P.S. - if I wanted higher performance in the future, would it be possible to use the Bela cape with the BeagleBone enhanced (instead of BBB)? And would you recommend this option?

http://beagleboard.org/enhanced

What do you mean "it crashes"? There is a recent bug where the IDE crashes occasionally , but the program should still run.

Sorry for not clarifying - I mean that the program stops producing an output, while running the BBB/Bela in standalone mode.

I tested the CPU usage of the Pd patch in the IDE, but the rest of the time I'm powering the BBB/Bela from an RS power bank.

To describe the setup: The Bela receives 3 analog inputs, processes them in a Pd patch (which, when tested in the IDE, uses 48-51% of CPU) and outputs audio to an amplifier.

The BBB/Bela is housed in a ventilated plastic container, within a larger flight case; the container leaves plenty of 'breathing room' for the BBB/Bela, and the flight case in turn leaves plenty of 'breathing room' for the container.

I run the setup for around 2 hours at a time. Sometimes, the program will stop responding - that is, it just won't produce any output. This happens often after 1hr of use, and less often after a shorter period of use.

To remedy the problem, I'll usually power down the Bela (using a switch attached to GND/Pin P9-27), then restart. Usually this solves this problem, and I can continue running the program for another hour or so. Occasionally though, the program will crash 3 times or more, and I'll have to quit.

I've noticed that 'crashes' have happened more frequently on warmer days. However, ruling out the environment, is there a 'safe' maximum threshold for CPU usage that will allow me to run a program for 6+ hours a day, in normal conditions? Or am I missing something, and I should turn my attention to another potential cause of this problem?

Thanks again!

What happens to the LEDs on the BeagleBone when the sound stops? If they all keep flashing, can you reconnect to the board without restarting it?

The LEDs always continue flashing, after the sound has stopped.

The problem occurs when I run the Bela in standalone mode for an extended period of time, powering it via the barrel connector with an RS power bank (although I'm going to power it via the mini USB port from now on, after a noise issue discussed here [https://forum.bela.io/d/533-noise-from-audio-output-troubleshooting]).

When I'm out performing, I'm not able to bring my laptop with me, so I haven't ever tried connecting to the BBB when it 'drops out' like this.

I'll try what you suggested and report back; it'll just require me to run the program at home until it crashes. If I can reconnect, is there anything i particular I should be looking for? And in the meantime, what do you suspect the problem might be?

    papa_sangre I'll try what you suggested and report back; it'll just require me to run the program at home until it crashes. If I can reconnect, is there anything i particular I should be looking for? And in the meantime, what do you suspect the problem might be?

    If you open the IDE you should be able to see the log from the program that was running and stopped running. If that does not show anything meaningful (or the log is truncated), then try to run from a terminal:

    ssh root@192.168.7.2 "journalctl -u bela_startup | cat"

    this should show all the log from the program that was running at startup

    Ok nice one, thank you Giulio. I'll run the setup in a controlled environment until the audio drops out, then go through the steps above and report back here.