NFS tuning for Mac clients

Status
Not open for further replies.

petr

Contributor
Joined
Jun 13, 2013
Messages
142
Hello!

I am using a mixture of AFP and NFS shares on my FreeNAS with Mac clients. While the AFP shares effectively max my 1Gbps connection, NFS shares only utilise approximately half of the bandwidth.

This behaviour is consistent on Mac 10.9 and 10.11. I have not performed any NFS tuning either on the Mac or FreeNAS side. Is there any tutorial/documentation on this topic?
 

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
The difference you're seeing is probably due to that fact that, by default, NFS uses sync writes.
 

petr

Contributor
Joined
Jun 13, 2013
Messages
142
The difference you're seeing is probably due to that fact that, by default, NFS uses sync writes.

Interesting - does it mean that it's less "safe" to use AFP?
 

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
You could make that case. What it really means is that the filesystem doesn't report completion until the data is committed to stable storage, but whether that makes data loss less likely depends on the application.

I use NFS shares with OS X for simplicity and stability, not for safety. For example, NFS mounts can persist for days or weeks at a time, even if the client Mac goes to sleep multiple times along the way.
 

petr

Contributor
Joined
Jun 13, 2013
Messages
142
I think it must be something to do with sync writes - the read speeds seem to be faster. Still not as fast as AFP but I am willing to attribute the 10% difference to some other factors.

To sum up - is using NOSYNC setting or similar with NFS discouraged, if so, why? And why is it not the case for AFP?
 

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
I would speculate that AFP is aimed at more casual users than NFS.

Rather than disable sync writes on NFS, I would consider whether the performance difference is really an issue. For me it isn't. If it is for you, consider installing a properly specified dedicated SLOG device.
 

petr

Contributor
Joined
Jun 13, 2013
Messages
142
I would speculate that AFP is aimed at more casual users than NFS.

Rather than disable sync writes on NFS, I would consider whether the performance difference is really an issue. For me it isn't. If it is for you, consider installing a properly specified dedicated SLOG device.

Ok, noted! Thank you very much for the recommendation.
 
Status
Not open for further replies.
Top