How to Manually Allocate CPU Cores to an Application in Windows 10/11

How to Manually Allocate CPU Cores to an Application in Windows 10/11

Windows 10 has several options you can use for better performance. The OS’s CPU priority and processor affinity features are some of the most innovative. While it’s not a magic bullet for an immediate performance boost, it will make a difference if you have legacy components.

Due to the sensitivity of processes, you should only set processor affinity and CPU priority if you are familiar with technical material. However, if you’re ready to tune your system to be the best, let’s explore how to set processor affinity and CPU priority in Windows 10.

What is processor convergence in Windows 10?

Every operating system has a fundamental programming algorithm. The scheduling algorithm is responsible for distributing computer resources in different processes or threads. In Windows 10, hundreds of techniques can run at the same time.

The CPU cannot process all of these processes at once, so the scheduling algorithm manages these processes and allocates CPU time based on various factors.

As such, Processor Affinity can be thought of as a user interfering with the scheduler. Typically, the Windows scheduling algorithm determines which process will run on which CPU cores. If you set Processor Affinity manually, you can force a process or thread to run on any core you like.

Simply put, this gives you an advantage Processor Affinity Assign one or more CPU cores to any processes or threads of your choice. Only processes or threads for which affinity is specified will run on the selected cores.

However, this would not make kernels unique to just these processes. Windows can still assign different processes to these cores. Setting processor affinity only affects chosen processes, causing them to run only on designated cores.

What is CPU priority in Windows 10?

As we explained above, there can be hundreds of processes or threads competing for CPU time at any one time in Windows 10. To ensure that essential processes and threads have priority access to CPU resources, you Windows Scheduling Prioritize each process and thread running on the operating system.

For example, the Windows scheduling algorithm gives high Priority to critical Windows processes such as System and Windows Explorer. If these processes are in a queue, they can get to the CPU before low priority processes.

Therefore, manually setting a process’s CPU priority to high, the Windows scheduler will ensure that process has priority access to CPU resources.

Finally, “CPU priority” is completely different from “processor affinity.” When a process’s CPU priority setting tells the schedule how to handle that process, the processor affinity setting blocks the process for specific CPU cores/cores. With a processor affinity group, even if a process has a high or low priority, it will run on particular cores/cores.

Why you might want to allocate CPU cores for a specific application

One of the biggest problems modern computing has to face is the sheer number of single-threaded applications. Even in 2021, where most processors are quad-core or higher, some applications only use one of the many cores available.

This presents a problem for scheduling modern operating systems: how do you schedule single-threaded processes on multi-thread processors without breaking compatibility?

Most of the time, programmers today efficiently schedule single-threaded processes on modern CPUs. But there are times when an old application crashes due to insufficient compatibility. This is where setting processor affinity can help.

Processor affinity limits operations to running on specific CPU cores. You can limit these processes to a single CPU core by setting processor affinity for single-threaded legacy applications.

In addition, people with weaker hardware can also benefit from setting high Priority on their essential tasks. For example, if you’re a video editor, you can select your rendering app with high Priority before it starts rendering video. That way, when you want to watch a video, Windows knows that it must devote most of its attention to overcoming it.

How to Set Processor Affinity and CPU Priority

To set processor affinity and CPU priority, you will have to open the task manager and continue from there.

So open Task Manager by right-clicking on the Windows 10 taskbar and choosing Task Manager. Then go to the process you want to set the affinity for.

Then right-click this process and choose Go to Details.

How to Manually Allocate CPU Cores to an Application in Windows 10/11

The process you choose will be highlighted in the new panel that appears. Right-click on the highlighted process and select Set Affinity. The Processor Affinity panel will now appear.

How to Manually Allocate CPU Cores to an Application in Windows 10/11

In the Processor Affinity panel, uncheck the CPU cores you don’t want to run the operation on. After that, click OK. Processor affinity will now be set, and the chosen process will only run on the specified CPU cores.

To set the CPU priority, right-click on any process in Task Manager and select Go to details.

Then right-click the highlighted process and click Set Priority.

How to Manually Allocate CPU Cores to an Application in Windows 10/11

Now choose Priority from the pop-up menu. If you want to run your process as soon as you need it, select real-time.

However, choosing Realtime will result in other, possibly critical, system processes waiting in the queue. This can lead to overall system slowdown in the mildest and complete system failure in the worst case, so be careful when setting any process to real-time Priority.

On the other hand, it’s safer to choose high Priority as long as you don’t put too many processes at high Priority.

The other options in the list are Above Normal, Normal, Below Normal, and Low, which needs no further explanation.

Don’t limit processor affinity and CPU priority if you don’t know what you’re doing.

You should only set processor affinity and CPU priority if you know what you’re doing. While significant in some cases, the increase in performance doesn’t make up for the problems you might encounter if something goes wrong. From slowdowns to random system crashes, setting affinity and Priority should be your last choice.

Processor affinity and CPU priority aren’t the only ways to increase Windows 10 performance. There are numerous tricks you can use to get some best performance out of your old hardware.

READ MORE   Core M3 Vs I5 Vs I7 Processors