Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
3.  NFS Tunable Parameters NFS Module Parameters nfs:nfs3_lookup_neg_cache  Previous   Contents   Next 
   
 

nfs:nfs_max_threads

Description

Controls the number of kernel threads that perform asynchronous I/O for the NFS version 2 client. Since NFS is based on RPC and RPC is inherently synchronous, separate execution contexts are required to perform NFS operations that are asynchronous from the calling thread.

The operations which can be executed asynchronously are read for read-ahead, readdir for readdir read-ahead, and write for putpage and pageio requests.

Data Type

Integer (16-bit)

Default

8

Range

0 to 215 - 1

Units

Threads

Dynamic?

Yes, but this parameter is set per file system at mount time. To affect a particular file system, unmount and mount the file system after changing this parameter.

Validation

None

When to Change

Change this parameter to increase or reduce the number of simultaneous I/O operations that are outstanding at any given time. For example, for a very low bandwidth network, you might want to decrease this value so that the NFS client does not overload the network. Alternately, if the network is very high bandwidth and the client and server have sufficient resources, you might want to increase this value to more effectively utilize the available network bandwidth and client and server resources.

Stability Level

Unstable

nfs:nfs3_max_threads

Description

Controls the number of kernel threads that perform asynchronous I/O for the NFS version 3 client. Since NFS is based on RPC and RPC is inherently synchronous, separate execution contexts are required to perform NFS operations that are asynchronous from the calling thread.

The operations that can be executed asynchronously are read for read-ahead, readdir for readdir read-ahead, write for putpage and pageio requests, and commit.

Data Type

Integer (16-bit)

Default

8

Range

0 to 215 - 1

Units

Threads

Dynamic?

Yes, but this parameter is set per file system at mount time. To affect a particular file system, unmount and mount the file system after changing this parameter.

Validation

None

When to Change

Change this parameter to increase or reduce the number of simultaneous I/O operations that are outstanding at any given time. For example, for a very low bandwidth network, you might want to decrease this value so that the NFS client does not overload the network. Alternately, if the network is very high bandwidth and the client and server have sufficient resources, you might want to increase this value to more effectively utilize the available network bandwidth and the client and server resources.

Stability Level

Unstable

nfs:nfs_nra

Description

Controls the number of read-ahead operations that are queued by the NFS version 2 client when sequential access to a file is discovered. These read-ahead operations increase concurrency and read throughput. Each read-ahead request is generally for 8192 bytes of file data.

Data Type

Integer (32-bit)

Default

4

Range

0 to 231 - 1

Units

Read-ahead requests

Dynamic?

Yes

Validation

None

When to Change

Change this parameter to increase or reduce the number of read-ahead requests that are outstanding for a specific file at any given time. For example, for a very low bandwidth network or on a low memory client, you might want to decrease this value so that the NFS client does not overload the network or the system memory. Alternately, if the network is very high bandwidth and the client and server have sufficient resources, you might want to increase this value to more effectively utilize the available network bandwidth and the client and server resources.

Stability Level

Unstable

nfs:nfs3_nra

Description

Controls the number of read-ahead operations that are queued by the NFS version 3 client when sequential access to a file is discovered. These read-ahead operations increase concurrency and read throughput. Each read-ahead request is generally for 32,768 bytes of file data.

Data Type

Integer (32-bit)

Default

4

Range

0 to 231 - 1

Units

Read-ahead requests

Dynamic?

Yes

Validation

None

When to Change

Change this parameter to increase or reduce the number of read-ahead requests that are outstanding for a specific file at any given time. For example, for a very low bandwidth network or on a low memory client, you might want to decrease this value so that the NFS client does not overload the network or the system memory. Alternately, if the network is very high bandwidth and the client and server have sufficient resources, you might want to increase this value to more effectively utilize the available network bandwidth and the client and server resources.

Stability Level

Unstable

nfs:nrnode

Description

Controls the size of the rnode cache on the NFS client.

The rnode cache, used by both NFS version 2 and 3 clients, is the central data structure that describes a file on the NFS client. It contains the file handle that identifies the file on the server and also contains pointers to various caches used by the NFS client to avoid network calls to the server. Each rnode has a one-to-one association with a vnode. The vnode caches file data.

The NFS client attempts to keep a minimum number of rnodes around to attempt to avoid destroying cached data and metadata. When an rnode is reused or freed, the cached data and metadata must be destroyed.

Data Type

Integer (32-bit)

Default

The default setting of this parameter is 0, which means that the value of nrnode should be set to the value of the ncsize parameter. Actually, any non-positive value of nrnode results in nrnode being set to the value of ncsize.

Range

1 to 231 - 1

Units

rnodes

Dynamic?

No. This value can only be changed by adding or changing the parameter in the /etc/system file, and then rebooting the system.

Validation

The system enforces a maximum value such that the rnode cache can only consume 25% of available memory.

When to Change

Since rnodes are created and destroyed dynamically, the system tends to settle upon a nrnode-size cache, automatically adjusting the size of the cache as memory pressure on the system increases or as more files are simultaneously accessed. However, in certain situations, it might be helpful to set the value of nrnode if the mix of files being accessed can be predicted in advance. For example, if the NFS client is accessing a few very large files, it might be useful to set the value of nrnode to be a small number so that system memory can cache file data instead of rnodes. Alternately, if the client is accessing many small files, it might be helpful to set the value of nrnode large enough to optimize for storing file metadata to reduce the number of network calls for metadata.

Although it is not recommended, the rnode cache can be effectively disabled by setting the value of nrnode to 1. This instructs the client to only cache 1 rnode, which means that it is reused frequently.

Stability Level

Evolving

 
 
 
  Previous   Contents   Next