Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is is possible to limit the usage of resources (cpu, memory etc) based on aggregated and not per process resource usage?

For example I would like to say all processes combined cannot exceed 90% memory/cpu usage, but don't include ssh (so that I can log in to fix the problem).

This would prevent both resource starvation and under-utilisation.

Am I missing something obvious? Is the question wrong to begin with?!

Thanks in advance

share|improve this question

Kernel 2.6 includes a feature called cpuset. With it you can partition services to separate pools, each having their own restrictions such as "processes belonging to this cpuset can only use cores 1-4".

In addition to CPU you can also control memory usage with cpuset -- take a look at its man page.

So, just create an own cpuset partition to your web server processes, database processes and whatnot and another for ssh and other system processes you'd like to keep available all the time.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.