Citrix XenServer Slow Network Performance

By Trond Eirik Haavarstein 20/06/2010 – 14:17

Citrix XenServer 5.6 Console 300x178 Citrix XenServer Slow Network Performance

People new to the virtualization space could get very frustrated when they find out that their Hypervisor of choice preforms much worse than a bare-metal installation. Haven’t the vendors and independent analysis like Project Virtual Reality Check stated that there is no longer any excuses for not running Citrix XenApp on a Hypervisor. The latest numbers shows that the performance are almost the same on XenServer, VMware and Hyper-V.

That being said, to get these high performances requires that you have done your homework and implemented all the Best Practices. Unfortunately there is way to many bugs out there and I’m not even going to start…but I have almost begged Citrix to pay more attention to their own Support Forum in this post.

In this post I’m going to share some important tunings related to poor network performance on Citrix XenServer 5.x family.

Disable Task Offload :

For Windows 2003 VM’s you will need to create a registry key to DisableTaskOffload – REG_DWORD = 1 under HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameter. The easiest way is to create a Group Policy to push this registry key.

DisableTaskOffload2 300x93 Citrix XenServer Slow Network Performance

Disable CheckSum Offload :

The second fix you should try if you still have poor network performance is to Disable Checksum on the XenServer interfaces, both the Virtual (VIF) and the Physical (PIF). Be aware that you don’t need to restart the XenServer or the VM’s. This script will do this automatically on all you network interfaces in your XenServer Pool.

echo Setting checksum off on VIFs
VIFLIST=`xe vif-list | grep "uuid ( RO) " | awk '{print $5}'`
for VIF in $VIFLIST
do
echo Setting ethtool-tx=off and ethtool-rx=off on $VIF
xe vif-param-set uuid=$VIF other-config:ethtool-tx="off"
xe vif-param-set uuid=$VIF other-config:ethtool-rx="off"
done
echo Setting checksum off on PIFs
PIFLIST=`xe pif-list | grep "uuid ( RO) " | awk '{print $5}'`
for PIF in $PIFLIST
do
echo Setting ethtool-tx=off and ethtool-rx=off on $PIF
xe pif-param-set uuid=$PIF other-config:ethtool-tx="off"
xe pif-param-set uuid=$PIF other-config:ethtool-rx="off"
done

Note :

Please note that this script is provided “as is” and that using this is at your own risk. Please feel free to leave comments below regarding bugs & suggested improvements in future releases.

  1. 11 Responses to “Citrix XenServer Slow Network Performance”

  2. Regarding the disable task offload key –
    What is the actual effect of that key? By which I mean, if I set it via GPO and it affects a non-virtualized server, will I be doing damage to anything?

    By Jeremy on Jun 21, 2010

  3. Hi Jeremy,

    I would recommend testing this on VM’s you have problems with. The best would be GPO Preferences – Item-Level Targeting to e.g. check if OS = Windows 2003 and Citrix Tools is installed.

    The Citrix Support Forum thread.

    Eric

    By admin on Jun 21, 2010

  4. if you use provisioning service in combination with Xen servers also check this key.
    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\xenevtchn\SetFlags 30000 hex.
    This effectively disables TSO and DMA on the Xen Tools.
    http://support.citrix.com/article/CTX125157

    By evert van maanen on Jun 21, 2010

  5. Thanks Eric!

    By Jeremy on Jun 21, 2010

  6. Thanks Evert,

    According to the KB this applies to all VM’s running on XenServer 5.0 and 5.5

    Eric

    By admin on Jun 21, 2010

  7. How do you execute the mentioned script ? In a .sh file ?

    Thanks

    By Spear on Jun 30, 2010

  8. Hi Spear,

    You could just copy & paste it into the XenServer Console or do SSH to the XenServer.

    By Trond Eirik Håvarstein on Jun 30, 2010

  9. Hi guys thank you for the TIPs

    can you kindly share your experience on this:
    http://forums.citrix.com/message.jspa?messageID=1482685#1482685

    Thank you if you will

    Roberto

    By Roberto on Jul 30, 2010

  10. Hi Roberto,

    I would recommend you forwarding the Citrix Forum Thread to @CitrixSupport on Twitter

    By Trond Eirik Haavarstein on Jul 30, 2010

  1. 2 Trackback(s)

  2. Jun 20, 2010: Tweets that mention Get better Network Performance on Citrix XenServer -- Topsy.com
  3. Jun 21, 2010: Get better Network Performance on Citrix XenServer « Home of Martin Lako

Post a Comment