NFS Administration Guide
  Искать только в названиях книг
Загрузить это руководство в формате PDF

NFS Tunables

A

Several parameters can be set which can improve the functioning of the NFS service. These parameters can be defined 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.

Warning - 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 SunOS that you are running, before making changes or applying values from previous releases.

Table A-1 on page 102 lists the parameters that are part of the nfs module. Table A-2 on page 104 lists the parameters that are part of the nfssrv module. "How to Set the Value of a Kernel Parameter" on page 105 shows how to change these parameters. See the system(4) man page for information about the /etc/system file.
.
Table A-1
Symbol NameDescriptionDefault Setting
authdes_winThis symbol controls how much clock skew will be allowed between the server and clients when using AUTH_DES.Defaults to 300 seconds
authkerb_winThis symbol controls how much clock skew will be allowed between the server and clients when using AUTH_KERB.Defaults to 300 seconds
nfs_acl_cacheThis symbol controls whether ACLs are cached on clients which are using the NFS_ACL protocol.Defaults to off (0). This can probably be safely enabled (1) and probably will be in the next release of Solaris.
nfs_do_symlink_cacheThis symbol controls whether symbolic links are cached for file systems mounted using NFS Version 2.Defaults to on (1). This may be disabled (0) if something like amd is to be used on the system. Client system performance may be reduced if this is disabled.
nfs3_do_symlink_cacheThis symbol controls whether symbolic links are cached for file systems mounted using NFS Version 3.Defaults to on (1). This may be disabled (0) but client system performance may be reduced.
nfs_dynamicThis symbol controls whether dynamic retransmission support is used for file systems mounted using NFS Version 2.Defaults to on (1). It can be turned off (0) safely, with possible interoperability problems with servers which are slow or can not support full 8k read or write transfers.
nfs3_dynamicThis symbol controls whether dynamic retransmission support is used for file systems mounted using NFS Version 3.Defaults to off (0). Do not change this.
nfs_lookup_neg_cacheThis symbol controls whether failed lookup requests are cached for file systems mounted using NFS Version 2.Defaults to off (0). This can probably be safely enabled (1) but may negatively impact normal directory name caching.
nfs3_lookup_neg_cacheThis symbol controls whether failed lookup requests are cached for file systems mounted using NFS Version 3.Defaults to off (0). This can probably be safely enabled (1) but may negatively impact normal directory name caching.
Table A-1
Symbol NameDescriptionDefault Setting
nfs_max_threadsThis symbol controls the maximum number of async threads started per file system mounted using NFS Version 2.Defaults to 8. Since this number effects the number of threads per file system, on a clients with many file systems a large change could severely degrade performance.
nfs3_max_threadsThis symbol controls the maximum number of async threads started per file system mounted using NFS Version 3.Defaults to 8. Since this number effects the number of threads per file system, on a client with many file systems a large change could several degrade performance
nfs3_max_transfer_sizeThis symbol controls the NFS Version 3 client file blocksize.Defaults to 32k bytes. Strongly recommend that it not be changed.
nfs_nraThis symbol controls the number of readahead blocks that are read for file systems mounted using NFS Version 2.Defaults to 1. 4 is actually a much better value, but does result in increased memory utilization on the client.
nfs3_nraThis symbol controls the number of readahead blocks that are read for file systems mounted using NFS Version 3.Defaults to 1. 2 is actually a much better value, but does result in increased memory utilization on the client.
nrnodeThis 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. This can be set to 1 to disable caching.
Table A-1
Symbol NameDescriptionDefault Setting
nfs_shrinkreaddirThis symbol controls whether over the wire NFS Version 2 READDIR requests are shrunk to 1024 bytes. Certain very 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. This can be safely enabled (1) but may negatively impact performance while reading directories.
nfs_write_error_intervalThis symbol controls how often NFS ENOSPC write error messages are logged. Its units are in seconds.Defaults to 5.
nfs_write_error_to_cons_onlyThis 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 printed on the system console.
Table A-2
Symbol NameDescriptionDefault Setting
nfs_portmonThis 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). It can be enabled (1), but problems with interoperability may appear.
nfsreadmapThis symbol is no longer active. Map reads are no longer implemented. It is left to ease transitions.Defaults to off (0).
rfs_write_asyncThis symbol controls whether the NFS Version 2 server will use write clustering in order to safely increase write throughput.Defaults to on (1). It can be disabled (0), but performance may be reduced.

· 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 which 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 readahead blocks that are read for file systems mounted using NFS Version 2.
  1. Reboot the system.