XenServer Configuring TCP Offload Script

Found this script on the following blog to offload TCP for XenServer – http://willsani.com/2010/02/09/xenserver-5-5-network-performance-woes/[sourcecode language=”bash”]
if [[ "$1" == "–local" || "$1" == "-l" ]]; then
echo -n "disabling checksum offloading for local devices… "
for iface in $(ifconfig | awk ‘$0 ~ /Ethernet/ { print $1 }’); do
for if_mode in ${if_modes}; do
ethtool -K $iface $if_mode off 2>/dev/null
done
done
echo "done."
else
echo -n "disabling checksum offloading in xapi settings… "
for VIF in $(xe vif-list –minimal | sed -e ‘s/,/ /g’)
do
###xe vif-param-clear uuid=$VIF param-name=other-config
for if_mode in ${if_modes}; do
xe vif-param-set uuid=$VIF other-config:ethtool-${if_mode}="off"
done
done
for PIF in $(xe pif-list –minimal | sed -e ‘s/,/ /g’)
do
###xe pif-param-clear uuid=$PIF param-name=other-config
for if_mode in ${if_modes}; do
xe pif-param-set uuid=$PIF other-config:ethtool-${if_mode}="off"
done
done
echo "done."
fi
[/sourcecode]

1 comment

Leave a comment