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

Requires Free Membership to View

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

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

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:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.