From the Blogosphere
Performance Tuning Windows 2012: Network Subsystem | Part 1
NDIS, the protocol stack, and user mode applications
By: Hovhannes Avoyan
Jan. 15, 2013 08:00 AM
In this article of the Performance Tuning Windows 2012 series we’ll focus on the Networking Subsystem. We’ll approach the various optimization guidelines by layer, starting with the hardware and drivers. We’ll also cover NDIS, the protocol stack, and user mode applications. Let’s start by looking at the network adapter itself and some of the features high-end adapters support that you can use to optimize network-intensive workloads. If you’re running any network-intensive application, you’ll need a high-performance network adapters. In this section we’ll explore some considerations for selecting a suitable network adapter.
Receive-side scaling (RSS) is a network driver technology that enables the efficient distribution of network receive processing across multiple CPUs in multiprocessor systems.
Receive-Side Scaling (RSS)
· Windows PowerShell: Get-NetAdapterRSS, Set-NetAdapterRSS, Enable-NetAdapterRss, Disable-NetAdapterRss. These cmdlets allow you to view and modify RSS parameters.
· RSS Profiles: Used to determine which logical processors are assigned to which network adapter. Possible profiles are:
o Closest. Logical processor numbers near the network adapter’s base RSS processor are preferred. Windows may rebalance logical processors dynamically based on load.
o ClosestStatic. Logical processor numbers near the network adapter’s base RSS processor are preferred. Windows will not rebalance logical processors dynamically based on load.
o NUMA. Logical processor numbers will tend to be selected on different NUMA nodes to distribute the load. Windows may rebalance logical processors dynamically based on load.
o NUMAStatic. This is the default profile. Logical processor numbers will tend to be selected on different NUMA nodes to distribute the load. Windows will not rebalance logical processors dynamically based on load.
o Conservative: RSS uses as few processors as possible to sustain the load. This option helps reduce the number of interrupts.
You can use the set-netadapterRSS cmdlet to choose how many logical processors can be used for RSS on a per-network adapter basis, the starting offset for the range of logical processors, and which node the network adapter allocates memory from:
· MaxProcessors: Sets the maximum number of RSS processors to be used, ensuring application traffic is bound to a maximum number of processors on an interface.
· BaseProcessorGroup: Sets the base processor group of a NUMA node, affecting the processor array used by RSS.
· MaxProcessorGroup: Sets the Max processor group of a NUMA node, affecting the processor array used by RSS.
· BaseProcessorNumber: Sets the base processor number of a NUMA node, allowing partitioning processors across network adapters and specifying the first logical processor in the range of RSS processors that is assigned to each adapter.
· NumaNode: The NUMA node that each network adapter can allocate memory from.
· NumberofReceiveQueues: If your logical processors seem to be underutilized for receive traffic, you can try increasing the number of RSS queues from the default of 2 to the maximum number supported.
RSS does not provide any interaction with virtual machines, instead you can configure VMQ. RSS can be enabled for virtual machines in the case of SR-IOV because the virtual function driver supports RSS capability. In this case, the guest and the host will have the benefit of RSS. The host however, does not get RSS capability because the virtual switch is enabled with SR-IOV.
Receive-Segment Coalescing (RSC)
In Windows Server 2012 you can use the following PowerShell cmdlets to configure RSC capable adapters: Enable-NetAdapterRsc, Disable-NetRsc, Get-NetAdapterAdvancedProperty, and Set-NetAdapterAdvancedProperty. RSC can be examined using the cmdlets Get-NetAdapterRSC and Get-NetAdapterStatistics. The Get cmdlet shows if RSC is enabled and if TCP enables RSC to be in operational state. In the example above, IPv4 RSC is enabled. To understand failures, you can view the coalesced bytes or exceptions caused by entering the following command:
PS C:\Users\Administrator> $x = Get-NetAdapterStatistics “myAdapter”
PS C:\Users\Administrator> $x.rscstatistics
CoalescedBytes : 0
CoalescedPackets : 0
CoalescingEvents : 0
CoalescingExceptions : 0
RSC and virtualization
Network Adapter Resources
A few network adapters actively manage their resources to achieve optimum performance. Several network adapters let the administrator manually configure resources by using the Advanced Networking tab for the adapter. For such adapters, you can set the values of a number of parameters including the number of receive buffers and send buffers. In Windows Server 2012, you can configure advanced network settings using the following PowerShell cmdlets:
Message-Signaled Interrupts (MSI/MSI-X)
These settings serve as guidelines only . Depending on the workload, your network adapter(s), and your specific situation, your experience can be different. In our next article we’ll go deeper into tuning the network adapter and utilizing some of the features we discussed.
Latest Cloud Developer Stories
Subscribe to the World's Most Powerful Newsletters
Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
SYS-CON Featured Whitepapers
Most Read This Week