Hello,
I've setup my first NFS server to host Magento and loadbalance the web layer between two linodes.
Testing the read and write performance I'm finding very strange results.
This is the performance test I'm running (in separate folders of the nfs share):
Code:
time dd if=/dev/zero of=./zero1 bs=1M count=1000 oflag=direct
time dd if=./zero1 of=/dev/null iflag=direct bs=1M
time dd if=./zero1 of=./zero3 iflag=direct oflag=direct bs=1M
When running a single client I have near 30MBps write and near 30MBps read.
When running two clients against the same NFS server then on both servers I get near 30MBps writes and 15MBps read.
When running three clients against the same NFS server then on both servers I get near 30MBps writes and 10MBps read.
It must be something stupid. I played with the RSIZE and WSIZE, move from TCP to UDP with no success. These are the current settings after a lot of trials and barely any successes.
This is my setup:
NFSServerName (Linode 2048)/etc/fstabCode:
# datastore for nfs
/dev/xvdc /data/shared-data xfs noatime,nodiratime,logbufs=8,logbsize=256k,osyncisosync,nobarrier 0 1
# exporting those containers
/data/shared-data /export/shared-data bind noatime,nodiratime,defaults,bind 0 0
Each Client (Linode 2048)/etc/fstabCode:
# shared nfs storage
NFSServerName:/shared-data /srv/shared-data nfs rsize=65536,wsize=65536,intr,noatime,nodiratime,proto=tcp,port=2049,timeo=600,retrans=2 0 1
Any suggestions or ideas?
--
Jean-Marc