Saturday, August 22, 2009

Offload TCP processing to the network controllers under Vista, Server 2008, and Windows 7

After upgrading my home PC to Windows 7, I was decided to see if my motherboard/CPU combination support hardware virtualization.  You need hardware virtualization support if you want to run Windows XP Mode or Windows Virtual PC.  I have an XMD Athlon X2 with an Asus M2N-SLI Deluxe and I’m not sure if that combination supports hardware virtualization.  I’m pretty sure the CPU does, but I don’t yet yet know about the motherboard.

I decided to check the  Asus support forum to see that motherboard supports hardware virtualization and while reading through the forum, I found an a post about tweaking the network settings for a boost in performance.  The TCP/IP stack in Vista has the ability to offload some of the network processing to the network controller, if the network controller has that capability.  Out of the box, Vista disables that feature to prevent problems with controllers that don’t support that feature.

From what was posted in the Asus forum, this motherboard does support that feature.  This motherboard is based on the NVIDIA nForce 570 chipset, which included dual Gigabit LAN controllers.  If you are doing CPU intensive tasks, you can gain some performance benefit by offloading the TCP processing to the network controllers.

Vista refers to this setting as the “Chimney Offload State”.  It’s easy to check and set this value.  if you have a newish motherboard with a Gigabit speed network controller, this should work for you.

To change this setting, do the following:

  1. Open an elevated command prompt.  Either right-click cmd.exe and select “Run as Administrator” or press the Start button, type “cmd” and then hold the left shift and left control keys while pressing the enter key.
  2. Check the current status of the Chimney Offload state by running the following command:
    netsh int tcp show global
    The possible values for that state are: disabled, enabled, default
  3. Run the following command to enable Chimney Offload state
    netsh int tcp set global chimney=enable

Before making the changes, check your current broadband speed.  I like the one at speedtest.net, but the others are fine.  Then after making the change, check it again.  If the performance takes a hit, set the state back to it’s original value.  Not only did it work for me, I did get a slight, but measurable, download speed increase.

Before enabling Chimney Offload:

546138390[1]

After:

546142573[1]

These tests were run a few times before and after the modification.  I picked the average score each time.  That helps even out any existing network traffic that would affect the results.  Going from 17.42 MB/s to 18.70 wasn’t a huge increase, about 7%; but I’ll take it.  There are other settings that you can tweak.  Some are mentioned in the forum posting, and they are also documented in an article in speedguide.net as well.  You don’t often get a free lunch, this is a good one to take.  This setting works for Vista, Server 2008, and Windows 7.  I still don’t know if I can get hardware virtualization, but this was an interesting diversion.

[edited on 8/24/09]
As it turns out, my CPU and motherboard do support hardware virtualization, it just took a little work.

4 comments:

  1. Note, TCP offloading can actually cause issues with various applications, SharePoint among them.

    ReplyDelete
  2. What sort of problems? Are they specific to Microsoft's implementation of the offloading or an issue with the network cord?

    ReplyDelete
  3. These sorts of issues:

    http://support.microsoft.com/kb/948496

    Sp unless offloading was fully rewritten for Vista/08, I wouldn't trust it. Given Vista's crappy network performance in general, I'm not optimistic.

    ReplyDelete
  4. Offloading was rewritten for Vista, that problem may not be applicable any more. At any rate, I'm running Windows 7 and I did see a small speed increase after making the change.

    ReplyDelete

Note: Only a member of this blog may post a comment.