On Thu, Feb 17, 2011 at 10:53:54PM +0100, Robin Gareus wrote:
/proc/sys/kernel/sched_rt_runtime_us
/proc/sys/kernel/sched_rt_period_us
I've been told than on OSX, when a process
runs in realtime, it is only allowed
to use a certain ratio of CPU time. And if it goes over this limit, it loses its
priority. Is there something comparable on Linux? Maybe with the files in
/proc/sys that you mention?
not exactly. /proc kernel.sched_rt_runtime_us globally limits realtime
scheduling time. To limit it per process you'll need cgroups.
Still this provides protection against any RT-process that goes
out of control. If the limit is exceeded, all RT procs will be
blocked for the next sched_rt_period_us (default seems to be 1s),
which should give you the opportunity to kill the offending process.
There seem to be some restrictions on runtime / period, this must
be between 0.95 and 1.00 or zero. Which means that in order to adjust
period you first need to set runtime to zero, then adjust period, then
reset runtime to a value within the accepted range.
--
FA