-1

I have a server with dual processors, that is multiple cores per processor and two physical Xenon processors.

Each process will only run on one processor, which is fine. If you start a multi-threaded app it can only use the maximum amount of cores on one physical processor, not both (Windows 10 limitation?). I would like to start two instances of the same program so that I can use all cores on both the processors.

How do I start a process from a batch file so that it runs on a specified processor group? I.e. Cores 0-16 of processor 1, or Cores 0-16 of processor 2?

I've tried:

start /affinity FF file.exe

But that only runs it on cores from one particular processor. I believe I need to set the processor group but how do I do that using the 'start' command?

I can see you can use hexadecimal masks for the affinity with 'start' but that only seems to work on the cores of the first processor, I can't seem to access the cores of the second processor.

Since there is much confusion over my question, please see below. It's from task manager when you try and set an affinity, notice how I have multiple processor groups? That's what I am trying to configure using the 'start' command. '/affinity' only uses cores from group 0.

Multiple processor groups

Ken Y-N
  • 14,644
  • 21
  • 71
  • 114
ALM865
  • 1,078
  • 13
  • 21
  • MSDOS is not a multi-tasking OS. Did you consider switching to Linux ? – Basile Starynkevitch Sep 15 '17 at 05:56
  • You should not care on which CPUs the stuff is running, that is the business of the OS and can change very often. But search "CPU affinity" – Basile Starynkevitch Sep 15 '17 at 06:10
  • @GerhardBarnard sorry, thanks for the suggestion but it doesn't solve my problem – ALM865 Sep 15 '17 at 06:22
  • 1
    OK, another go - your "Processor group" combo-box perhaps indicates that you have NUMA nodes. [This question talks about it](https://stackoverflow.com/q/28098082/1270789), so you might be able to say `start /node 1` to use the second CPU. Furthermore, I would guess you can combine `/node` and `/affinity` to run on selected cores in each physical CPU. – Ken Y-N Sep 15 '17 at 06:43
  • @KenY-N thanks that worked. node 1 accesses the second processor. Write it up in a quick answer and I'll up vote it. – ALM865 Sep 15 '17 at 06:47

1 Answers1

3

Judging by your "Processor group" combo, it appears that you have the system set to present NUMA nodes with each physical CPU being assigned to a single node. This question talks about how to check the config, so assuming that that is how you are set up, the command line flag /node <NUMA index> would allow you to select which node, so we get:

start /node 1 file.exe

This should start the application on the second NUMA node. Note that you might be able to combine this with the /affinity flag, so to run on just two cores of the first node, the following might work:

start /node 0 /affinity 3 file.exe
Ken Y-N
  • 14,644
  • 21
  • 71
  • 114