How to dedicate a cpu to single process?


  • Is there any way to dedicate whole logical CPU to a single process? So far the best solution I have found is to set every other process affinity to exclude the given logical CPU and to set the wanted process to only use it. Also changing priority to 'Realtime' for the process so 'System' and such won't interfere with it too much.

    This method is troublesome as I have to manually change affinity of few dozen processes and some system processes cannot have their affinity changed. It is also possible that this is not enough, but I haven't been able to stress test it properly yet.

    The specific process should get at least 90 % of the CPU time of the given logical CPU of every 2 millisecond instance. I am not sure if the CPU scheduler timings are small enough to allow that with system processes battling over the CPU time. Also some system processes might not honor the 'Realtime' priority setting of the specific process causing it to not get enough CPU time in some conditions.

    Ideally there would be a way to automatically set Windows itself as well as every running process not to use the specific logical CPU at all and to completely dedicate it to the wanted process. Yes, even if the wanted process does not use the CPU at all, the specific logical CPU shouldn't have any other use whatsoever.

    The system has quad core Intel CPU with 8 GB of RAM and is running Windows Server 2008 R2 Standard Edition. Hyper-V is not an option because both the wanted process as well as some other processes need to be run at the host OS.
    Monday, February 22, 2010 2:49 AM

All replies

  • Based on testing, it seems that affinity and priority settings are not doing enough. So there would be need for some way to even force system processes not to use the specific logical CPU at all.
    Monday, February 22, 2010 8:34 PM
  • Phantasm0 has posted a good question, to which I would also like to know the answer.

    If yes, could this also be done on a Windows XP operating system?

    And would it be possible to disable a core inside the OS but still access it with a custom built application through certain switches or procedures, so the actual core would only be accessed by that application/process.

    My questions apply to either logical CPU and/or physical CPU.

    Tuesday, March 16, 2010 8:23 AM
  • Hi

    You can use Windows System Resource Manager to do this:



    Tuesday, March 16, 2010 6:19 PM