Use the time slice option to specify the amount of time (milliseconds) that a user process is allowed to pass through a yield point without voluntarily yielding. The Microsoft® SQL Server™ kernel is not preemptive and does not control the time spent on a process; instead, the process controls the time spent in the CPU and schedules itself out. However, if the process exceeds the time limit set in time slice, the kernel assumes the process is stuck in a loop and terminates the process.
If you set the time slice value too low, it slows down the system because of the overhead caused by programs frequently scheduling themselves in and out of the CPU. If you set time slice too high, it can cause long response times when one process does not schedule itself out of the CPU for a long time. The default is 100 milliseconds and there is seldom a reason to change it.
time slice is an advanced option. If you are using the sp_configure system stored procedure to change the setting, you can change time slice only when show advanced options is set to 1. The setting takes effect after stopping and restarting the server.
To set the time slice option
RECONFIGURE | sp_configure |
Setting Configuration Options | Thread and Fiber Execution |