[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] Raspberry Pi 3 - server crashes above 65% CPU



Not EXACTLY what you're looking for, but after failing to get Supernova working, I've used all 4 cores on my linux laptop before without Supernova by running 2 servers. 

I have a quad-core chip, so two of the cores are "virtual" - I'm not clear on what that means, but I am able to hit 100% cpu usage with just 2 servers. Experimentally, I don't go much higher than 70-80% overall usage, as it tends to cause audio glitches if I go any higher.

Depending on your setup, maybe you could do something similar. You could send each new note to an alternating server, or you could run different "instruments" on two servers. You could have one server's output passed to another via jackd. You can receive messages in one sclang which could figure out the load balancing to your heart's content.

What you CAN'T do is share buffers or transparently re-order nodes between servers.

Hope someone figures out Supernova, or this helps in the meantime! <3


On Thu, Jan 11, 2018 at 7:03 AM, <mott@xxxxxxxxxx> wrote:
Thanks a lot Frederik. I should have thought of trying the built-in audio. With the built-in I can run the program at up to 100% CPU with no crash, just lots of dropouts, so it must be a hardware problem associated with the USB card and I'll try and isolate the exact issue. I wasn't aware of the GPU adjustment either so I set the GPU to 2Mb.

Would still like to make use of all 4 cores. If anyone knows about running Supernova on the Pi, please respond.

All the best!

Iain



Em 10/01/2018 21:41, f@xxxxxxxxxxxxxxxxxxx escreveu:
hi,
it sounds a bit strange that the server crashes at around 65%.  in my experience one can go higher and when overload you normally start hearing dropouts and crackles (xruns). the server can even take that for a while and recover if the load decreases.  seldom does the server totally crash.  i think sclang and jack more often locks up first.

i'd try to figure this out by writing a synthdef that eats a lot of cpu (a static one - not spawning many new synths from sclang).  leave it running for a while and then add another one.  how high can you go in server cpu?
do you get roughly the same performance when using the pi's internal audio vs the external usb card?

if you can push you test synthdef much higher and up toward 100% with both audio cards then it's more likely a problem with your sc code.  are you passing a lot of data between sclang and scsynth?  network clogged up?
or doing something that eats up ram?  (did you minimise gpu memory to give a bit more ram to the cpu under raspi-config -> advanced?)

overheating can be ruled out by temporarily adding a spare computer fan blowing over the board and see if it takes longer time until crash.  heatsinks might help but i doubt this a heat issue if it is only sc crashing.  also try with another power supply and other usb cables.  bad usb cables / supplies can cause a voltage drop and then the system might crash/glitch or power to external usb devices drop when the pi itself is drawing a lot of current.

sorry, don't know if supernova could help or if it is at all possible to install on a pi.
good luck,
_f

10 jan. 2018 kl. 22:10 skrev mott@xxxxxxxxxx:

Hello list,

I'm doing some experiments running a project on a Raspberry Pi 3, for which I built SC from source using the instructions here: http://supercollider.github.io/development/building-raspberrypi

It's running OK, however once the CPU rises above 65% capacity, the server crashes and scsynth needs to be killed off before the code can be run again. There are usually no error messages. Sometimes the following is printed before the crash:

JackEngine::XRun: client = SuperCollider was not finished, state = Running
JackAudioDriver::ProcessGraphAsyncMaster: Process error

And after the crash, the command: s.avgCPU  yields a static result, so I assume that it is the server that has crashed.

Firstly, is this to be expected?

The CPU is set to "performance" mode and I'm running the code from the command line, without scide/emacs. The jack set up is:

/usr/local/bin/jackd -P75 -dalsa -dhw:1 -r44100 -p1024 -n3

This has as large a latency as I'd wish to use on this particular project. Sometimes I can run a program for hours at -p1024, other times, for no apparent reason I need to put 2048 to run something a bit heavy. Temperature of the board?

At the moment I'm using a Behringer UCA222 USB interface. Without a powered hub the server crashed at around 35 or 45%. I have an stereo "injector sound card" on order. This sits right on the board and doesn't require additional power. It capable of very low latencies apparently and I hope it will help.

The other question I wanted to ask is, might supernova be solution? It didn't get built with the instructions cited above, so I don't know if it can be run on a Raspi 3. Using the "nmon" utility, I see that SC is using only one of the 4 cores.

I'd be grateful for any suggestions you can send.

All the best!

Iain

--
_________
Iain Mott
http://escuta.org


_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/

   #|
      fredrikolofsson.com     musicalfieldsforever.com
   |#


_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/

--
_________
Iain Mott
http://escuta.org


_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/