#PStip Enabling RSS inside Hyper-V guest OS

Note: This tip requires PowerShell 3.0 or above.

While reviewing results returned by the Best Practices Analyzer on a virtual machine, a warning about RSS (Receive Side Scaling) was raised.

image001

RSS has been around since Windows 2008. The online help states:

“RSS is a scalability technology that distributes the receive network traffic among multiple processors by hashing the header of the incoming packet. Without RSS in Windows Server® 2008 and later, network traffic is received on the first processor which can quickly reach full utilization limiting receive network throughput.”

It’s a nice surprise–RSS has now been extended to Windows Server 2012 R2 Hyper-V. The guest virtual machine can now use this functionality. To check whether my virtual network adapter was really RSS capable, I used the Get-SmbClientNetworkInterface cmdlet:

Get-SmbClientNetworkInterface |
Format-Table -Property FriendlyName,RssCapable -AutoSize

image002

To determine how the virtual network adapter was currently configured:

Get-NetAdapter | Where Status -eq "Up" |
Get-NetAdapterAdvancedProperty -DisplayName "Receive Side Scaling" |
Format-Table -AutoSize

image003

To turn on RSS on the RSS-capable virtual network adapter:

Get-NetAdapter | Where Status -eq "Up" |
Get-NetAdapterAdvancedProperty -DisplayName "Receive Side Scaling" |
Where DisplayValue -eq "Disabled" |
Enable-NetAdapterRss -Verbose

image004

Note that you can add –NoRestart switch to the Enable-NetAdapterRss  cmdlet to avoid the network adapter from being restarted immediately.

About the author: Emin Atac

Emin Atac is a system administrator who works in a European institution since 2002. He uses PowerShell on a daily basis to automate whenever possible all kind of desktop or server administration tasks from deployment to security compliance. He writes about what he learns and experiences on his blog. You can also follow him on Twitter.

Related Posts