[LAU] Trouble Setting Realtime Priorities with set_rlimits

Chuck Martin v4o42wl02 at sneakemail.com
Fri Oct 7 18:57:44 UTC 2011


I'm having a problem getting realtime priorities working, and I'm wondering
if anyone has any suggestions.  I'm running Slackware, which doesn't use
PAM, so I'm starting everything with the set_rlimits command.  I thought I
had it working once, but the next time I booted the system, I couldn't get
it working again, and I'm not sure what has changed in the meantime.  I'm
still in the process of compiling and installing things, so I might have
changed something, but I'm not sure what.  Here's what I have in the
/etc/set_rlimits.conf file for jackd and qjackctl, for example:

@audio          /usr/bin/jackd          nice=40         rtprio=70       memlock=262144
@audio          /usr/bin/qjackctl       nice=40         rtprio=70       memlock=524288

After starting qjackctl, which in turn starts jackd, checking my realtime
priorities shows this:

chuck at lambda:~% ps -eo pid,rtprio,cls,cmd | grep jack
16524      -  TS /usr/bin/qjackctl -p HDA
16531      -  TS /usr/bin/jackd -v -P70 -t2000 -dalsa -dhw:Intel -r48000 -p1024 -n2 -Xseq -i2 -o2 -I1 -O1
30333      -  TS grep jack

This is with the laptop's internal sound card, but I get the same results
with my RME Multiface (except that the -d, -i, and -o options to jackd are
different, of course).  I can change the realtime priority with chrt,
but I shouldn't have to.  That should be taken care of by set_rlimits.

As an experiment, I added this to the configuration file:

@audio          /bin/zsh                nice=40         rtprio=99       memlock=5000000

I then get the following results with zsh (I also tried with bash, with
the same results, but a slightly different output format):

chuck at lambda:~% ulimit -erl
-l: locked-in-memory size (kb) 64
-e: max nice                   0
-r: max rt priority            0
chuck at lambda:~% set_rlimits zsh -i
chuck at lambda:~% ulimit -erl
-l: locked-in-memory size (kb) 5000000
-e: max nice                   40
-r: max rt priority            99
chuck at lambda:~% ps -eo pid,rtprio,cls,cmd | grep 'zsh -i'
30359      -  TS /bin/zsh -i
30367      -  TS grep zsh -i

It looks like set_rlimits is working until I look at the realtime priority
with ps.  What am I doing wrong?  I might add that the priorities being
set for the IRQs by rtirq are being set correctly, but of course rtirq
uses chrt.  All this is with a realtime kernel, of course:

chuck at lambda:~% uname -srv
Linux 3.0.1-rt11 #1 SMP PREEMPT RT Wed Aug 24 05:48:12 EDT 2011



More information about the Linux-audio-user mailing list