Managing Network File Systems in Oracle® Solaris 11.2

Exit Print View

Updated: July 2014

lockd Daemon

The lockd daemon supports record-locking operations on NFS files. The lockd daemon manages RPC connections between the client and the server for the Network Lock Manager (NLM) protocol. The daemon is normally started without any options. You can use three options with this command. You can set these options either from the command line or by setting parameters using the sharectl command. For more information, see the lockd (1M) man page.

Note -  The LOCKD_GRACE_PERIOD keyword and the –g option have been deprecated. The deprecated keyword is replaced with the new grace_period parameter. If both keywords are set, the value for grace_period overrides the value for LOCKD_GRACE_PERIOD.

Like LOCKD_GRACE_PERIOD, the grace_period=graceperiod parameter sets the number of seconds after a server reboot that the clients have to reclaim both NFS Version 3 locks, provided by NLM, and NFS Version 4 locks.

The lockd_retransmit_timeout=timeout parameter selects the number of seconds to wait before retransmitting a lock request to the remote server. This option affects the NFS client-side service. The default value for timeout is 5 seconds. Decreasing the timeout value can improve response time for NFS clients on a “noisy” network. However, this change can cause additional server load by increasing the frequency of lock requests. The same parameter can be used from the command line by starting the daemon with the –t timeout option.

The lockd_servers=number parameter specifies the maximum number of concurrent lockd requests. The default value is 1024.

The nthreads parameter specifies the maximum number of concurrent threads that the server can handle. All NFS clients that use UDP share a single connection with the NFS server. Under these conditions, you might have to increase the number of threads that are available for the UDP connection. A minimum calculation would be to allow two threads for each UDP client. However, this number is specific to the workload on the client, so two threads per client might not be sufficient. The disadvantage to using more threads is that when the threads are used, more memory is used on the NFS server. If the threads are never used, however, increasing nthreads has no effect. The same parameter can be used from the command line by starting the daemon with the –nthreads option.