Need to allocate a limited resources to a user/process
Hi!
We are using RHEL 5.2 on our dual 8 core Xeon servers. I need to allocate limited resources to a user/process. If a non-root user executes a program then user/process should not consume more resources than allocated to him. And if a root user or sudo user executes a program/process then also we would like to limit the resources for that program/process. I have tried to search for the same on Linuxquestions forum but haven't found this kind of question, so I don't know that this can be possible or not on a Linux based machine. Please help me know if this can be done and if yes then how, which tool/utility can be used. Note: We are not using any Virtual Machine so that limited resources can be allocated to a VM. We need to do it native OS installed RHEL 5.2 we some users on it. Cheers... Thanks & Regards PK |
You might be able to do what you want with the ulimit command. You would set up the ulimit command in each user's startup bashrc or profile. To get an idea of what resources ulimit can regulate enter these sommands:
ulimit -a man ulimit -------------------- Steve Stites |
http://www.kernel.org/pub/linux/libs...am_limits.html
http://www.linuxtopia.org/online_boo...ing_Users.html these links should be what you're looking for. |
thanks for the reply
Hi jailbait and prik420 !
Thanks for the guide, as i go through both ulimit and Pam limit.conf options. It seems that I am able to control a lot of resources. But I am not able to find any option under ulimit and Pam limit.conf which can bind a process to a single CPU on multicore/multiprocessor systems. Yesterday I did some google and found we can use CPU affinity for this. We can assign affinity for a process so that it stays only on that processor. There are two types of CPU affinity. A quick how to is on : http://www.cyberciti.biz/tips/settin...r-process.html As per this how to, we can assign affinity to processes and for that we need to know the PID of the process, what to do to define affinity to a user so that what ever process a user executes it gets bind to a speficified processor. Thanks & Regards, PK |
In the past I have used cpusets - now supplanted by cgroups. If you have a (reasonably) recent kernel source tree have a look at ../Documentation/cgroups.txt, else ../Documentation/cpusets.txt will give you the idea.
|
All times are GMT -5. The time now is 07:29 AM. |