# setting realtime resources with cgroups

## VanFanel

Hello there 

Reading the info for kernel option RT_GROUP_SCHED, I find this:

 *Quote:*   

> 
> 
> CONFIG_RT_GROUP_SCHED:                                                  |  
> 
>   |                                                                         |  
> ...

 

Great, so how do I schedule realtime tasks for non-root users? My kernel has this feature enabled, so, for example, let's say I'd like to run MAME with realtime priority or, at least, take almost every cpu resource for itself (and the associated tesks in the same cgroup, of couse). How can I do it? What's the command?

I am on 2.6.39 and automatic cgroups are enabled in my kernel.

thanks!

----------

## SLBMEH

I don't know if you can do it with automatic cgroups... You need to change the file and directory permissions of the cgroup filesystem to allow a user to assign tasks to a cgroup's allocated bandwith...

----------

## VanFanel

I believe automatic cgroups is "automatic" in the sense of creating the cgroups by groupink tasks by user. Hence it would be possible to elevate a cgroup's bandwith, if one has root permissions. 

But I don't know how to archieve that, and those features aren't very well documented

----------

## SLBMEH

I have never seen any documentation for automatic.  Grouping all tasks kind of defeats the purpose of a rt scheduler to an extent.  There would still be some benefits of rt scheduling stability.  Perhaps it manages the cgroup pseudofilesystem structure...  Does cpuset have anything to do with the configuration or is that it's own separate thing?  If you have the permissions to the tree where you want to reassign a task you can switch it.  I think I'm going to read the source code to see what automatic actually does.  AFAIK everything else is configured and works similar to the /proc filesystem...

----------

## VanFanel

Ok, please tell me what you find out. My idea would be to rise CPU bandwidth of a given set of tasks (an user's automatically created cgroup, for example).

----------

