Posted on June 21, 2016 · Posted in Windows Server 2012

Process Priority Management in Windows

Let’s talk about the priority of Windows processes. In most cases, there is no need to think about the custom process priority settings, but sometimes a qualified system administrator can help a system to better allocate the processor time between running tasks. When is it needed? For example on the application server, you can give more CPU time for application and SQL server, as the most resource-critical processes.

Generally, you can view and change the priority of the process using Task Manager (someprocess.exe -> Set Priority)

Windows NT/2000/7/2008

Task Manager - set process priority

In Windows Server 2012, these settings are located on Details tab.

Windows Server 2012 - six process priority

As you can see from these snapshots, only 6 priority types (as it will be explained later, these are the priority classes) are available. Is it enough? Microsoft thinks, it is. But let’s remember the epic saying by Bill Gates, who told that “640 KB of RAM will be enough for everybody”. But time has shown that it is far from the case.  : )

Now let’s see, what it actually looks like.

In fact, there are 32 priority levels in Windows, from 0 to 31.

They are grouped as follows:

  1. 31 — 16 are real time levels
  2. 15 — 1 are dynamic levels
  3. 0 is a system level reserved for the zero-page thread

When a process is created, it is assigned one of the six priority classes:

  1. Real time class (value 24),
  2. High class (value 13),
  3. Above normal class (value 10),
  4. Normal class (value 8),
  5. Below normal class (value 6),
  6. or Idle class (value 4).

As it has been mentioned above, you can view the process priority using Task Manager.

Note. Above normal and Below normal priorities first appeared in Windows 2000.

The priority of each thread (basic thread priority) is composed of the priority of its process and the relative priority of the thread itself. There are seven types of relative priorities of the threads:

  • Normal: the same as the process has
  • Above normal: +1 to the priority of the process
  • Below normal: -1 from the priority of the process
  • Highest: +2;
  • Lowest: -2;
  • Time critical: sets the current priority of a thread as 31 for the Real time class, and 15 for the rest classes
  • Idle: sets the current priority of a thread as 16 for the Real time class, and 1 for the rest classes

The following table shows process priorities, relative and current priorities of a thread.

Thread PriorityProcess ClassProcess Class
Idle classBelow normal classNormal classAbove normal classHigh classReal time class
3Below …
4Idle class NormalLowest
5Above …Below …
6Below normal class HighestNormalLowest
7Above …Below …
8Normal class HighestNormalLowest
9Above …Below …
10Above normal class HighestNormal
11Above …Lowest
12HighestBelow …
13High class Normal
14Above …
15Time criticalTime criticalTime criticalTime criticalTime critical
23Below …
24Real time class Normal
25Above …
31Time critical

How to start a process with a non-standard priority or change it?

Method 1. Start a task/process and change its priority using Task Manager

Method disadvantages:

  • Only 6 types of priorities are available
  • The priorities are changes with your mouse and you cannot make it automatic.

Method 2. You can use START command with the corresponding keys

The available keys responsible for priorities are as follows (I deliberately omit the keys of the START command, which are not related to the process of setting priorities being described):

C:\>start /?
Starts a separate window to run a specified program or command.
START [“title”] [/D path] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED]
[/NODE <NUMA node>] [/AFFINITY <hex affinity mask>] [/WAIT] [/B]
[command/program] [parameters]
LOW       Start application in the IDLE priority class.
NORMAL     Start application in the NORMAL priority class.
HIGH       Start application in the HIGH priority class.
REALTIME   Start application in the REALTIME priority class.
ABOVENORMAL Start application in the ABOVENORMAL priority class.
BELOWNORMAL Start application in the BELOWNORMAL priority class.

As we can see, the START command allows to run a process with the same 6 priorities available in the Task Manager

Method disadvantage:

  • Only 6 types of priorities are available

Method 3. Using wmic.exe utility

As shown above, Task Manager and START command are quite awkward in assigning priorities. Let’s see how to do it more flexibly. We’ll use wmic.exe.

The command prompt:

wmic process where name="AppName" CALL setpriority ProcessIDLevel


wmic process where name="calc.exe" CALL setpriority 32768


wmic process where name="calc.exe" CALL setpriority "above normal"

Priorities (preset):

  • idle: 64
  • below normal: 16384
  • normal: 32
  • above normal: 32768
  • high priority: 128
  • real time: 256

Note. What is to be done if there are several processes with the same name? The priority of a process can be changed using both its name or the PID (Process ID).

Here is a short example of running wmic.exe to get the necessary information.

Use this command:

wmic process list brief

Note. I won’t give the example of running this command as the list of processes is too long. Do it yourself if you want to.

You’ll get the list of processes run on your local computer. Now run this command:

wmic process list brief | find "cmd.exe"

Here is the result:

wmic process list brief | find "cmd.exe"

I have deliberately started several copies of cmd.exe, to make it more demonstrative.

Now the list of processes is limited to those having “cmd.exe” in their name. Pay attention to the PID of the process(es).

Now let’s try to select the necessary processes using WMI. To do it, just enter:

wmic process where description='cmd.exe' list brief

Here is the result:

wmic process where description='cmd.exe' list brief

Compare the results. Remember the PID of CMD.EXE.

The command string to start wmic.exe

wmic process where processid='XXXX' CALL setpriority ProcessIDLevel

Now we can change the priority of a specific process (e. g., PID=8476):

wmic process where processid='8476' CALL setpriority 32768


wmic process where processid='8476' CALL setpriority "above normal"

What next? Think, try, select and manage your priorities to improve the performance of services and processes, together with the end user experience.

Related Articles