Solaris 10 NFS server parameters that we change and why

June 22, 2009

One of the ways that Solaris does not make me happy is that they do not seem to have changed various system defaults since, oh, 1996, when machines were much smaller than they are now. As a result, we have accumulated a set of NFS server parameters that we have had to change in order to get decent performance and functionality.

(This set is not particularly novel, which is part of the irritation; pretty much everyone winds up making many of these changes sooner or later. But instead of the system shipping with sensible defaults, you are left to discover them on your own, or not discover them and wonder why your theoretically powerful and modern Solaris NFS server is performing pathetically badly. Or why it is exploding.)

Unless mentioned otherwise, all of these parameters are set (or changed, really) in /etc/default/nfs:

  • NFSD_SERVERS, from 16 to 512

    The maximum number of concurrent NFS requests. The default is too low to get decent performance under load, and has been for years. This is one of the standard tuneables that everyone says you should change, but beware; the usual advice on the Internet is to set it to 1024, but on our fileservers having that many NFS server threads locked up my test system (running on reasonably beefy hardware).

    (Apparently the NFS server threads are very high priority, and if you have too many of them they will happily eat all of your CPU.)

  • LOCKD_SERVERS, from 20 to 128
    LOCKD_LISTEN_BACKLOG, from 32 to 256

    The maximum number of simultaneous NFS lock requests. We saw NFS locking failures under production load that were cured by doing this. I believe that LOCKD_SERVERS is the important one, but we haven't tested this.

  • NFS_SERVER_VERSMAX, from 4 to 3

    The maximum NFS protocol version that the server will use.

    We're wimps. NFS v4 is peculiar and we've never tested it, and I have no desire to find out all the ways that Linux and Solaris don't get along about it. So even if machines think that they're capable of doing it, we don't want them to.

  • set nfssrv:nfs_portmon = 1, which is set in /etc/system.

    Require NFS requests to come from reserved ports. In theory you might be able to change this on a live system with mdb -kw, but really, just schedule a reboot.

As a cautionary note on Solaris 10 x86, remember to update the boot archive with 'bootadm update-archive' every time you change /etc/system. I don't think that changing /etc/default/nfs requires updating the boot archive, but it can't hurt to run the command anyways.

Necessary disclaimer: these work for us but may not work for you. Always test your system.

Comments on this page:

From at 2013-08-08 17:20:50:

Would these settings effect local zones acting as NFS clients?

We are getting nfs hangs on local zones, but only once we install more than 12 or so zones.

By cks at 2013-08-09 10:08:17:

I'm afraid I have no experience with Solaris zones so I don't know how (or if) these settings affect them.

Written on 22 June 2009.
« Why GNU tools are sometimes not my favorite programs
Another source of stickyness for social web sites »

Page tools: View Source, View Normal, Add Comment.
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Mon Jun 22 23:57:18 2009
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.