I'm trying to limit all pids under apache2 by using cpulimit.

I've tried specifically calling each individual pid with:

sudo cpulimit -p 6183 -b -l 20

It tells me it has detected the process, but when I used htop I can see the process going well over 20%.

Why is this, and is there a better way in limiting all of the apache and mysql process without targeting each pid?

有帮助吗?

解决方案

Have you tried cgroups, it allows you to control the CPU usage, amongst other things? http://en.wikipedia.org/wiki/Cgroups. In addition you might see it go over 20% because you have a multi core system.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top