[X-Unix] limit cpu usage

William H. Magill magill at mcgillsociety.org
Wed Nov 24 20:41:08 PST 2004


On 24 Nov, 2004, at 20:29, Brian Medley wrote:
> I've googled around, but haven't found an answer to this
> question.  I would like to limit the max % cpu a process can
> have.  Something similar to ulimit; however, ulimit only allows
> limiting the number of cpu seconds a job can run.

This is not philosophically possible on a Unix system.

What you want to do is a common resource control feature found in 
Enterprise Class systems like VMS and MVS, but not Unix.

Over the years, there have been any number of companies who have 
written Kernel code to create a "resource management" system for Unix 
-- but they tend to cost big bucks and only run on "mainframe class" 
Unix boxes ... AND, they never really work the way one expects them to 
work anyway.

The reason is a long discussion of Operating System theory, but briefly 
put, Unix simply does not have the "hooks" necessary to implement any 
useful kind of Resource Control.

T.T.F.N.
William H. Magill
# Beige G3 - Rev A motherboard - 768 Meg
# Flat-panel iMac (2.1) 800MHz - Super Drive - 768 Meg
# PWS433a [Alpha 21164 Rev 7.2 (EV56)- 64 Meg]- Tru64 5.1a
# XP1000  [Alpha EV6]
magill at mcgillsociety.org
magill at acm.org
magill at mac.com
whmagill at gmail.com




More information about the X-Unix mailing list