NFS Administration Guide

Appendix A NFS Tunables

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 which identifies it.


Note -

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


Table A-1 lists the parameters that are part of the nfs module. Table A-2 lists the parameters that are part of the nfssrv module. Table A-3 lists the parameters that are part of the rpcmod module. "How to Set the Value of a Kernel Parameter" shows how to change these parameters. See the system(4) man page for information about the /etc/system file.

Table A-1 NFS Parameters for the nfs Module

Symbol Name 

Description 

Default Setting 

authdes_win

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

Defaults to 300 seconds. 

authkerb_win

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

Defaults to 300 seconds. 

nfs_acl_cache

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

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

nfs_cots_timeo

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

Defaults to 600 tenths of seconds. 

nfs3_cots_timeo

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

Defaults to 600 tenths of seconds. 

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. 

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 may 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 may 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 several 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 1. 4 is actually a much better value, but does result in 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 1. 2 is actually a much better value, but does result in 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 to not reduce the READDIR requests. You can safely enable this symbol (1) but it may 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 A-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 may be reduced. 

Table A-3 NFS Parameters for the rpcmod Module

Symbol Name 

Description 

Default Setting 

authdes_cachesz

This symbol controls the size of the authdes reply cache. It is a performance enhancement feature to avoid verifying client credentials on every secure RPC request. 

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

authkerb_cachesz

This symbol controls the size of the authkerb reply cache. It is a performance enhancement feature to avoid verifying client credentials on every secure RPC request. 

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

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.

  3. Reboot the system.