TimeSlicePolicy

Syntax

-XX:TimeSlicePolicy[=PolicyStr]

Description

This option allows you to adjust the time slice policy value.

Parameters

PolicyStr
is the policy string. The values are keyword parameters and case-sensitive. If PolicyStr is omitted, default value is used.
NOTE:

If TimeSlicePolicy option is used, you need not specify the ThreadTimeSlice option.

PolicyStr options

Default
When a thread consumes the time slice without initiating a blocking operation, the time slice policy value is decremented by 10 ms or the user specified -XX:ThreadTimeSliceDecrement value. The adjusted value is used for all threads.
Count
The time slice value is modified according to the number of threads. The Java runtime calculates the time slice policy value by dividing the time slice value by the number of threads in the process. The adjusted value is used for all threads. For example, consider that the time slice value is 400 and 10 Java threads are present in a process. The calculated time slice value will be 40 ms.
NOTE:

Thrashing can result if the application has many threads.

Percent
The adjustment is done by decrementing the time slice value by 10% or the user specified -XX:ThreadTimeSlicePercent value. The value is in the range of 1 to 50. The adjusted value is used for all threads.
PerThread
When a thread consumes the time slice without initiating a block operation, the time slice policy value is decremented by 10 msecs or a user specified value. The adjusted value is used only for the current misbehaving thread.
PerThreadCount
Similar to Count, but applicable only to the misbehaving thread.
PerThreadPercent
Similar to Percent, but applicable only to the misbehaving thread.