Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have two VPS's - One is running 2008 Server R2 and the other is a Ubuntu 12.04 installation. I am using the Windows VPS for RD sessions for Quickbooks and a couple other apps and using the Ubuntu VPS as a NFS file store as well as a OpenVPN endpoint. The problem is that NFS performance through the VPN is downright horrible and by this I mean often times it wont even connect and times out frequently.

If I set up the NFS outside the tunnel performance is okay...not great but manageable so I know its the VPN tunnel.

Are there any tweaks for openvpn or NFS I can play around with to boost performance?

share|improve this question
You are trying to make NFS do something (far) out of spec. You WebDAV idea may work, but over that story of latency WebDAV may work better, but QuickBooks is probably not the best solution. Some short of web app will probably be better –  chriscowley May 9 at 7:28

2 Answers 2

I did all the tweaks to get the optimal NFS performance over an ipsec link and "ls /mnt/remote1/etc" was still taking 12.5s. (i'm 280ms away and 13Mbps/2Mbps is my slowest link)

After some searching, I kept coming across WebDAV as an alternative. I'm using Apache with webdav and davfs2 on the client to mount the share. With this setup the ls went from 12.5 secs to 1.5 secs, and I'm getting 10Mbps download speeds. Very usable now.

If you want root access, then you need to build apache with "CFLAGS=-DBIG_SECURITY_HOLE". This is OK for me as all the users have root access, and I'm also only serving webdav via the ipsec tunnel.

share|improve this answer

A few things to try:

Look at the following options in OpenVPN: fragment, mssfix, link-mtu. Basically, everything that has to do with packet size and fragmentation. Too small VPN packets may degrade performance by fragmenting NFS packets. OTOH, too large VPN packets may degrade performance because some routers don't handle them well. It's hard to draw a simple, general rule here.

Try to enable/disable compression on OpenVPN and see how that influences performance.

Make sure your VPN server uses UDP for transport, not TCP.

On the NFS client side, look at the options: retrans, rsize, wsize - or anything else related to packet size and error handling. Depending on your situation, smaller packet sizes may actually improve performance (on a LAN the opposite is typically the case).

There is no sure-fire answer to this type of problem, but the issue is likely to be in the areas indicated above.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.