Take a quantum leap

Take a quantum leap

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

    When you register, you’ll also receive targeted alerts from my team of editorial writers and independent industry experts with the latest news, tips, and advice to help you do your job more efficiently and effectively. Our goal is to keep you informed on the hottest topics and biggest challenges faced by Windows professionals today.

    Cathleen A. Gagne, Senior Editorial Director

    By submitting your registration information to SearchWinIT.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchWinIT.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

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

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.