Improving NFS performance

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):

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/fstab

# 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/fstab

# 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

3 Replies

30 MB/sec is just about 250 Mb/sec, which is the default outbound throughput limit on each Linode. If this will be crunchy on an ongoing basis, you can open a ticket to request the limiter be raised.

Thanks hoppycat for the explanation.

That would make a whole lot of sense except for when I run the test with two or three linodes as clients.

If I am reaching the maximum transfer speed between the linodes then I should see half the speed on both the write and the read (like 15MBps on all three tests with two linodes and something like 10MBps on all three tests with the three linodes). But, the tests show near 30MBps on write, and then 15MBbs on reads and RW. And with the three linodes they hover near 30MBps on write and then 10Mbps on read and RW.

The read and RW tests fully support you explanation… The write test is throwing me off.

btw, I already have a ticket open with them (that is the first thing I did). they were saying I'm not reaching the limit. I'll get back to them on that.

Any idea on why the results would not be consistent with the limit idea?

Thanks again,

--

Jean-Marc

Update from the linode support staff. Inbound speed is unlimited. Outbound speed is capped at 250Mbps and the cap can no longer be lifted.

That would explain why I am getting the results I am getting.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct