Linux – NFS write performance

ext3linuxnfsopenfilervmware-esxi

We have three VMware ESXi 4 hosts serving VM's from an OpenFiler NFS share.
Every host has a direct gigabit connection to the NAS. Although read performance has been great, writing files inside the VM guests are suffering.

The recommended configuration for data integrity is to export NFS shares with the sync option and mount ext3 with data=journal.

I'd like to compare the behaviour of the maximum integrity configuration with the maximum I/O performance configuration. To configure for performance I exported the NFS share as

/mnt/raided/main/vm 10.0.0.0/255.255.0.0(rw,anonuid=96,anongid=96,secure,root_squash,wdelay,async)

while ext3 is mounted with

/dev/raided/main /mnt/raided/main ext3 defaults,usrquota,grpquota,acl,user_xattr,data=writeback,noatime

Will these configuration options give me optimal I/O performance? How about changing the file system? Will XFS improve performance significantly?

Other than the NAS crashing or power failures, what can cause data integrity issues with this configuration?

Best Answer

I would think hard about using sync. I'm reminded about the Dirty Harry 'Do you feel lucky' speech.

NFS v2 and v3 is designed such that when the write is acked from the server to the client the data is on disk. This allows NFS to be stateless, and, therefore, the server COULD reboot between each request. One hopes not, but it could happen.

This means that if the client sees the ACK on the write then it doesn't have to care anymore about the data being on disk.

If you use async then this is not true anymore. It will be way faster though. Basically though if you use async, and, the server crashes, you probably should reboot the clients unless you know exactly what they do since if they are expecting to keep multiple files in sync the client may believe they are in sync, when, in fact, they are not.

Related Topic