System Administration Guide, Volume 3

Appendix B NFS Tuneables

You can set several parameters that can improve the functioning of the NFS service. You can define these parameters in /etc/system, which is read during the boot process. Each parameter can be identified by the name of the kernel module that it is in and a symbol name that identifies it.


Note -

The names of the symbols, the modules that they reside in, and the default values can change between releases. Check the documentation for the version of the active SunOS release, before making changes or applying values from previous releases.


The following topics are covered in this chapter:

Table B-1 NFS Parameters for the nfs Module

Symbol Name 

Description 

Default Setting 

nfs_32_time_ok

This symbol controls whether the NFS client or server allows file timestamps that are > Y2038. 

Defaults to off (0). You should use this symbol if the timestamp on any file is negative, which means that the date is before 1970, and you still want to be able to access these files. 

nfs_acl_cache

This symbol controls whether ACLs are cached on clients that are using the NFS_ACL protocol. 

Defaults to off (0). You probably can safely enable this symbol (1), which might be in future Solaris releases. 

nfs_cots_timeo

This symbol controls the default time-out value of NFS version 2 client operations over connection-oriented transports. 

Defaults to 600 tenths of a second. 

nfs3_cots_timeo

This symbol controls the default time-out value of NFS version 3 client operations over connection-oriented transports. 

Defaults to 600 tenths of a second. 

nfs_do_symlink_cache

This symbol controls whether symbolic links are cached for file systems mounted using NFS version 2 software. 

Defaults to on (1). You can disable this symbol (0) if something like amd is to be used on the system. Client system performance might be reduced if this symbol is disabled. 

nfs3_do_symlink_cache

This symbol controls whether symbolic links are cached for file systems mounted using NFS version 3 software. 

Defaults to on (1). You can disable this symbol (0) but client system performance might be reduced. 

nfs_dynamic

This symbol controls whether dynamic retransmission support is used for file systems mounted using NFS version 2 software. 

Defaults to on (1). You can safely turn off this symbol (0), with possible interoperability problems with servers that are slow or cannot support full 8 KB read or write transfers. 

nfs3_dynamic

This symbol controls whether dynamic retransmission support is used for file systems mounted using NFS version 3 software. 

Defaults to off (0). Do not change this value. 

nfs_lookup_neg_cache

This symbol controls whether failed lookup requests are cached for file systems mounted using NFS version 2 software. 

Defaults to off (0). You can probably safely enable this symbol (1) but it might negatively impact normal directory name caching. 

nfs3_lookup_neg_cache

This symbol controls whether failed lookup requests are cached for file systems mounted using NFS version 3 software. 

Defaults to off (0). You can probably safely enable this symbol (1) but it might negatively impact normal directory name caching. 

nfs_max_threads

This symbol controls the maximum number of async threads started per file system mounted using NFS version 2 software. 

Defaults to 8. Because this number affects the number of threads per file system, on a client with many file systems a large change could severely degrade performance. 

nfs3_max_threads

This symbol controls the maximum number of async threads started per file system mounted using NFS version 3 software. 

Defaults to 8. Because this number affects the number of threads per file system, on a client with many file systems a large change could severely degrade performance. 

nfs3_max_transfer_size

This symbol controls the NFS version 3 client file block size. 

Defaults to 32 KB. Strongly recommend that it not be changed. 

nfs_nra

This symbol controls the number of read-ahead blocks that are read for file systems mounted using NFS version 2 software. 

Defaults to 4. A higher value might not increase performance, but will cause increased memory utilization on the client. 

nfs3_nra

This symbol controls the number of read-ahead blocks that are read for file systems mounted using NFS version 3 software. 

Defaults to 4. A higher value might not increase performance, but will cause increased memory utilization on the client. 

nrnode

This symbol controls the number of NFS rnodes that are cached. 

The value assigned to this symbol is configured at boot time and scales to match the server. You can set this symbol to 1 to disable caching. 

nfs_shrinkreaddir

This symbol controls whether over-the-wire NFS Version 2 READDIR requests are shrunk to 1024 bytes. Some old NFS Version 2 servers could not correctly handle READDIR requests larger than 1024 bytes. 

Defaults to off (0), which means do not reduce the READDIR requests. You can safely enable this symbol (1) but it might negatively impact system performance while reading directories. 

nfs_write_error_interval

This symbol controls how often NFS ENOSPC write error messages are logged. Its units are in seconds. 

Defaults to 5. 

nfs_write_error_to_cons_only

This symbol controls whether NFS write error messages are logged to the system console or to the system console and syslog. 

Defaults to off (0), which means to log all NFS write error messages to the system console and syslog. Enabling (1) this functionality means that most NFS write error messages will only be printed on the system console. 

Table B-2 NFS Parameters for the nfssrv Module

Symbol Name 

Description 

Default Setting 

nfs_portmon

This symbol controls whether the NFS server will do filtering of requests based on the IP port number. It uses the Berkeley notion of reserved port numbers. 

Defaults to off (0). You can enable this symbol (1), but problems with interoperability might appear. 

nfsreadmap

This symbol is no longer active. Map reads are no longer implemented. It is left to ease transitions. 

Defaults to off (0). 

rfs_write_async

This symbol controls whether the NFS Version 2 server will use write clustering to safely increase write throughput. 

Defaults to on (1). You can disable this symbol (0), but performance might be reduced. 

Table B-3 NFS Parameters for the rpcmod Module

Symbol Name 

Description 

Default Setting 

svc_ordrel_timeout

This symbol lists the number of milliseconds after which the kernel forces a connection tear-down to complete. It is used in rare cases when a TCP connection that is used for kernel RPC gets hung while being torn down. The connection can get hung when an NFS server initiates a graceful close (FIN) of a connection, and a client fails to complete the close (FIN ackowledgment) handshake. 

Defaults to 600000 ms (10 minutes). If the value is too small, the server does not allow clients enough time to tear down TCP connections properly. If the value is too large, a "buggy" or malicious client could tie up TCP connections on the server. 

Table B-4 NFS Parameters for rpcsec Parameters

Symbol Name 

Description 

Default Setting 

authdes_cachesz

This symbol controls the size of the authdes cache. It is a performance enhancement feature, that avoids verifying client credentials on every secure RPC request. 

Defaults to 128.  

authdes_win

This symbol controls how much clock skew is allowed between the server and clients when using AUTH_DES. 

Defaults to 300 seconds. 

authkerb_cachesz

This symbol controls the size of the authkerb cache. 

Defaults to 128. System performance might be reduced if this value is set too high. 

authkerb_win

This symbol controls how much clock skew is allowed between the server and clients when using AUTH_KERB. 

Defaults to 300 seconds. 

clnt_authdes_cachesz

This symbol controls the size of the cache table for sec=dh authentication handles on the client. 

Defaults to 64. 

How to Set the Value of a Kernel Parameter

  1. Become root.

  2. Edit the /etc/system file and add a line to set the parameter.

    Each entry should follow this form:

    set module:symbol=value

    where module is the name of the kernel module that contains the required parameter, symbol is the name of the parameter, and value is the numerical value to assign to the parameter. For example:

    set nfs:nfs_nra=4

    would change the number of read-ahead blocks that are read for file systems mounted using NFS version 2 software. See the system(4) man page for information about the /etc/system file.

  3. Reboot the system.