Skip to content

How-ToCPU

How to Set Process Priority and CPU Affinity in Windows 11

Windows 11 lets you change how much CPU time a program gets without installing anything. We explain how priority classes work, how to set priority and CPU affinity in Task Manager, how to launch apps at a set priority with the start command or change them with PowerShell, and why Microsoft says you should almost never use Realtime.

By , Systems & Technical Editor

5 min read

How to Set Process Priority and CPU Affinity in Windows 11

Windows decides which program gets the processor next using priorities, and it normally does a good job on its own. Sometimes, though, it's useful to step in: pushing a long video export into the background so your PC stays responsive, or giving a stubborn app a little more CPU time. Windows 11 has three built-in ways to do this without installing anything: Task Manager, the start command and PowerShell. This guide is based on Microsoft's documentation as of 29 November 2026.

How priority works in Windows

Microsoft's documentation explains that every thread has a scheduling priority from 0 (lowest) to 31 (highest). Windows hands out time slices in round-robin fashion to the highest-priority threads that are ready to run, and if a higher-priority thread becomes ready, the lower-priority one is stopped so the more important thread can run. A thread's priority comes from two things: the priority class of its process and the thread's level within that class.

For everyday use, the part you can change is the process priority class. Windows has six:

Priority class

What Microsoft says it's for

Idle (Low in Task Manager)

Threads that run only when the system is idle; Microsoft's example is a screen saver

Below normal

Above Idle but below Normal

Normal

No special scheduling needs; the default for a process

Above normal

Above Normal but below High

High

Time-critical tasks that must be executed immediately

Realtime

The highest possible priority, which pre-empts even operating system processes

By default a process runs at Normal. Microsoft notes that if the program that launches another one is Idle or Below normal, the new process inherits that class.

Why you should almost never use Realtime (or overuse High)

Microsoft is blunt about this. It says you should almost never use the Realtime class, because it interrupts system threads that manage mouse input, keyboard input and background disk flushing, and that a real-time process running for more than a very brief interval can stop disk caches from flushing or make the mouse unresponsive. High also needs care: Microsoft warns that a High-priority application can use nearly all available CPU time, and that if several threads are set to High at the same time, they lose their effectiveness.

In practice, lowering the priority of a background job is usually safer than raising the priority of the thing you're using. Setting a big render, compression job or file sync to Below normal lets it soak up spare CPU time while your browser, game or editor stays at Normal and gets served first.

Method 1: Task Manager

  1. Press Ctrl + Shift + Esc to open Task Manager.

  2. Go to the Details tab.

  3. Right-click the program's process and choose Set priority, then pick a level such as Below normal or Above normal.

  4. To limit which processor cores it can use, right-click it again, choose Set affinity and tick only the CPUs you want it to run on.

Some programs run several processes with the same name (browsers are a common example), so you may need to change each one. Changes made here apply only to the running process: the next time the program starts, it gets the default Normal priority again (unless whatever launches it runs at Idle or Below normal). If you're new to Task Manager, our Task Manager guide walks through the other tabs.

Method 2: the start command

The start command in Command Prompt can launch a program at a chosen priority, which is handy in a shortcut or batch file so the setting applies every time. Microsoft lists the switches /low, /belownormal, /normal, /abovenormal, /high and /realtime. For example:

start "" /belownormal "C:\Program Files\HandBrake\HandBrake.exe"

The empty quotes matter: start treats the first quoted text as the title of the window, so without them a quoted program path would be read as a title instead.

The same command can set CPU affinity with /affinity, followed by a hexadecimal mask in which each bit is a processor. Microsoft's .NET documentation shows how the mask works on an eight-processor system: 1 is processor 1, 3 is processors 1 and 2, 7 is processors 1 to 3, and 9 is processors 1 and 4. So this would start a program on the first two logical processors only:

start "" /affinity 3 "C:\Path\To\Program.exe"

Logical processors include Hyper-Threading or SMT threads, so on most modern CPUs two of them share one physical core. Run start /? to see the full help in Command Prompt.

Method 3: PowerShell

PowerShell can change a process that's already running. Process objects have a PriorityClass property that you can both read and set, with the values Idle, BelowNormal, Normal, AboveNormal, High and RealTime. For example, to drop every running instance of a program called encoder to Below normal:

Get-Process encoder | ForEach-Object { $_.PriorityClass = 'BelowNormal' }

There's also a ProcessorAffinity property that takes the same bitmask as start /affinity. Microsoft notes that setting it to zero lets the operating system's scheduler choose for itself. Changing a process that runs as administrator may need PowerShell opened with Run as administrator too. If you're not sure which shell to use, our Command Prompt vs PowerShell comparison explains the differences.

Is CPU affinity worth changing?

Microsoft's documentation explains that threads can migrate from processor to processor, reloading the processor cache each time, and that under heavy load pinning a thread to a processor can improve performance by reducing those reloads. That's the theory. In our view, on a desktop PC Windows' own scheduler usually does a better job than a hand-picked set of cores, and restricting a demanding program to fewer cores will normally slow it down. Affinity is most useful the other way round: keeping a background job off some of your cores so they stay free for the work in front of you.

Making it stick

Task Manager settings disappear when the program closes. If you want a priority every time, you have three options:

  • Put a start command with the priority switch in a shortcut or batch file and launch the program from that.

  • Run a PowerShell or start command at log-on with Task Scheduler.

  • Use a dedicated tool. Our Process Lasso guide covers an app that reapplies priority and affinity rules automatically each time a program starts.

When priority won't help

Priority only decides who goes first when the CPU is busy. If your PC is slow because the processor is maxed out by something that shouldn't be running, fix that first with our guide to high CPU usage in Windows 11, and use Process Explorer or Task Manager to find the culprit. Microsoft also notes that for background work such as file or network I/O, adjusting CPU priority isn't sufficient, because even an idle-priority process can interfere with responsiveness when it uses the disk and memory. And if the slowdown is caused by a drive, memory or the graphics card, CPU priority won't change it.

The bottom line

To change a program's priority in Windows 11, open Task Manager, go to the Details tab, right-click the process and choose Set priority; Set affinity limits which CPU threads it can use. Lowering a background job to Below normal is usually more useful and safer than raising anything to High, and Microsoft says you should almost never use Realtime. Task Manager changes last only until the program closes, so use a start command shortcut, Task Scheduler or a tool such as Process Lasso if you want them every time.

Sources

  1. 01Microsoft Learn, Scheduling Priorities (priority levels, priority classes, High and Realtime warnings)
  2. 02Microsoft Learn, SetPriorityClass function (priority class descriptions, Realtime risks, I/O note)
  3. 03Microsoft Learn, start command (priority switches and /affinity)
  4. 04Microsoft Learn, Process.PriorityClass property (.NET)
  5. 05Microsoft Learn, Process.ProcessorAffinity property (.NET, affinity bitmask table)
  6. 06HP Tech Takes, How to Use Task Manager Like a Pro (Details tab Set priority and Set affinity steps)

About the author

Marcus Thorne

Systems & Technical Editor

Marcus writes Forge PC's step-by-step build, troubleshooting and system optimisation guides. His background spans Windows kernel and power-state diagnostics, UEFI/BIOS configuration, NVMe storage arrays, ATX 3.1 power delivery and running local AI and LLM workloads on consumer graphics cards.

More from Marcus Thorne

Read next

Best Free Emulators for PC in 2026

Best Picks

Best Free Emulators for PC in 2026

The best free emulators for PC in 2026: RetroArch for retro systems in one app, PCSX2 for PS2, Dolphin for GameCube and Wii, DuckStation for PS1 and PPSSPP for PSP. We compare the systems each covers, licences, BIOS needs, hardware requirements and features from each project's official site, and explain how to stay legal with your own games and BIOS dumps.

Hannah Vance6 min

How to Set Up PCSX2 on Windows: Play Your PS2 Games on PC

How-To

How to Set Up PCSX2 on Windows: Play Your PS2 Games on PC

PCSX2 can play much of the PlayStation 2 library on a Windows PC at higher resolutions than the original console. Using PCSX2's official documentation, we explain the hardware you need, how to install it, how to dump the BIOS from your own PS2 and your game discs, which renderer to choose, how to save safely and what to check if games run slowly.

Marcus Thorne8 min

Best Local AI Video Translation and Dubbing Tools in 2026

Best Picks

Best Local AI Video Translation and Dubbing Tools in 2026

Free AI tools can now transcribe a video, translate it and dub it into another language on your own PC. We pick the best: pyVideoTrans, VideoLingo, OpenCreator (formerly KrillinAI) and SoniTranslate, comparing offline use, languages, voices, setup, licences and hardware from each project's official docs.

Hannah Vance5 min

pyVideoTrans vs VideoLingo: Which Local AI Video Translator Should You Use?

Versus

pyVideoTrans vs VideoLingo: Which Local AI Video Translator Should You Use?

pyVideoTrans and VideoLingo are popular open-source tools for translating and dubbing videos with AI on your own PC. Using each project's official docs, we compare installation, speech recognition, translation engines, dubbing voices, offline use, GPU support and licences, and say which suits which job.

Callum Reid4 min