Jump to content

single-threaded process not maxing out 1 core unless I set affinity

I've had this issue for a while since upgrading to Windows 10 on my old i5-750. If I run a single-threaded application, such as prime95 with 1 worker, it will not max out 1 Core and Leave 3 idling, it will somehow divide the load evenly, 25% per core, according to task manager graphs. Only if I manually set the CPU affinity in task manager will it max out 1 core properly.

 

I don't quite understand this behavior. It's not a display glitch because if I manually set the affinity, the temperature rises on that core which is now working "alone" on the task. Otherwise, with no affinity, all the cores stay at roughly the same temp with occasional spikes on each core.

Link to comment
Share on other sites

Link to post
Share on other sites

Being single threaded does not necessarily mean the OS will not put it on 1 specific CPU core, it just means that applications runs in single threaded mode.

 

The operating system will generally give out whatever cores it deems eligible during the time the applications functions run.

 

Processor affinity actually tells the OS to always use the same cpu / core. Which in some cases can have a performance benefit, however in most cases the OS will just assign whatever cores it wants to your application threaded or multi threaded does not matter.

 

I dont know the specifics of it all, but im sure a quick google search should yield some more in depth information about how it all works.

 

Link to comment
Share on other sites

Link to post
Share on other sites

@factorialandha has the gist of it. To expand on it further, a program spawns threads and those threads as far as the OS is concerned are either ready to run, already running, or blocked/sleeping. Threads that are ready to run line up in a queue and when it's a thread's turn to be scheduled, the OS just slips it on the first available core, though there may be some extra steps to make sure the core it lands on makes sense to use. Affinity restricts which cores the threads can be scheduled on.

 

Also another thing to note, CPU utilization in Task Manager means the amount of time in one second (usually) a core did not spend running the System Idle Process.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×