Difference between revisions of "GSP Virtualisation with Xen"

From PDP/Grid Wiki
Jump to navigationJump to search
Line 255: Line 255:
 
  xe-switch-network-backend bridge
 
  xe-switch-network-backend bridge
  
 +
Then, configure
 +
sysctl -w net.core.rmem_max=134217728 # BDP
 +
sysctl -w net.core.wmem_max=134217728 # BDP
 +
sysctl -w net.ipv4.tcp_rmem="4096 87380 134217728 " # _ _ BDP
 +
sysctl -w net.ipv4.tcp_wmem="4096 65536 134217728 " # _ _ BDP
 +
sysctl -w net.core.netdev_max_backlog=300000
 +
 +
It also helped significantly to increase the txqueuelen on the '''vif''' interface to the VM.
 +
ifconfig vif3.0 txqueuelen 300000
 +
almost doubles the network throughput. Of course the txqueuelen was already set to 300000 on the physical interfaces. There is no way to make this permanent yet, so a cronjob doing
 +
ifconfig | grep -P '^vif\d+\.\d+' |  awk '{system("ifconfig "$1" txqueuelen 300000")}'
 +
may help there.
 +
 +
Trond Eirik Haavarstein's blog post (see below) also had this nice script to be executed on each dom0, which got another 100Mbps:
 +
 +
#! /bin/sh
 +
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
  
 
Some references:
 
Some references:
 
* http://wiki.xen.org/xenwiki/Network_Throughput_Guide.html
 
* http://wiki.xen.org/xenwiki/Network_Throughput_Guide.html
 +
* http://www.xenappblog.com/2010/citrix-xenserver-slow-network-performance by Trond Eirik Haavarstein
 +
* http://djlab.com/2011/05/dropped-vif-tx-packets-on-xenserver/ (on the txqueue length on vifs)
  
 
== How NOT to copy your LVMs from RHEL5 ==
 
== How NOT to copy your LVMs from RHEL5 ==

Revision as of 08:09, 9 March 2012