For the
start /affinity command of the Cmd.exe utility, the affinity mask is interpreted differently if you use the
/affinity and
/node switches together. Specify the affinity mask as if the processor mask of the NUMA node is shifted toward the right side to begin at the bit zero. The process runs on only those processors that are both in the specified affinity mask and in the NUMA node. If no processors are in common, the process runs on only the specified NUMA node.
With the
/node switch, you can create processes that use the local memory of the NUMA-based processors efficiently. For example, assume that you have two processes that communicate to one another frequently by using shared memory. In this scenario, memory latency can be reduced by using the
/node switch to create processes that share the same preferred NUMA node.
To create two processes that try to allocate memory from the same NUMA node and that can run on the processors that are outside the specified node, run the following command:
start /NODE 1 application1.exe
start /NODE 1 application2.exe
Note The
application1.exe and
application2.exe placeholders are for the file name of the executable files for the processes.
To create two processes that are further constrained to run on only some specific processors that are in the same NUMA node, run the following command:
start /NODE 1 /AFFINITY 0x3 application1.exe
start /NODE 1 /AFFINITY 0xc application2.exe
Note In these commands,
application1.exe runs on the two processors that are in the low-order of the node, while
application2.exe runs on the next two processors of the node. Additionally, these commands assume that the specified node has at least four logical processors. When the node number is changed to any valid node number for that computer, the affinity mask does not have to be changed.
Together with
start /node functionality, the new
%HighestNumaNodeNumber% dynamic environment variable is added to the Cmd.exe utility. With this variable, you can check whether a computer has NUMA-based processors, and you can iterate over all the nodes. The following is a sample script that uses this new variable:
@echo off rem rem This sample script shows the two features that are added to Cmd.exe in Windows 7 rem Service Pack 1: rem rem %HighestNumaNodeNumber% rem This is a new dynamic environment variable. rem Run 'set /?' for more information. rem rem start /node <NUMA node number> rem /node is a new command-line option for the start command that rem can be used to specify the preferred NUMA node for the process rem that is being started. rem Run 'start /?' for more information. rem rem Start several new processes where each preferred NUMA node of a process is rem assigned in a round robin manner across all the NUMA nodes in the system. rem rem Example: Start 7 new processes where the preferred node is distributed rem across 4 NUMA nodes. rem rem start /node 0 process0 rem start /node 1 process1 rem start /node 2 process2 rem start /node 3 process3 rem start /node 0 process4 rem start /node 1 process5 rem start /node 2 process6 rem rem process0 might be process0.exe or process0.cmd. rem if defined verbose echo on setlocal enableextensions enabledelayedexpansion if "%1"=="" ( echo Usage: %0 ^<number of processes to distribute among NUMA nodes^> goto end ) else ( set ProcessCount=%1 ) rem rem %HighestNumaNodeNumber% is a dynamic environment variable that is available rem starting in Windows 7 Service Pack 1. Make sure that a real environment variable rem by this name is not already defined because that value would be used instead rem of the automatic system-generated value. rem set HighestNumaNodeNumber= if not defined HighestNumaNodeNumber set HighestNumaNodeNumber=3 set /a ProcessCountMinusOne=%ProcessCount% - 1 set /a NumberOfNumaNodes=%HighestNumaNodeNumber% + 1 set start=0 set step=1 set end=%ProcessCountMinusOne% rem rem Round robin the start of each process across the NUMA nodes. rem for /L %%p in (%start%, %step%, %end%) do ( rem rem Note the modulo operator (%) used on the command line must be doubled rem up (%%) when the operator is used in a cmd script. rem set /a node=%%p %% %NumberOfNumaNodes% rem rem Remove 'echo' below to actually start these processes. rem echo start /node !node! process%%p ) :end endlocal
For more information about NUMA support, view the following Microsoft website:
For more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:
824684 Description of the standard terminology that is used to describe Microsoft software updates
Additional file information
Additional file information for Windows 7 and for Windows Server 2008 R2
Additional files for all supported x86-based versions of Windows 7
File name | Update.mum |
File version | Not applicable |
File size | 1,680 |
Date (UTC) | 14-May-2010 |
Time (UTC) | 14:46 |
Platform | Not applicable |
|
File name | X86_8ff5c208de820a3f23ecb2172c25ec66_31bf3856ad364e35_6.1.7600.20713_none_6868ecf613b450e2.manifest |
File version | Not applicable |
File size | 701 |
Date (UTC) | 14-May-2010 |
Time (UTC) | 14:46 |
Platform | Not applicable |
|
File name | X86_microsoft-windows-commandprompt_31bf3856ad364e35_6.1.7600.20713_none_8bb66e3d9496bfda.manifest |
File version | Not applicable |
File size | 11,450 |
Date (UTC) | 14-May-2010 |
Time (UTC) | 09:21 |
Platform | Not applicable |
|
Additional files for all supported x64-based versions of Windows 7 and of Windows Server 2008 R2
File name | Amd64_da6e0170a834e89dcda995ffd3c2c09b_31bf3856ad364e35_6.1.7600.20713_none_8ae59c1512489303.manifest |
File version | Not applicable |
File size | 705 |
Date (UTC) | 14-May-2010 |
Time (UTC) | 14:46 |
Platform | Not applicable |
|
File name | Amd64_e4185a30c8a074969311bf740976f660_31bf3856ad364e35_6.1.7600.20713_none_2202ca9ba02fecde.manifest |
File version | Not applicable |
File size | 705 |
Date (UTC) | 14-May-2010 |
Time (UTC) | 14:46 |
Platform | Not applicable |
|
File name | Amd64_microsoft-windows-commandprompt_31bf3856ad364e35_6.1.7600.20713_none_e7d509c14cf43110.manifest |
File version | Not applicable |
File size | 11,458 |
Date (UTC) | 14-May-2010 |
Time (UTC) | 04:12 |
Platform | Not applicable |
|
File name | Update.mum |
File version | Not applicable |
File size | 2,334 |
Date (UTC) | 14-May-2010 |
Time (UTC) | 14:46 |
Platform | Not applicable |
|
File name | Wow64_microsoft-windows-commandprompt_31bf3856ad364e35_6.1.7600.20713_none_f229b4138154f30b.manifest |
File version | Not applicable |
File size | 10,360 |
Date (UTC) | 14-May-2010 |
Time (UTC) | 04:56 |
Platform | Not applicable |
|
Additional files for all supported IA-64-based versions of Windows Server 2008 R2
File name | Ia64_46df141649eef34c18ee74d713fdf969_31bf3856ad364e35_6.1.7600.20713_none_b3d0607a1020ba54.manifest |
File version | Not applicable |
File size | 703 |
Date (UTC) | 14-May-2010 |
Time (UTC) | 14:46 |
Platform | Not applicable |
|
File name | Ia64_e4185a30c8a074969311bf740976f660_31bf3856ad364e35_6.1.7600.20713_none_c5e5d30de7d084a4.manifest |
File version | Not applicable |
File size | 704 |
Date (UTC) | 14-May-2010 |
Time (UTC) | 14:46 |
Platform | Not applicable |
|
File name | Ia64_microsoft-windows-commandprompt_31bf3856ad364e35_6.1.7600.20713_none_8bb812339494c8d6.manifest |
File version | Not applicable |
File size | 11,454 |
Date (UTC) | 14-May-2010 |
Time (UTC) | 03:43 |
Platform | Not applicable |
|
File name | Update.mum |
File version | Not applicable |
File size | 1,690 |
Date (UTC) | 14-May-2010 |
Time (UTC) | 14:46 |
Platform | Not applicable |
|
File name | Wow64_microsoft-windows-commandprompt_31bf3856ad364e35_6.1.7600.20713_none_f229b4138154f30b.manifest |
File version | Not applicable |
File size | 10,360 |
Date (UTC) | 14-May-2010 |
Time (UTC) | 04:56 |
Platform | Not applicable |
|