System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

timeslice numerator and denominator

SOLVED
Go to solution
Michael Steele_2
Honored Contributor

timeslice numerator and denominator

What are the meanings of the two numbers given in the timeslice kernel parameter? A process has the CPU for 10 mil secs in this setting? What is the 100 for?

# kmtune -q timeslice -l | more
Parameter: timeslice
Value: (100/10)
Default: (100/10)
Minimum: -
Module:

Support Fatherhood - Stop Family Law
4 REPLIES
Jeff Schussele
Honored Contributor
Solution

Re: timeslice numerator and denominator

Hi Frederick,

The 100 is a HZ or hertz value.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Michael Steele_2
Honored Contributor

Re: timeslice numerator and denominator

So..., the process has the cpu for 100 hertz? ?????
Support Fatherhood - Stop Family Law
Jeff Schussele
Honored Contributor

Re: timeslice numerator and denominator

Hi (again) Frederick,

Well, not really.

Quoting from the man pg

http://docs.hp.com/cgi-
bin/fsearch/framedisplay?top=/hpux/onlinedocs/TKP-90202/TKP-90202_top.html&con=/hpux/onlinedocs/TKP-90202/00/01/165-con.html&toc=/hpux/onlinedocs/TKP-90202/00/01/165-toc.html&searchterms=timeslice&queryid=20020911-105812

\Quote
timeslice - scheduling interval in clock ticks per second
--------------------------------------------------------------------------------
VALUES
Failsafe
(HZ/10)
Where HZ defines the number of clock ticks per second for which the system is configured.

Default
(HZ/10)
Where HZ is equal to 100.

Allowed values
Any value in the range of -1 to 2147483647 is allowed.
A value of -1 indicates no timeslice based scheduling preemption, and threads will continue to run until they voluntarily switch out or higher priority threads preempt them.

Recommended values
Use the default value in normal cases. In special cases where quicker round robin scheduling is required, a value of 1 may be used. However, a change in value may have a direct impact on system performance. Customers must evaluate performance impact in their workload environment before changing the value on production systems.

DESCRIPTION

The timeslice tunable defines the scheduling time interval that a thread may execute on a processor before the kernel scheduler will context switch out the thread for other same priority threads to run. When a thread starts executing on a processor, the thread is set up to run for the number of ticks in the timeslice tunable. On every clock interrupt that a thread is found executing, the time quantum balance for the thread is decremented, and when the balance reaches zero, the thread is context switched out.
The timeslice value controls one method of user preemption that the operating system implements. A larger value will reduce preemption of running threads; however, there are other reasons for user preemption of threads, and the timeslice tunable has no control there.

A change in the timeslice value may have direct impact on system throughput and response times. A very small value may result in too many context switches, and a very large value may result in the starvation of runnable threads.

\ENDQUOTE


It's basically a formula - in this case 10 or 100/10. But the actual clock speed of the system will determine how much actual time a thread can continue to run. In the default case a process will get 10 ticks of whatever the clock speed of the CPU is.
The faster the CPU the less *actual* time a thread gets - the slower the more time.
So you can see why 1 is NEVER recommended.

Rgds,
Jeff


PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Michael Steele_2
Honored Contributor

Re: timeslice numerator and denominator

.
Support Fatherhood - Stop Family Law