Performance: Should I assign processes to cores manually?


  1. Posts : 179
    Microsoft® Windows 7 Professional 64-bit
       #1

    Performance: Should I assign processes to cores manually?


    Hi

    My question is related to processor affinity.
    There's a feature well-hidden in the Task Manager on all version of Windows 7 (and even on Vista and XP I guess) that lets you select which programs can use which processor cores.

    Normally this is something the OS and the programs do automatically but this option is like a manual ovveride button. You can decide manually for each process. For example I assigned firefox to core #2 and also flash player. I'm testing it to see if it puts off any system load. Of course this might slow down the particular process since basically I'm restricting it to run on one core instead of two, but running it on core number two frees up resources on core number one. Which means other programs can open up faster etc. A fair tradeoff for me, in some cases. In other cases it could be a bad thing since it could slow down a video encoding. Actually this feature in Task manager is temporary, it gets deleted during the next reboot. It doesn't remember nor does it apply these settings permamently, you need a third party program for that. But I definitely like this, the fact its temporary, because I can test my system risklessly, if it slows down I can reboot it and changes are reversed.


    I'm sure many of you know about this feature, so I'm interested in your personal opinion: is this thing useful?

    I just ordered a new four core AMD processor and I want to use it as efficiently as possible. I like watching videos on the Internet but I don't want flash player to take on all my four cores.
    But I want video encoding to kick in on all four cores. Also I would restrict office apps onto one core since they aren't resourceful at all, they were fine for me in the old days when we had singlecore.


    So I'm all ears for your opinions. Definitely if you have a quadcore CPU: do you do this?
      My Computer


  2. Posts : 12,012
    Windows 7 Home Premium SP1, 64-bit
       #2

    I'm aware of the capability, but don't use it.

    I'd assume you could contrive a use case in which it is beneficial, but I have no reason at all to think that such a use case would fit my own patterns.

    If my life ever gets to the point that it makes much difference to me whether a job finishes in 6 minutes rather than 7 minutes, I'm sure I'd just be better off going outside for some fresh air or maybe baking some chocolate chip cookies. How am I better off for agonizing over such issues?

    Maybe you make your living with your PC literally, in which case there may be a clearcut financial benefit for fiddling. So, do your experiments and adjust your processors accordingly.

    Or it may feed a tinkering obsession, in the same way as overclocking. In which case, knock yourself out.

    Otherwise, assume AMD or Intel or Microsoft have some reasonable competency on the topic and go with defaults.
      My Computer


  3. Posts : 25,847
    Windows 10 Pro. 64/ version 1709 Windows 7 Pro/64
       #3

    ignatzatsonic said:
    I'm aware of the capability, but don't use it.

    I'd assume you could contrive a use case in which it is beneficial, but I have no reason at all to think that such a use case would fit my own patterns.

    If my life ever gets to the point that it makes much difference to me whether a job finishes in 6 minutes rather than 7 minutes, I'm sure I'd just be better off going outside for some fresh air or maybe baking some chocolate chip cookies. How am I better off for agonizing over such issues?

    Maybe you make your living with your PC literally, in which case there may be a clearcut financial benefit for fiddling. So, do your experiments and adjust your processors accordingly.

    Or it may feed a tinkering obsession, in the same way as overclocking. In which case, knock yourself out.

    Otherwise, assume AMD or Intel or Microsoft have some reasonable competency on the topic and go with defaults.
      My Computer


  4. Posts : 2,497
    Windows 7 Pro 64 bit
       #4

    Setting core affinity can be useful, otherwise the feature would not have been provided. But in most situations you will be best served by letting the scheduler manage cores as it wishes. The goal of the scheduler is always to maximize overall system performance. Evenly spreading the workload over all cores is not a priority. When a thread is started it is assigned an ideal core which the scheduler will use whenever possible. This can produce situations where one core is doing most of the work while others are largely idle. Don't worry about it.

    The problem with the thread scheduler is that it doesn't have specific information concerning process CPU usage patterns or the goals of the user. A sufficiently knowledgeable user may be able to do better under specific situations. But that level of knowledge doesn't come from asking a few questions on a forum.

    One situation where it can be useful is with a CPU bound application that can efficiently use multiple cores. By restricting that application to a subset of cores you will reduce it's performance but have a more responsive system. In some situations that may be desirable.

    There is one thing about CPU affinity that is sometimes misunderstood. Affinity restricts a process to some subset of available cores. Cores specified in affinity settings are not restricted to the process in question but can and will be used for any other process the scheduler wishes, subject of course to other affinity restrictions. There is no means provided in Windows for reserving a core or cores for a specific purpose.

    Edit: My experience with setting core affinity is very limited. With only a dual core CPU the options are rather limited.
      My Computer


  5. Posts : 179
    Microsoft® Windows 7 Professional 64-bit
    Thread Starter
       #5

    Thank you everyone

    You're right this isn't so important but there's one case when it could matter. This is why I asked it:
    Imagine you're encoding a movie, for example with movie maker. It slows down your PC while it's working and you can't even watch videos online. Then if you restrict it to core number 2, and the browser to core number one, you could browse lag-free and maybe the encoding finishes later, but who cares I'm gonna bake some chocolate chips too while it is working
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 08:35.
Find Us