cpu usage limit

Paul Rubin http
Fri May 27 18:04:39 EDT 2005


"mmf" <mf1987 at arcor.de> writes:
> How can I make sure that a Python process does not use more that 30% of
> the CPU at any time. I only want that the process never uses more, but
> I don't want the process being killed when it reaches the limit (like
> it can be done with resource module).
> 
> Can you help me?

In general you can only do that with a real-time operating system.
Most other OS's will let you adjust process priorities so that you can
prevent your Python process from hogging cycles away from other
processes.  But if the machine is idle and nobody else wants the
cycles, Python will get all of them.



More information about the Python-list mailing list