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?Thanks!
Limit process resource consumption in CentOS 5 (2.6.18 kernel)
linux;centos;process;virtual machine;container
Some of these resources can be limited via the pam_limits module.  This primary documentation for this can be found in:man limits.confThe 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:cpumemlockcoreThere 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