Disable TCP Offloading in Xen and Persist after Boot

Blaine's picture

Have you ever wanted to disable offloading of all your Xen DomU's?  How about doing it without having to think about it?  The future is now, and it means you can disable gso, ufo, tso, sg, tx, and rx offloading in one quick swoop with this simple script.  (Note: YMMV, and this should be considered "use at your own risk" as I am not a programmer, and there potentially could be issues with the script.  This was run directly on XenServer 7.4.0 and hasn't been tested in other environments)

#!/bin/bash
echo "This script is disabling gso, ufo, tso, sg, tx, and rx offloading in all Xen VMs"
for tbl in $(xe vif-list | awk '/uuid/{print$5}')
do
echo "Setting UUID: $tbl"
xe vif-param-set uuid=$tbl other-config:ethtool-gso="off";
xe vif-param-set uuid=$tbl other-config:ethtool-ufo="off";
xe vif-param-set uuid=$tbl other-config:ethtool-tso="off";
xe vif-param-set uuid=$tbl other-config:ethtool-sg="off";
xe vif-param-set uuid=$tbl other-config:ethtool-tx="off";
xe vif-param-set uuid=$tbl other-config:ethtool-rx="off";
done
echo "All systems updated.  Please note, if any changes were made, the VM will need to be power cycled in order for the changes to take effect.  Happy Fast Networking!"

Essentially, what this script does is utilizes the xe command to set the offloading of every VM (identified by uuid) at boot.  So when the DomU boots up, it reads the script as part of the creation of the DomU, and turns off the offloading for gso, ufo, tso, sg, tx, and rx if it's set to on.  The end result is faster networking, especially when you are placing the DomU's behind a virtualized firewall (think pfSense in a DomU routing all your traffic to the other DomU's).  With tx and rx offloading on, your network performance behind the firewall essentially drops to a crawl.  Disabling tx and rx offloading is the suggested method of increasing performance, as well as gso, ufo, tso, and sg offloading.  (source: https://support.citrix.com/article/CTX212540)

So if you have been plagued for months trying to figure out how to disable TCP Offloading in Xen without having to use ethtool every time you reboot, here you go! 

Easy Code to disable TCP Offloading in Xen

Wasn't that easy?  :)

Thought on Disable TCP Offloading in Xen and Persist after Boot

Thank you for sharing this useful posts. I am impressed with the way you explained this post. It has desirable data and also it is very interesting. You have maintained a good quality information. Keep sharing such exceptional and beneficial post. This was really informative and I got lots of information from your post. It is very interesting.Refer to get help of professional writers in assignment.

Recent Posts

Have you ever wanted to disable offloading of all your Xen DomU's? How about doing it without having to think... Read more
Video Website Themes It is essential to know how big the video market is. You have a well-operating platform with... Read more
How to create a marketing video that will stand above the rest The business world seems to be advancing every... Read more

Need Support?


Every video, every website, every chatbot, every client - 100% custom products and solutions to make your business run successfully

145 Pine Haven Shores Road #1205 Shelburne, VT

Recent Tweets

Socialize with us

               


Go to top