Actually i'm not using cloudlinux. Only cgroups
Its simple. Install cgroups: yum install libcgroup
Here is my limit for apache:
/etc/cgconfig.conf
mount {
cpuset = /cgroup/cpuset;
cpu = /cgroup/cpu;
cpuacct = /cgroup/cpuacct;
}
group apache {
cpu {
cpu.cfs_quota_us="25000";
cpu.cfs_period_us="10000";
}
cpuacct {
cpuacct.usage="0";
}
cpuset {
cpuset.cpus="0,1,2,3,4,5,6,7";
}
}
/etc/cgrules.conf
apache cpu,cpuacct,cpuset apache/
/etc/init.d/cgconfig start
/etc/init.d/cgred start
This conf limit my apache at 250% and allow to use 8 cpu cores