[LAU] realtime priority - FIFO vs Round Robin and scheduling

Jeremy Jongepier jeremy at autostatic.com
Tue May 24 13:19:44 UTC 2016


Hello Luka,

> i've been strugling with XRUNS and glitches on a machine using Renoise,
> SuperCollider and Processing. i wrote a question also on Renoise forum,
> but everything boils down to this:
> 
> Renoise seems to be running some threads with FIFO scheduler with a
> priority that is _below_ that of JACK and firewire driver (correct
> right?), but ALSO some threads using Round Robin scheduler with VERY
> HIGH RT priority of 95.

Do you have any idea where this is being set? Or what is setting this?

 my question is if this is a possible cause for
> glitches and XRUNS? the priority of 95 is above realtime clock (RTC)
> and firewire irq!

If Renoise is using a lot of CPU cycles I reckon it could preempt other
processes with a lower rtprio. But I'm not a Renoise user and I don't
know the specs of your workstation.

 i wonder if Round Robin scheduler isn't somewhat less
> stressful for the system and FIFO threads would still have priority?

Afaik it's the rtprio that counts, not the scheduler. The scheduler only
matters if processes have the same rtprio, in that case SCHED_FIFO
processes apparently do not preempt SCHED_RR ones.

> 
> PRI RTPRIO CLS   PID  NI CMD
> 135     95  RR  2255   - renoise
> 135     95  RR  2255   - renoise
> 130     90  FF   114   - [irq/8-rtc0]
> 125     85  FF   200   - [irq/20-firewire]
> 106     66  FF  2583   - jackd -R -P 60 -d firewire -r 44100 -p 128 -n 3
> 
> so i'm asking Renoise guys if they know anything about it.
> 
> to test, is there a way to start a process and force to use different
> scheduler AND/OR change priority?

Yes, you can do that with chrt:

chrt -f -p 2255 80

This will set the scheduler to SCHED_FIFO for pid 2255 and sets rtprio
80 for it.

Jeremy

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.linuxaudio.org/pipermail/linux-audio-user/attachments/20160524/2cd66369/attachment.pgp>


More information about the Linux-audio-user mailing list