Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > T

timeslice(5)

Tunable Kernel Parameters
HP-UX 11i Version 3: February 2007
» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

NAME

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.

Who Is Expected to Change This Tunable?

Anyone.

Restrictions on Changing

Changes to this tunable take effect at the next reboot.

When Should the Value of This Tunable Be Raised?

Since the timeslice tunable is globally applicable to all threads (except sched_fifo) in the system, irrespective of their scheduling policies and priorities. Any increase in value of this tunable will give equal time quantum boost to all threads.

If the system has too many context switches due to preemptions, caused by higher priority threads, you can raise the value to provide more time for lower priority threads to execute when they get scheduled, because higher priority threads will preempt the lower priority threads when they become runnable.

What Are the Side Effects of Raising the Value?

Raising the value of the timeslice tunable may cause starvation of some threads, as they have to wait longer for their turn to execute. This may cause performance throughput issues.

When Should the Value of This Tunable Be Lowered?

The timeslice tunable value should be lowered if better turnaround in response time is required at the cost of additional context switches. When the system does not have too many compute intensive applications, threads will block and preempt much more frequently without utilizing their complete time quantum.

What Are the Side Effects of Lowering the Value?

The lowering of the timeslice tunable will result in many more context switches which will increase the time spent in SYSTEM space and less time spent in USER space. Also, the applications that are compute intensive will suffer performance degradation.

What Other Tunable Values Should Be Changed at the Same Time?

None.

WARNINGS

All HP-UX kernel tunable parameters are release specific. This parameter may be removed or have its meaning changed in future releases of HP-UX.

Installation of optional kernel software, from HP or other vendors, may cause changes to tunable parameter values. After installation, some tunable parameters may no longer be at the default or recommended values. For information about the effects of installation on tunable values, consult the documentation for the kernel software being installed. For information about optional kernel software that was factory installed on your system, see HP-UX Release Notes at http://docs.hp.com.

AUTHOR

timeslice was developed by HP.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2007 Hewlett-Packard Development Company, L.P.