Thanks to Jesper Frank Nemholt for his swift and detailed reply on this one.
The answer was the round_robin_switch_rate kernel param. See below:
I wrote:
Another question has surfaced related to my last question and summary on
vmstat for a GS140 running Tru64 4.0f. However this one is related to the
default time slice a process gets on the CPU. How can I change this time
slice to allow a potentially compute bound process more time on the CPU. I
don't want to change it to real time as there are other processes which also
need to benefit from a longer slice. But overall I have an application that
appears to read data in, crunch it around for an eternity in memory and then
spit it out - so it sounds like a potential candidate for a longer fix of
CPU.
Can I change this via sysconfig or dbx to patch the kernel. Or do I have to
get into using the class scheduler - if so is there a good article or
reference docs I can go to and get some detailed info.
Jesper wrote:
man sys_attrs_proc
Look for the parameter round_robin_switch_rate :
round_robin_switch_rate
A value that determines (per second of CPU time) the number of context
switches that can occur between processes with the same priority and
the timeslice allotted to each process.
Default value: 0 (100 context switches per second)
Minimum value: 0
Maximum value: hz
The system uses the following formula to compute timeslice:
timeslice = hz / number_context_switches
The hz value is the timer interrupt frequency (hertz) for one second
of
CPU time. This value is dependent on hardware and is typically 1024
or
1200. (To determine the hz value on a particular system, programmers
can use the getsysinfo() call with GSI_CLK_TCK as the op parameter.)
If round_robin_switch_rate is either 0 (zero) or greater than hz, the
system uses 100 for number_context_switches. For example, if hz is
1024, the resulting timeslice is 10 milliseconds, and if hz is 1200,
the resulting timeslice is 12 milliseconds:
timeslice = 1024 / 100 = 10
timeslice = 1200 / 100 = 12
If round_robin_switch_rate is greater than zero and less than or equal
to hz, then number_context_switches is set to round_robin_switch_rate.
For example, changing round_robin_switch_rate from 0 to 20 decreases
the number of context switches and increases timeslice by a factor of
five:
timeslice = 1024 / 20 = 51
timeslice = 1200 / 20 = 60
Context switching carries a certain amount of CPU overhead. If a CPU
consistently handles many large jobs that do not complete quickly, a
larger timeslice (and fewer context switches) may improve throughput.
However, the tradeoff is reduced response time for any interactive
processes that the CPU handles.
Received on Tue Jun 26 2001 - 08:40:57 NZST