Welcome!

AJAX & REA Authors: Elizabeth White, David H Deans, Scott Hirsch, Carmen Gonzalez, Pat Romanski

Related Topics: .NET, Open Source, AJAX & REA, Silverlight, Open Web, CRM

.NET: Blog Feed Post

Performance Tuning Windows 2012: Network Subsystem | Part 1

NDIS, the protocol stack, and user mode applications

Offload Capabilities
Offloading tasks can reduce CPU usage on the server, which improves the overall system performance. The network stack in Windows 2012 (and prior versions of the OS) can offload one or more tasks to a network adapter permitted you have an adapter with offload capabilities. The table below lists the details about offload capabilities:

Receive-side scaling (RSS) is a network driver technology that enables the efficient distribution of network receive processing across multiple CPUs in multiprocessor systems.

Checksum calculation

The network stack can offload the calculation and validation of Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) checksums on send and receive code paths. It can also offload the calculation and validation of IPv4 and IPv6 checksums on send and receive code paths.

IP security authentication and encryption

The TCP/IP transport layer can offload the calculation and validation of encrypted checksums for authentication headers and Encapsulating Security Payloads (ESPs). The TCP/IP transport layer can also offload the encryption and decryption of ESPs.

Segmentation of large TCP packets

The TCP/IP transport layer supports Large Send Offload v2 (LSOv2). With LSOv2, the TCP/IP transport layer can offload the segmentation of large TCP packets to the hardware.

Receive Segment Coalescing (RSC)

RSC is the ability to group packets together to minimize the header processing that is necessary for the host to perform. A maximum of 64 KB of received payload can be coalesced into a single larger packet for processing.

Receive-Side Scaling (RSS)

Receive-Side Scaling (RSS)
Windows Server 2012 (as well as Windows Server 2008 R2, and Windows Server 2008) supports Receive Side Scaling (RSS). RSS directs network processing to up to one logical processor per core. For example, given a server with Intel Hyper-Threading and 4 cores (8 logical processors), RSS will use no more than 4 logical processors for network processing.
RSS distributes incoming network I/O packets among logical processors so that packets that belong to the same TCP connection are processed on the same logical processor. RSS also load balances UDP unicast and multicast traffic from Windows Server 2012, and it routes related flows (as determined by hashing the source and destination addresses) to the same logical processor, preserving the order of related arrivals. Windows Server 2012 provides the following methods to tune RSS behavior:

· 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.

set-netadapterRSS –Name “Ethernet” –MaxProcessors <value>

· BaseProcessorGroup: Sets the base processor group of a NUMA node, affecting the processor array used by RSS.

set-netadapterRSS –Name “Ethernet” –BaseProcessorGroup <value>

· MaxProcessorGroup: Sets the Max processor group of a NUMA node, affecting the processor array used by RSS.

set-netadapterRSS –Name “Ethernet” –MaxProcessorGroup <value>

· 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.

set-netadapterRSS –Name “Ethernet” –BaseProcessorNumber <Byte Value>

· NumaNode: The NUMA node that each network adapter can allocate memory from.

set-netadapterRSS –Name “Ethernet” –NumaNodeID <value>

· 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.

set-netadapterRSS –Name “Ethernet” –NumberOfReceiveQueues <value>

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)
Receive Segment Coalescing can improve performance by reducing the number of IP headers that are processed for a given amount of received data.  You should use RSC to tune performance of received data by grouping (or coalescing) smaller packets into larger units. This can reduce latency and increase throughput for received heavy workloads. On network adapters supporting RSC, make sure that it is enabled, unless you have low latency, low throughput networking needs that benefit from RSC being turned off.

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
If the host adapter is not bound to the virtual switch, RSC is supported on the physical host. If the adapter is bound to the virtual switch, Windows 2012 will disable RSC on the physical host.
RSC can be enabled for a virtual machine when SR-IOV is enabled. In this case, virtual functions will support RSC capability; hence, virtual machines will also get the benefit of RSC.

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:

  • Get-NetAdapterAdvancedProperty
  • SetNetAdapterAdvancedProperty
  • Enable-NetAdapter
  • Enable-NetAdapterBinding
  • Enable-NetAdapterChecksumOffload
  • Enable-NetAdapterLso
  • Enable-NetAdapterIPSecOffload
  • Enable-NetAdapterPowerManagemetn
  • Enable-NetAdapterQos
  • Enable-NetAdapterRDMA
  • Enable-NetAdapter
  • Enable-NetAdapterSriov

Message-Signaled Interrupts (MSI/MSI-X)
Network adapters that support MSI/MSI-X can target specific logical processors. If your network adapter also support RSS, then a logical processor can be dedicated to servicing interrupts and deferred procedure calls (DPCs) for a given TCP connection. This will greatly improve performance, by preserving the TCP cache.

Interrupt Moderation
Lastly, we’ll discuss interrupt moderation. Some network adapters expose different interrupt moderation levels, or buffer coalescing parameters, or both. You definitely should consider buffer coalescing when the network adapter does not perform interrupt moderation. Interrupt moderation will reduce CPU utilization because it minimizes the per-buffer processing cost, but you should consider that interrupt-moderation  and buffer coalescing can have a negative impact on latency-sensitive situations. The table below lists the suggested adapter features for various server roles.

Role

Checksum offload

Large Send Offload (LSO)

Receive-side scaling (RSS)

Receive Segment Coalescing (RSC)

File server

X

X

X

X

Web server

X

X

X

Mail server (short-lived connections)

X

X

Database server

X

X

X

FTP server

X

X

X

Media server

X

X

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.

Read the original blog entry...

More Stories By Hovhannes Avoyan

Hovhannes Avoyan is the CEO of Monitis, Inc., a provider of on-demand systems management and monitoring software to 50,000 users spanning small businesses and Fortune 500 companies.

Prior to Monitis, he served as General Manager and Director of Development at prominent web portal Lycos Europe, where he grew the Lycos Armenia group from 30 people to over 200, making it the company's largest development center. Prior to Lycos, Avoyan was VP of Technology at Brience, Inc. (based in San Francisco and acquired by Syniverse), which delivered mobile internet content solutions to companies like Cisco, Ingram Micro, Washington Mutual, Wyndham Hotels , T-Mobile , and CNN. Prior to that, he served as the founder and CEO of CEDIT ltd., which was acquired by Brience. A 24 year veteran of the software industry, he also runs Sourcio cjsc, an IT consulting company and startup incubator specializing in web 2.0 products and open-source technologies.

Hovhannes is a senior lecturer at the American Univeristy of Armenia and has been a visiting lecturer at San Francisco State University. He is a graduate of Bertelsmann University.

@CloudExpo Stories
When an enterprise builds a hybrid IaaS cloud connecting its data center to one or more public clouds, security is often a major topic along with the other challenges involved. Security is closely intertwined with the networking choices made for the hybrid cloud. Traditional networking approaches for building a hybrid cloud try to kludge together the enterprise infrastructure with the public cloud. Consequently this approach requires risky, deep "surgery" including changes to firewalls, subnets...
The Internet of Things (IoT) promises to evolve the way the world does business; however, understanding how to apply it to your company can be a mystery. Most people struggle with understanding the potential business uses or tend to get caught up in the technology, resulting in solutions that fail to meet even minimum business goals. In his session at Internet of @ThingsExpo, Jesse Shiah, CEO / President / Co-Founder of AgilePoint Inc., will show what is needed to leverage the IoT to transform...
SYS-CON Events announced today that AIC, a leading provider of OEM/ODM server and storage solutions, will exhibit at SYS-CON's 16th International Cloud Expo®, which will take place on June 9-11, 2015, at the Javits Center in New York City, NY. AIC is a leading provider of both standard OTS, off-the-shelf, and OEM/ODM server and storage solutions. With expert in-house design capabilities, validation, manufacturing and production, AIC's broad selection of products are highly flexible and are conf...
We are all here because we are sold on the transformative promise of The Cloud. But what good is all of this ephemeral, on-demand infrastructure if your usage doesn't actually improve the agility and speed of your business? How must Operations adapt in order to avoid stifling your Cloud initiative? In his session at DevOps Summit, Damon Edwards, co-founder and managing partner of the DTO Solutions, will highlight the successful organizational, process, and tooling patterns of high-performing c...
SYS-CON Events announced today that O'Reilly Media has been named “Media Sponsor” of SYS-CON's 15th International Cloud Expo®, which will take place on November 4–6, 2014, at the Santa Clara Convention Center in Santa Clara, CA. O'Reilly Media spreads the knowledge of innovators through its books, online services, magazines, and conferences. Since 1978, O'Reilly Media has been a chronicler and catalyst of cutting-edge development, homing in on the technology trends that really matter and spurri...
SYS-CON Events announced today that Stratogent will exhibit at SYS-CON's 15th International Cloud Expo®, which will take place on November 4–6, 2014, at the Santa Clara Convention Center in Santa Clara, CA. Stratogent is a custom managed services organization based in San Mateo, California. We design, implement, and support mission critical infrastructure 24x7 on premises, in datacenters and in the Cloud. Since 2005, we have acted as an extension of internal IT teams, achieving a customer reten...
SYS-CON Events announced today that Aria Systems, the recurring revenue expert, has been named "Bronze Sponsor" of SYS-CON's 15th International Cloud Expo®, which will take place on November 4-6, 2014, at the Santa Clara Convention Center in Santa Clara, CA. Aria Systems helps leading businesses connect their customers with the products and services they love. Industry leaders like Pitney Bowes, Experian, AAA NCNU, VMware, HootSuite and many others choose Aria to power their recurring revenue bu...
The Transparent Cloud-computing Consortium (abbreviation: T-Cloud Consortium) will conduct research activities into changes in the computing model as a result of collaboration between "device" and "cloud" and the creation of new value and markets through organic data processing High speed and high quality networks, and dramatic improvements in computer processing capabilities, have greatly changed the nature of applications and made the storing and processing of data on the network commonplace. ...
Seagate has a strong track record of collaborating with others to develop better cloud solutions. The Seagate Cloud Builder Alliance program, for example, leverages the company’s knowledge of storage and cloud-optimized solutions to give cloud service providers the customized, flexible and scalable server and storage solutions to meet the high levels of service their customers demand. Seagate also is a member of the OpenStack Foundation and Open Compute Project to help define and promote open-so...
The Internet of Things (IoT) is going to require a new way of thinking and of developing software for speed, security and innovation. This requires IT leaders to balance business as usual while anticipating for the next market and technology trends. Cloud provides the right IT asset portfolio to help today’s IT leaders manage the old and prepare for the new. Today the cloud conversation is evolving from private and public to hybrid. This session will provide use cases and insights to reinforce t...
What process has your provider undertaken to ensure that the cloud tenant will receive predictable performance and service? What was involved in the planning? Who owns and operates the data center? What technology is being used? How is it being supported? In his session at 14th Cloud Expo, Dave Weisbrot, Cloud Business Manager for QTS, will provide the attendees a look into what it takes to stand up and stand behind a highly available certified cloud IaaS.
SYS-CON Events announced today that Gigaom Research has been named "Media Sponsor" of SYS-CON's 15th International Cloud Expo®, which will take place on November 4-6, 2014, at the Santa Clara Convention Center in Santa Clara, CA. Ashar Baig, Research Director, Cloud, at Gigaom Research, will also lead a Power Panel on the topic "Choosing the Right Cloud Option." Gigaom Research provides timely, in-depth analysis of emerging technologies for individual and corporate subscribers. Gigaom Research'...
I'll be hosting an SAP HANA Cloud webinar at 11am eastern time, Wednesday, October 29. You can sign up now. Featured speakers will be Allan Adler, Managing Partner, Channel Cloud Consulting, and Thorsten Leiduck, VP ISVs & Digital Commerce, SAP. Attendees will learn about • Cloud economics, hybrid cloud strategy, market size and opportunity • Introduction to SAP HANA Cloud Platform and how to: - Build new next-generation applications - Extend on-premise solutions non-disruptively throu...
How does one bridge the gap between traditional enterprise storage infrastructures and the private, hybrid, and public cloud? In his session at 15th Cloud Expo, Dan Pollack, Chief Architect of Storage Operations at AOL Inc., will exam the workload differences and required changes to reuse existing knowledge and components when building and using a cloud infrastructure. He will look into the operational considerations, tool requirements, and behavioral changes required for private cloud storage...
Sanjeev Sharma is the latest author to join DevOps Journal. Sanjeev is a solution architect and DevOps Worldwide lead with Rational Software, an IBM brand and the author of 'DevOps for Dummies.' DevOps Journal is focused on this critical enterprise IT topic in the world of cloud computing. SYS-CON Media CEO Carmen Gonzalez is founder and publisher of DevOps Journal, and Roger Strukhoff, long-time SYS-CON editor and the conference chair of Cloud Expo is the editor of the world's leading DevOps...
Join both SAP and Channel Cloud Consulting for our webcast and uncover how you can extend your reach to capture a piece of the US$17 billion cloud application services market with SAP. Learn about SAPs market-leading SAP HANA Cloud Platform and an exciting opportunity to join SAPs growing ecosystem of Application Development partners. When: October 29, 11:00am EST Speakers: Allan Adler, Managing Partner, Channel Cloud Consulting Thorsten Leiduck, Vice President ISVs & Digital Commerce, SAP
SYS-CON Events announced today that IBM is holding a Bluemix Developer Playground on November 5, 10:30 am to 5:30 pm at 15th Cloud Expo. 15th Cloud Expo, co-located with @ThingsExpo, Big Data Expo, and DevOps Summit is taking place Nov. 4–6, 2014, at the Santa Clara Convention Center in Santa Clara, CA. The labs, for developers of all levels, will highlight the ease of use of Bluemix, its services and functionality and provide short-term introductory projects that developers can complete betw...
The major cloud platforms defy a simple, side-by-side analysis. Each of the major IaaS public-cloud platforms offers their own unique strengths and functionality. Options for on-site private cloud are diverse as well, and must be designed and deployed while taking existing legacy architecture and infrastructure into account. Then the reality is that most enterprises are embarking on a hybrid cloud strategy and programs. In this Power Panel at 15th Cloud Expo, moderated by Ashar Baig, Research ...
The Industrial Internet revolution is now underway, enabled by connected machines and billions of devices that communicate and collaborate. The massive amounts of Big Data requiring real-time analysis is flooding legacy IT systems and giving way to cloud environments that can handle the unpredictable workloads. Yet many barriers remain until we can fully realize the opportunities and benefits from the convergence of machines and devices with Big Data and the cloud, including interoperability, da...
Software AG helps organizations transform into Digital Enterprises, so they can differentiate from competitors and better engage customers, partners and employees. Using the Software AG Suite, companies can close the gap between business and IT to create digital systems of differentiation that drive front-line agility. We offer four on-ramps to the Digital Enterprise: alignment through collaborative process analysis; transformation through portfolio management; agility through process automation...