Operating System - HP-UX
1827790 Members
2980 Online
109969 Solutions
New Discussion

Re: Limit the system resource utilization

 
ivychung2
Frequent Advisor

Limit the system resource utilization

I want to limit the max. resource ( eg. CPU , memory ) that the user can use , for exampe , userA can max. use 20M memory and 30% CPU only , userB can max. use 50M memory and 50% CPU only , is it possible ? thx.

10 REPLIES 10
rayche
Frequent Advisor

Re: Limit the system resource utilization

I think we cannot limit CPU,memory. to resource, we just can limit disk's usage.
A. Clay Stephenson
Acclaimed Contributor

Re: Limit the system resource utilization

You need a product called Workload Manager; it's not free.

http://h20293.www2.hp.com/portal/swdepot/displayProductsList.do?category=ISS
If it ain't broke, I can fix that.
Marc Ahrendt
Super Advisor

Re: Limit the system resource utilization

i think regarding multiple CPUs you could consider the CPU affinity call mpctl() ...haven't really messed with it though, but remember something about restricting certain processes to certain CPUs and that mpctl is called by the application/process itself
hola
Alzhy
Honored Contributor

Re: Limit the system resource utilization

Peace and Clean Air!

If you are running Enterprise OE (i.e. rp8420 or SuperDome) - you should already have PRM (Process Resource Manager) - it's easy to use.

Set up X, run /opt/prm/bin/xprm ...

Hakuna Matata.
ivychung2
Frequent Advisor

Re: Limit the system resource utilization

Thx all replies ,

I have a case , in the system , there are some large files ( over 5G size ) , the user always use "vi" to read the file , then the system will be hang , I know it is very stupid to direct read the whole file , but the user do , so I would like to control the max. of resource they can use. in the above case , no bulit-in function that can control it ? thx
A. Clay Stephenson
Acclaimed Contributor

Re: Limit the system resource utilization

You should be able to limit the size file that he is able to vi by putting a ulimit -d in his .profile. This will limit vi's internal buffer.
If it ain't broke, I can fix that.
ivychung2
Frequent Advisor

Re: Limit the system resource utilization

thx reply ,

If I set the ulimit in the user profile , is it limit the resource that the user can use for all applications ? if yes , if I want to limit the user can use 10M memory only , is it ok ? could advise how to set it ? thx
RAC_1
Honored Contributor

Re: Limit the system resource utilization

ulimit -d will limit data size to whatever you specify. That is applicable to all programs/processes he will start.

man sh-posix, man ulimit for details.
There is no substitute to HARDWORK
A. Clay Stephenson
Acclaimed Contributor

Re: Limit the system resource utilization

You could also create a wrapper for vi so that it does a ulimit -d and then starts the "real" vi.
If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: Limit the system resource utilization

By the way, the real way to fix a user editing a 5GB file is to use a baseball bat on the user's head. I would say that about 1 whack is equivalent to 10MB so you do the math.
If it ain't broke, I can fix that.