User: Password:
Subscribe / Log in / New account

JACK and RT cgroups

From:  Dhaval Giani <>
Subject:  JACK and RT cgroups
Date:  Wed, 15 Dec 2010 18:33:44 +0100
Message-ID:  <>
Cc:  Jan Safranek <>, Giacomo Bagnoli <>, Balbir Singh <>
Archive-link:  Article

[Sorry for the resend. Did not realize the list is subscriber only]

Hey there,

I have been pointed out to .

As a set of instructions,

No, setting up a new cgroup is not hard, and does *not* involve
concepts beyond a regular user. If you mess around with configuration
files, it is quite easy. Now, more likely than not, the systems that
exhibit this issue are having libcgroup installed. With libcgroup, we
create a default cgroup to trap every process in. At the time of
design, we did not look at trapping real time processes, so we did not
assign any realtime time to the default group. Now, I am not inclined
to change that because JACK is a special case and in most cases normal
users should not be launching rt processes and in case there is
someone else, they can explicitly provide those powers.

Now, coming to the question of what a normal user can do to resolve
this problem, there are three solutions for this problem,
a. Disable the default group from being created (I do not really recommend this)
b. Assign some rt_runtime to the default cgroup.
c. Have a jack cgroup and have the jack process moved there. (the most
complex, but I recommend this one for obvious benefits)

To do a)

in /etc/sysconfig/cgconfig add a line, CREATE_DEFAULT=no

To do b)

in /etc/cgconfig.conf

add in
group sysdefault {
 cpu {
cpu.rt_runtime_us = 500000;
uid = root;
gid = root;
admin {
uid =root;
gid = root;

(forgive the formatting, I am missing my regular mailclient for gmail)

c. This is a bit complex, first you will need to define the jack group
in cgconfig.conf (like we defined sysdefault, with the owner being the
jack user))
Then add a line in /etc/cgrules.conf
<jack_user>:<jack_process_name> cpu <jack_group>

jack_process_name should be the parent process.

Setup cgred to startup at startup, and it should then move the jack
process to the right cgroup when it starts up (and I am assuming that
the jack_process will fork the new rt process).

Hope this helps, and do let me know if I can help more.


(Log in to post comments)

Copyright © 2010, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds