Am 23.02.2012 19:37, schrieb julius:
> Am 21.02.2012 09:05, schrieb Jan Safranek:
>> On 02/18/2012 12:02 PM, [email protected] wrote:
>>> hi,
>>>
>>> playing around with cgroups on ubuntu 11.10 i ran into the error:
>>>
>>> Cgroup change for PID: 14674, UID: 1000, GID: 1000, PROCNAME:
>>> /usr/bin/rar FAILED! (Error Code: 50002)
>>>
>>>
>>> on the mailing list archives theres a message that says that 50002 is a
>>> permission problem with the tasks file, but my current running user can
>>> write to it and cgrulesengd is running as root.
>>>
>>> i tried to keep the config as minimal as possible but still its not
>>> working. i was expecting the process rar on the second core, but
>>> checking with htop its allowed to use both cores.
>>>
>>>
>>> any ideas whats wrong?
>>>
>>>
>>> /etc/cgconfig
>>>
>>> mount {
>>> cpu = /sys/fs/cgroup/cpu;
>>> cpuset = /sys/fs/cgroup/cpuset;
>>> cpuacct = /sys/fs/cgroup/cpuacct;
>>> devices = /sys/fs/cgroup/devices;
>>> memory = /sys/fs/cgroup/memory;
>>> freezer = /sys/fs/cgroup/freezer;
>>> }
>>>
>>>
>>> group rar {
>>> perm {
>>> task {
>>> uid = dmkcrew;
>>> gid = dmkcrew;
>>> }
>>> admin {
>>> uid = dmkcrew;
>>> gid = dmkcrew;
>>> }
>>> }
>>> cpuset {
>>> cpuset.cpus = 1;
>> You should probably set also cpuset.mems. You cannot place anything in a
>> cpuset cgroup unless it has both cpuset.mems and cpuset.cpus filled.
>>
>> Jan
>>
>
> ok, did that.
> sudo /etc/init.d/cgred stop
> sudo /etc/init.d/cgconfig restart
> cat /sys/fs/cgroup/cpuset/rar/cpuset.mems
> 0
> cat /sys/fs/cgroup/cpuset/rar/cpuset.cpus
> 1
>
>
> still the same 50002 error
>
>
i tried this again on a different system, it worked.
this is the config if somebody finds this posting:
/etc/cgconfig
group lowprio {
perm {
task {
uid = root;
gid = root;
}
admin {
uid = YOURUSER;
gid = YOURUSER;
}
}
cpuset {
cpuset.cpus = 1;
cpuset.mems = 0;
cpuset.cpu_exclusive = 1;
}
}
mount {
cpu = /sys/fs/cgroup/cpu;
cpuset = /sys/fs/cgroup/cpuset;
cpuacct = /sys/fs/cgroup/cpuacct;
devices = /sys/fs/cgroup/devices;
memory = /sys/fs/cgroup/memory;
freezer = /sys/fs/cgroup/freezer;
blkio = /sys/fs/cgroup/blkio;
}
/etc/cgrules
YOURUSER:dd cpuset lowprio/
start two or more dd processes like this:
dd if=/dev/zero of=/dev/null bs=1024k
they are not limited by the harddrive speed only by your processor.
dont forget to change YOURUSER to your username.
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Libcg-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libcg-devel