Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

You cannot specify a NUMA node when you create a process by using the "start" command in Windows Server 2008 R2 or in Windows 7


View products that this article applies to.

Symptoms

Consider the following scenario:
  • You have a computer that is running Windows Server 2008 R2 or Windows 7.
  • You want to use the start /affinity command to create some new processes for a specific preferred NUMA node or for a specific processor group.

    Note The start /affinity command is part of the Cmd.exe utility.
In this scenario, the start /affinity command does not let you specify the preferred NUMA node or the processor group. Therefore, you cannot create an affinity between a specific processor and the process when the process is created.

Also, the processes cannot benefit from running on a specially configured set of processors to use the local memory or to distribute processor load when the processes are created.

Notes
  • If the a computer has only one processor group, the start /affinity command can create a process that runs on any set of logical processors. However, the command cannot assign the preferred node.
  • A computer that has more than 64 active logical processors has more than one processor group.
  • The affinity is a tuple that consists of a processor mask and of a processor group number. The processor group number qualifies the processor mask and fully qualifies the processor mask when more than one processor group exists.

    For example, the 0x3 processor mask and the 0 processor group represent a different set of processors from the 0x3 processor mask and the 1 processor group.

↑ Back to the top


Cause

This issue occurs because the start command for the Cmd.exe utility of Windows Server 2008 R2 and of Windows 7 does not let a user specify a processor group number.

Notes
  • The concept of a processor group was introduced in Windows Server 2008 R2 and in Windows 7 to support more than 64 logical processors.
  • A user can specify an affinity mask by using the start /affinity command. However, the operating system randomly assigns the preferred node that dictates the processor group. Therefore, the processor group is not deterministic. Additionally, multiple calls of the start /affinity maskcommand may create processes that are running on different processors even if the same affinity mask is assigned.

↑ Back to the top


Resolution

After you install this hotfix on the computer that is running Windows Server 2008 R2 or Windows 7, you can use /node switch to specify a NUMA node in a start command.

The following are some examples of this new switch in a start command:
start /NODE 1 application1.exe
start /NODE 1 /AFFINITY 0x3 application1.exe

Hotfix information

A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing the problem described in this article. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.

If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, contact Microsoft Customer Service and Support to obtain the hotfix.

Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site: Note The "Hotfix download available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.

Prerequisites

To apply this hotfix, you must be running Windows 7 or Windows Server 2008 R2.

Registry information

To use the hotfix in this package, you do not have to make any changes to the registry.

Restart requirement

You do not have to restart the computer after you apply this hotfix.

Hotfix replacement information

This hotfix does not replace a previously released hotfix.

File information

The global version of this hotfix installs files that have the attributes that are listed in the following tables. The dates and the times for these files are listed in Coordinated Universal Time (UTC). The dates and the times for these files on your local computer are displayed in your local time together with your current daylight saving time (DST) bias. Additionally, the dates and the times may change when you perform certain operations on the files.
Windows 7 and Windows Server 2008 R2 file information notes
Important Windows 7 hotfixes and Windows Server 2008 R2 hotfixes are included in the same packages. However, hotfixes on the Hotfix Request page are listed under both operating systems. To request the hotfix package that applies to one or both operating systems, select the hotfix that is listed under "Windows 7/Windows Server 2008 R2" on the page. Always refer to the "Applies To" section in articles to determine the actual operating system that each hotfix applies to.
  • The MANIFEST files (.manifest) and the MUM files (.mum) that are installed for each environment are listed separately in the "Additional file information for Windows Server 2008 R2 and for Windows 7" section. MUM and MANIFEST files, and the associated security catalog (.cat) files, are extremely important to maintaining the state of the updated component. The security catalog files, for which the attributes are not listed, are signed with a Microsoft digital signature.
For all supported x86-based versions of Windows 7
File nameFile versionFile sizeDateTimePlatform
Cmd.exe6.1.7600.20713302,59214-May-201002:23x86
For all supported x64-based versions of Windows 7 and of Windows Server 2008 R2
File nameFile versionFile sizeDateTimePlatform
Cmd.exe6.1.7600.20713345,08814-May-201001:50x64
Cmd.exe6.1.7600.20713302,59214-May-201002:23x86
For all supported IA-64-based versions of Windows Server 2008 R2
File nameFile versionFile sizeDateTimePlatform
Cmd.exe6.1.7600.20713427,00814-May-201001:12IA-64
Cmd.exe6.1.7600.20713302,59214-May-201002:23x86

↑ Back to the top


Workaround

To work around this issue, start a process, then change the process affinity.

To change the process affinity, start the Taskmgr.exe utility, click the Processes tab, and then click Set Affinity. Or, use a program that calls the Win32 API.

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

↑ Back to the top


More Information

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 nameUpdate.mum
File versionNot applicable
File size1,680
Date (UTC)14-May-2010
Time (UTC)14:46
PlatformNot applicable
File nameX86_8ff5c208de820a3f23ecb2172c25ec66_31bf3856ad364e35_6.1.7600.20713_none_6868ecf613b450e2.manifest
File versionNot applicable
File size701
Date (UTC)14-May-2010
Time (UTC)14:46
PlatformNot applicable
File nameX86_microsoft-windows-commandprompt_31bf3856ad364e35_6.1.7600.20713_none_8bb66e3d9496bfda.manifest
File versionNot applicable
File size11,450
Date (UTC)14-May-2010
Time (UTC)09:21
PlatformNot applicable
Additional files for all supported x64-based versions of Windows 7 and of Windows Server 2008 R2
File nameAmd64_da6e0170a834e89dcda995ffd3c2c09b_31bf3856ad364e35_6.1.7600.20713_none_8ae59c1512489303.manifest
File versionNot applicable
File size705
Date (UTC)14-May-2010
Time (UTC)14:46
PlatformNot applicable
File nameAmd64_e4185a30c8a074969311bf740976f660_31bf3856ad364e35_6.1.7600.20713_none_2202ca9ba02fecde.manifest
File versionNot applicable
File size705
Date (UTC)14-May-2010
Time (UTC)14:46
PlatformNot applicable
File nameAmd64_microsoft-windows-commandprompt_31bf3856ad364e35_6.1.7600.20713_none_e7d509c14cf43110.manifest
File versionNot applicable
File size11,458
Date (UTC)14-May-2010
Time (UTC)04:12
PlatformNot applicable
File nameUpdate.mum
File versionNot applicable
File size2,334
Date (UTC)14-May-2010
Time (UTC)14:46
PlatformNot applicable
File nameWow64_microsoft-windows-commandprompt_31bf3856ad364e35_6.1.7600.20713_none_f229b4138154f30b.manifest
File versionNot applicable
File size10,360
Date (UTC)14-May-2010
Time (UTC)04:56
PlatformNot applicable
Additional files for all supported IA-64-based versions of Windows Server 2008 R2
File nameIa64_46df141649eef34c18ee74d713fdf969_31bf3856ad364e35_6.1.7600.20713_none_b3d0607a1020ba54.manifest
File versionNot applicable
File size703
Date (UTC)14-May-2010
Time (UTC)14:46
PlatformNot applicable
File nameIa64_e4185a30c8a074969311bf740976f660_31bf3856ad364e35_6.1.7600.20713_none_c5e5d30de7d084a4.manifest
File versionNot applicable
File size704
Date (UTC)14-May-2010
Time (UTC)14:46
PlatformNot applicable
File nameIa64_microsoft-windows-commandprompt_31bf3856ad364e35_6.1.7600.20713_none_8bb812339494c8d6.manifest
File versionNot applicable
File size11,454
Date (UTC)14-May-2010
Time (UTC)03:43
PlatformNot applicable
File nameUpdate.mum
File versionNot applicable
File size1,690
Date (UTC)14-May-2010
Time (UTC)14:46
PlatformNot applicable
File nameWow64_microsoft-windows-commandprompt_31bf3856ad364e35_6.1.7600.20713_none_f229b4138154f30b.manifest
File versionNot applicable
File size10,360
Date (UTC)14-May-2010
Time (UTC)04:56
PlatformNot applicable

↑ Back to the top


Keywords: kb, kbautohotfix, kbqfe, kbhotfixserver, kbfix, kbsurveynew, kbexpertiseadvanced

↑ Back to the top

Article Info
Article ID : 2028687
Revision : 2
Created on : 9/20/2018
Published on : 9/20/2018
Exists online : False
Views : 300