I want to restrict cpu usage of users to only 25% . For this i am using cgroups.
Here is the guide that I am following : http://kaivanov.blogspot.in/2012/07/setting-up-linux-cgroups-control-groups.html
This guide work with one core cpu machine, but when i am using with the 4 core cpu machine this configuraion doe not work.
Here is my configuration:
# Configuration file generated by cgsnapshot
mount {
cpu = /cgroup/cpu;
}
group test1 {
cpu {
cpu.rt_period_us="1000000";
cpu.rt_runtime_us="0";
cpu.cfs_period_us="100000";
cpu.cfs_quota_us="-1";
cpu.shares="250";
}
}
group test2 {
cpu {
cpu.rt_period_us="1000000";
cpu.rt_runtime_us="0";
cpu.cfs_period_us="100000";
cpu.cfs_quota_us="-1";
cpu.shares="500";
}
}
What i am missing?
Thanks in advance.