Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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

I would like to limit the resource (CPU, Memory, and network bandwidth) consumption of processes on the same server. And it will be good if I can migrate processes from one server to another.

I think I am looking for some light-weight virtualization. I found LXC is a good choice. But our 2.6.18 kernel does not support LXC. It is a shared cluster, so, I am not allowed to upgrade the kernel. And I think the "setrlimit" system call will only send signals to the processes when the budget is reached rather than limit the resource consumption as a virtual machine does (Please correct me if I am wrong). Any recommendation for this task?


share|improve this question
Check out OpenVZ and Linux-VServer – n0pe Dec 15 '11 at 6:54
up vote 1 down vote accepted

Some of these resources can be limited via the pam_limits module. This primary documentation for this can be found in:

man limits.conf

The file which this is configured in is /etc/security/limits.conf on all Red Hat type systems.

More than likely the primary thing to understand is the relationship between hard and soft limits. Additionally, some directives to start looking at are:

  • cpu
  • memlock
  • core

There are examples at the bottom of the man page.

As far as network bandwidth, this is harder to do (but not impossible). The basic idea would be to limit access based on UID via iptables and to run the traffic through tc (traffic control).

man tc
share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.