[Beowulf] How to restrict CPU usage (kindly solve this)

Mark Hahn hahn at physics.mcmaster.ca
Mon Aug 2 09:35:48 PDT 2004


> i have made a 4 node cluster now how to restrict CPU usage of a particular
> node i.e. if i want node 2's CPU not to exceed 70% usage.........  

Linux doesn't do that.  and I suspect it's not really what you want - 
what actual problem are you trying to solve?

you could pretty easily write a daemon that fiddled with the cpu affinity
maps (for interrupts and processes), and accomplished something close.
but the 70% is somewhat nonsensical unless you do something crude like 
run one process bound to the CPU and use SIGSTOP/CONT to timeslice it
at .7 duty cycle.  (in the Linux approach, exotic requirements like this
are and should be delegated to user-space, not put into the kernel.)

there are some obscure and probably disused patches which might go in 
these directions, such as hacks to the scheduler.  I suspect you should
explain what your goal is, rather than the solution you have jumped to.

this also has very little to do with beowulfry.

regards, mark hahn.




More information about the Beowulf mailing list