XenServer performance tweaks!
Just a few notes I'm making here about performance tuning on XenServer 5.5.0 - this is pretty much unsupported by Citrix, but since it's "just" Linux and if you have enough nous, it does make a difference.
To get your NICs bonded using an industry standard link aggregation protocol (like LACP), drill down to /etc/modprobe.d/bonding and modify as follows:
To get your NICs bonded using an industry standard link aggregation protocol (like LACP), drill down to /etc/modprobe.d/bonding and modify as follows:
options bonding mode=802.3ad miimon=100 downdelay=200 updelay=200(I wish XenServer used a more modern kernel then I could specify ad_select=bandwidth xmit_hash_policy=layer2+3 too)
This pretty much makes your NIC bond work the same way your switch does, instead of using Linux's own bonding system. For our Cisco switch this works better. You can also go in and edit interface-reconfigure and supply your own bonding defaults (perhaps a little nicer, you can also fix your MTU here without unmanaging your NICs), or try and set these as "other-config" options but that's just a pain in the backside to do for every VM.
Want better performance out of NFS SR's, have an NFS4-capable SAN? Drill down to /opt/xensource/sm/nfs.py and modify the line 64:
options = "soft,timeo=%d,retrains=%d,proto=%s,noac" % (SOFTMOUNT_TIMEOUT,
(the difference being the protocol is prefixed with proto=) then line 69:
util.pread(["mount.nfs4", "%s:%s"(the difference simply being that the script calls mount.nfs4 instead of mount.nfs)
And that's it. We reduced latency by a couple milliseconds, and got a ton of extra bandwidth out of it (~380MB/s instead of 130MB/s) versus NFSv3. That's before enabling jumbo frames.




