Take a quantum leap

Adjust time quanta for better performance.

Many administrators are familiar with the option in Windows 2000 to either give equal processing time to foreground

and background processes or to give foreground processes slightly high priority. However, there are ways to provide additional levels of granularity and flexibility to foreground and background processes. To do this, we need to edit the way Windows 2000 handles quantum lengths.

Microsoft uses the term "quantum" to refer to the minimum amount of time spent executing one thread before switching to another thread. These intervals are actually not set in stone; they can be adjusted to some degree. Depending on the kind of programs and services you're running, you may want to give preference and adjust quantum timings to something other than the default settings.

The variations to quantum settings allow for their lengths to be fixed or variable, long or short, and (as we originally knew) biased towards foreground or background processes. Variable-length quanta are useful if you have services that kick in and out and use a lot of CPU time in bursts.

For instance, on a server that runs primarily background processes with a lot of CPU usage (IIS, SQL), you may want to set the system to favor those and use short variable-length timeslices to let everything run in as much a parallel fashion as possible. You might need to do a certain amount of experimenting to find the optimal settings for your combination of services.

To edit the quantum length parameters:

  1. Open the Registry and navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\PriorityControl.

  2. Look for the value named Win32PrioritySeparation.

  3. This value is a bitmask, so set the value to 0 and add values as follows.

    1. If you want to set the ratio of foreground-to-background threads to: 3:1, add 2; for 2:1, add 1; for 1:1, add 0.

    2. If you want to set the lengths of quanta to variable lengths, add 4; for fixed lengths, add 8.

    3. If you want to set the intervals for quanta to be shorter, add 32; to make them longer, add 16.
  4. Record the final value and click OK.

The change takes effect immediately.


Serdar Yegulalp is the editor of the Windows 2000 Power Users Newsletter.


This was first published in November 2002

Dig deeper on Enterprise Infrastructure Management

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

SearchServerVirtualization

SearchCloudComputing

SearchExchange

SearchSQLServer

SearchWinIT

SearchEnterpriseDesktop

SearchVirtualDesktop

Close