[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 4

nfso Command

Purpose

Manages Network File System (NFS) tuning parameters.

Syntax

nfso [ -p | -r ] [ -c ] { -o Tunable[ =Newvalue ] }

nfso [ -p | -r ] { -d Tunable }

nfso [ -p | -r ] -D

nfso [ -p | -r ] -a [ -c ]

nfso -?

nfso -h Tunable

nfso -l Hostname

nfso [ -c ]

nfso -L [ Tunable ]

Note
Multiple flags -o, -d, and -L are allowed.

Description

Use the nfso command to configure Network File System tuning parameters. The nfso command sets or displays current or next boot values for Network File System tuning parameters. This command can also make permanent changes or defer changes until the next reboot. Whether the command sets or displays a parameter is determined by the accompanying flag. The -o flag performs both actions. It can either display the value of a parameter or set a new value for a parameter.

Attention: Be careful when you use this command. If used incorrectly, the nfso command can make your system inoperable.

Flags

-a Displays the current, reboot (when used in conjunction with -r) or permanent (when used in conjunction with -p) value for all tunable parameters, one per line in pairs Tunable = Value. For the permanent options, a value is only displayed for a parameter if its reboot and current values are equal. Otherwise NONE displays as the value.
-c Changes the output format of the nfso command to colon-delineated format.
-d Tunable Sets the Tunable variable back to its default value. If a Tunable needs to be changed that is, . it is currently not set to its default value) and is of type Bosboot or Reboot, or if it is of type Incremental and has been changed from its default value, and -r is not used in combination, it will not be changed but a warning displays instead.
-D Sets all Tunables variable back to their default value. If Tunable needing to be changed are of type Bosboot or Reboot, or are of type Incremental and have been changed from their default value, and -r is not used in combination, they will not be changed but warnings display instead.
-h Tunable Displays help about the Tunable parameter.
-l HostName Allows a system administrator to release NFS file locks on an NFS server. The HostName variable specifies the host name of the NFS client that has file locks held at the NFS server. The nfso -l command makes a remote procedure call to the NFS server's rpc.lockd network lock manager to request the release of the file locks held by the HostName NFS client.

If there is an NFS client that has file locks held at the NFS server and this client has been disconnected from the network and cannot be recovered, the nfso -l command can be used to release those locks so that other NFS clients can obtain similar file locks for their purposes.

Note
The nfso command can be used to release locks on the local NFS server only.

-o Tunable[ =NewValue ] Displays the value or sets Tunable to NewValue. If a tunable needs to be changed (the specified value is different than current value), and is of type Bosboot or Reboot, or if it is of type Incremental and its current value is bigger than the specified value, and -r is not used in combination, it will not be changed but a warning displays instead.

When -r is used in combination without a new value, the nextboot value for the Tunable displays. When -p is used in combination without a NewValue, a value displays only if the current and next boot values for the Tunable are the same. Otherwise NONE displays as the value.

-p Makes changes apply to both current and reboot values, when used in combination with -o, -d or -D, that is, it turns on the updating of the /etc/tunables/nextboot file in addition to the updating of the current value. These combinations cannot be used on Reboot and Bosboot type parameters because their current value cannot be changed.

When used with -a or -o without specifying a new value, values are displayed only if the current and next boot values for a parameter are the same. Otherwise NONE displays as the value.

-r Makes changes apply to reboot values when used in combination with -o, -d or -D, that is, it turns on the updating of the /etc/tunables/nextboot file. If any parameter of type Bosboot is changed, the user is prompted to run bosboot.

When used with -a or -o without specifying a new value, next boot values for tunables display instead of current values.

-L Tunable Lists the characteristics of one or all Tunable, one per line, using the following format:
Name   Current  Default  Reboot   Minimum  Maximum  Unit  Type Dependencies
                               value    value    value    value    value
                        ----------------------------------------------------------------------------

                        param1 5        2        4        1        10       MB/s     I  param2
                                                                                        param3

Parameters can be of the following types:

  • D for Dynamic if tunable can be changed at any time.
  • S for Static if tunable can never be changed.
  • R for Reboot if tunable can only be changed during reboot sequence.
  • B for Bosboot if tunable can only be changed by running bosboot and rebooting machine.
  • M for Mount if tunable is only effective for future filesystems or directory mountings.
  • I for Incremental if tunable can only be incremented, except at boot time.

Any change (with -o, -d, or -D) to a parameter of type Mount results in a message displaying to warn the user that the change is only effective for future mountings.

Any attempt to change (with -o, -d, or -D) a parameter of type Bosboot or Reboot without -r, results in an error message.

Any attempt to change (with -o, -d, or -D but without -r) the current value of a parameter of type Incremental with a new value smaller than the current value, results in an error message.

Note
The current set of parameters managed by the nfso command include Dynamic, Mount, and Incremental types.
-? Displays the nfso usage statement.

Compatibility Mode

When running in pre 5.2 compatibility mode (controlled by the pre520tune attribute of sys0, see Introduction to AIX 5L Version 5.2 tunable parameter setting in the Performance Management Guide), reboot values for parameters, except those of type Bosboot, are not really meaningful because in this mode they are not applied at boot time.

In pre 5.2 compatibility mode, setting reboot values to tuning parameters continues to be achieved by imbedding calls to tuning commands in scripts called during the boot sequence. Parameters of type Reboot can therefore be set without the -r flag, so that existing scripts continue to work.

This mode is automatically turned ON when a machine is MIGRATED to AIX 5L Version 5.2. For complete installations, it is turned OFF and the reboot values for parameters are set by applying the content of the /etc/tunables/nextboot file during the reboot sequence. Only in that mode are the -r and -p flags fully functional. See AIX 5L Version 5.2 kernel tuning in the Performance Tools Guide and Reference for details about the new 5.2 mode.

Tunable Parameters

nfs_allow_all_signals
Purpose:
Specifies that the NFS server adhere to signal handling requirements for blocked locks for the UNIX 95/98 test suites.
Values:
  • Default: 0
  • Range: 0 or 1
  • Type: Dynamic
Diagnosis:
N/A
Tuning:
A value of 1 turns nfs_allow_all_signals on, and a value of 0 turns it off.
nfs_device_specific_bufs (AIX 4.2.1 and later)
Purpose:
This option allows the NFS server to use memory allocations from network devices if the network device supports such a feature.
Values:
  • Default: 1
  • Range: 0 or 1
  • Type: Dynamic
Diagnosis:
N/A
Tuning:
Use of these special memory allocations by the NFS server can positively affect the overall performance of the NFS server. The default of 1 means the NFS server is allowed to use the special network device memory allocations. If the value of 0 is used, the NFS server uses the traditional memory allocations for its processing of NFS client requests. These are buffers managed by a network interface that result in improved performance (over regular mbufs) because no setup for DMA is required on these. Two adapters that support this include the Micro Channel ATM adapter and the SP2 switch adapter.
nfs_dynamic_retrans
Purpose:
Specifies whether the NFS client should use a dynamic retransmission algorithm to decide when to resend NFS requests to the server.
Values:
  • Default: 1
  • Range: 0 or 1
  • Type: Dynamic
Diagnosis:
N/A
Tuning:
If this function is turned on, the timeo parameter is only used in the first retransmission. With this parameter set to 1, the NFS client attempts to adjust its timeout behavior based on past NFS server response. This allows for a floating timeout value along with adjusting the transfer sizes used. All of this is done based on an accumulative history of the NFS server's response time. In most cases, this parameter does not need to be adjusted. There are some instances where the straightforward timeout behavior is desired for the NFS client. In these cases, the value should be set to 0 before mounting file systems.
Refer to:
Tuning to Avoid Retransmits
nfs_gather_threshold
Purpose:
Sets the minimum size of write requests for which write gathering is done.
Values:
  • Default: 4096
  • Useful Range: 512 to 8193
  • Type: Dynamic
Diagnosis:
N/A
Tuning:
One of the following two situations exists:
  1. Delays are observed in responding to RPC requests, particularly those where the client is exclusively doing non-sequential writes or the files being written are being written with file locks held on the client.
  2. Clients are writing with write sizes < 4096 and write-gather is not working. If write-gather is to be disabled, change the nfs_gather_threshold to a value greater than the largest possible write. For AIX Version 4 running NFS Version 2, this value is 8192. Changing the value to 8193 disables write gather. Use this for the situation described above in scenario (1). If write gather is being bypassed due to a small write size, say 1024, change the write gather parameter to gather smaller writes; for example, set to 1024.
nfs_iopace_pages (AIX 4.1)
Purpose:
Specifies the number of NFS file pages that are scheduled to be written back to the server through the VMM at one time. This I/O scheduling control occurs on close of a file and when the system invokes the syncd daemon.
Values:
  • Default: 0 (32 before AIX 4.2.1)
  • Range: 0 to 65536
  • Type: Dynamic
Diagnosis:
N/A
Tuning:
When an application writes a large file to an NFS mounted filesystem, that file data is written to the NFS server when the file is closed. In some cases, the resource it takes to write that file to the server may prevent other NFS file I/O from occurring. This parameter limits the number of 4k pages written to the server to the value of nfs_iopace_pages. The NFS client will schedule nfs_iopace_pages for writing to the server and then will wait for these to complete before scheduling the next batch of pages. The default value will usually be sufficient for most environments. Decreased the values if there are large amounts of contention for NFS client resources. If there is low contention, the value can be increased. In AIX 4.2.1 and later, if nfs_iopace_pages=0, then the number of pages written by the syncd daemon at one time is as follows:
MAX ((filesize/8)-1, 32)
nfs_max_connections
Purpose:
Specifies the maximum number of TCP connections allowed into the server.
Values:
  • Default: 0 (indicates no limit)
  • Range: 0 10 10000
  • Type: Dynamic
Diagnosis:
N/A
Tuning:
Limits number of connections into the server in order to reduce load.
Refer to:
Tuning Other Layers to Improve NFS Performance
nfs_max_threads (AIX 4.2.1 and later)
Purpose:
Specifies the maximum number of NFS server threads that are created to service incoming NFS requests.
Values:
  • Default: 3891
  • Range: 5 to 5000
  • Type: Dynamic
Diagnosis:
With AIX 4.2.1, the NFS server is multithreaded. The NFS server threads are created as demand increases for the NFS server. When the NFS server threads become idle, they will exit. This allows the server to adapt to the needs of the NFS clients. The nfs_max_threads parameter is the maximum number of threads that can be created.
Tuning:
In general, it does not detract from overall system performance to have the maximum set to something very large because the NFS server creates threads as needed. However, this assumes that NFS-serving is the primary machine purpose. If the desire is to share the system with other activities, then the maximum number of threads may need to be set low. The maximum number can also be specified as a parameter to the nfsd daemon.
Refer to:
How Many biod and nfsd Daemons Are Needed
nfs_repeat_messages (AIX Version 4)
Purpose:
Checks for duplicate NFS messages. This option is used to avoid displaying duplicate NFS messages.
Values:
  • Default: 0 (no)
  • Range: 0 or 1
  • Type: Dynamic
Diagnosis:
N/A
Tuning:
Tuning this parameter does not affect performance.
nfs_rfc1323 (AIX 4.3)
Purpose:
Enables very large TCP window size negotiation (greater than 65535 bytes) to occur between systems.
Values:
  • Default: 0
  • Range: 0 or 1
  • Type: Dynamic
Diagnosis:
N/A
Tuning:
If using the TCP transport between NFS client and server, and both systems support it, this allows the systems to negotiate a TCP window size in a way that allows more data to be in-flight between the client and server. This increases the throughput potential between client and server. Unlike the rfc1323 option of the no command, this only affects NFS and not other applications in the system. Value of 0 means this is disabled, and value of 1 means it is enabled. If the no command parameter rfc1323 is already set, this NFS option does not need to be set.
nfs_server_base_priority
Purpose:
Sets the base priority of nfsd daemons.
Values:
  • Default: 65
  • Range: 31 to 125
  • Type: Dynamic
Diagnosis:
N/A
Tuning:
By default, the nfsd daemons run with a floating process priority. Therefore, as they increase their cumulative CPU time, their priority changes. This parameter can be used to set a static parameter for the nfsd daemons. The value of 0 represents the floating priority (default). Other values within the acceptable range are used to set the priority of the nfsd daemon when an NFS request is received at the server. This option can be used if the NFS server is overloading the system (lowering or making the nfsd daemon less favored). It can also be used if you want the nfsd daemons be one of the most favored processes on the server. Use caution when setting the parameter because it can render the system almost unusable by other processes. This situation can occur if the NFS server is very busy and essentially locks out other processes from having run time on the server.
nfs_server_clread (AIX 4.2.1 and later)
Purpose:
This option allows the NFS server to be very aggressive about the reading of a file. The NFS server can only respond to the specific NFS-read request from the NFS client. However, the NFS server can read data in the file which exists immediately after the current read request. This is normally referred to as read-ahead. The NFS server does read-ahead by default.
Values:
  • Default: 1
  • Range: 0 or 1
  • Type: Dynamic
Diagnosis:
May be useful in cases where server memory is low and too much disk-to-memory activity is occurring.
Tuning:
With the nfs_server_clread option enabled, the NFS server becomes very aggressive about doing read-ahead for the NFS client. If value is 1, then aggressive read-ahead is done; If value is 0, normal system default read-ahead methods are used. Normal system read-ahead is controlled by VMM. In AIX 4.2.1, the more aggressive top-half JFS read-ahead was introduced. This mechanism is less susceptible to read-ahead breaking down due to out-of-order requests (which are typical in the NFS server case). When the mechanism is activated, it will read an entire cluster (128 KB, the LVM logical track group size).
nfs_setattr_error (AIX 4.2.1 and later)
Purpose:
When enabled, NFS server ignores setattr requests that are not valid.
Values:
  • Default: 0 (disabled)
  • Range: 0 or 1
  • Type: Dynamic
Diagnosis:
N/A
Tuning:
This option is provided for certain PC applications. Tuning this parameter does not affect performance.
nfs_socketsize
Purpose:
Sets the queue size of the NFS server UDP socket.
Values:
  • Default: 60000
  • Practical Range: 60000 to 204800
  • Type: Dynamic
Diagnosis:
N/A
Tuning:
Increase the size of the nfs_socketsize variable when netstat reports packets dropped due to full socket buffers for UDP, and increasing the number of nfsd daemons has not helped.
Refer to:
Increasing NFS Socket Buffer Size
nfs_tcp_duplicate_cache_size (AIX 4.2.1 and later)
Purpose:
Specifies the number of entries to store in the NFS server's duplicate cache for the TCP network transport.
Values:
  • Default: 5000
  • Range: 1000 to 100000
  • Type: Incremental
Diagnosis:
N/A
Tuning:
The duplicate cache size cannot be decreased. Increase the duplicate cache size for servers that have a high throughput capability. The duplicate cache is used to allow the server to correctly respond to NFS client retransmissions. If the server flushes this cache before the client is able to retransmit, then the server may respond incorrectly. Therefore, if the server can process 1000 operations before a client retransmits, the duplicate cache size must be increased.

Calculate the number of NFS operations that are being received per second at the NFS server and multiply this by 4. The result is a duplicate cache size that should be sufficient to allow correct response from the NFS server. The operations that are affected by the duplicate cache are the following: setattr(), write(), create(), remove(), rename(), link(), symlink(), mkdir(), rmdir().

nfs_tcp_socketsize (AIX 4.2.1 and later)
Purpose:
Sets the queue size of the NFS server TCP socket. The queue size is specified in number of bytes. The TCP socket is used for receiving the NFS client requests and can be adjusted so that the NFS server is less likely to drop packets under a heavy load. The value of the nfs_tcp_socketsize option must be less than the sb_max option, which can be manipulated by the no command.
Values:
  • Default: 60000
  • Practical Range: 60000 to sb_max
  • Type: Dynamic
Diagnosis:
Packets dropped when examining the output of the command netstat -s -p tcp.
Tuning:
This option reserves, but does not allocate, memory for use by the send and receive socket buffers of the socket. Do not set the nfs_tcp_socketsize value to less than 60,000. Large or busy servers should have larger values until TCP NFS traffic shows no packets dropped from the output of the netstat -s -p tcp command.
Refer to:
Tuning Other Layers to Improve NFS Performance
nfs_udp_duplicate_cache_size (AIX 4.2.1 and later)
Purpose:
Specifies the number of entries to store in the NFS server's duplicate cache for the UDP network transport.
Values:
  • Default: 5000
  • Range: 1000 to 100000
  • Type: Incremental
Diagnosis:
N/A
Tuning:
The duplicate cache size cannot be decreased. Increase the duplicate cache size for servers that have a high throughput capability. The duplicate cache is used to allow the server to correctly respond to NFS client retransmissions. If the server flushes this cache before the client is able to retransmit, then the server may respond incorrectly. Therefore, if the server can process 1000 operations before a client retransmits, the duplicate cache size must be increased.

Calculate the number of NFS operations that are being received per second at the NFS server and multiply this by 4. The result is a duplicate cache size that should be sufficient to allow correct response from the NFS server. The operations that are affected by the duplicate cache are the following: setattr(), write(), create(), remove(), rename(), link(), symlink(), mkdir(), rmdir().

nfs_use_reserved_ports (AIX 4.2.1 and later)
Purpose:
Specifies using nonreserved IP port number.
Values:
  • Default: 0
  • Range: 0 or 1
  • Type: Dynamic
Diagnosis:
N/A
Tuning:
Value of 0 use a nonreserved IP port number when the NFS client communicates with the NFS server.
portcheck
Purpose:
Checks whether an NFS request originated from a privileged port.
Values:
  • Default: 0
  • Range: 0 or 1
  • Type: Dynamic
Diagnosis:
N/A
Tuning:
Value of 0 disables the port-checking that is done by the NFS server. A value of 1 directs the NFS server to do port checking on the incoming NFS requests. This is a configuration decision with minimal performance consequences.
udpchecksum
Purpose:
Turns on or off the generation of checksums on NFS UDP packets.
Values:
  • Default: 1
  • Range: 0 or 1
  • Type: Dynamic
Diagnosis:
N/A
Tuning:
Make sure this value is set to on in any network where packet corruption might occur. Slight performance gains can be realized by turning it off, but at the expense of increased chance of data corruption.
Refer to:
nfs_tcp_socketsize
nfs_v2_pdts
Purpose:
Sets the number of tables for memory pools used by the biods for NFS Version 2 mounts.
Values:
  • Default: 1
  • Range: 1 to 8
  • Type: Mount
Diagnosis:
N/A
Tuning:
N/A
nfs_v3_pdts
Purpose:
Sets the number of tables for memory pools used by the biods for NFS Version 3 mounts.
Values:
  • Default: 1
  • Range: 1 to 8
  • Type: Mount
Diagnosis:
N/A
Tuning:
N/A
nfs_v2_vm_bufs
Purpose:
Sets the number of initial free memory buffers used for each NFS version 2 Paging Device Table (pdt) created after the first table. The very first pdt has a set value of 256, 512, 640 or 1000, depending on system memory. This initial value is also the default value of each newly created pdt.
Note
The initial set value for the first pdt table will never change.
Values:
  • Default: 1000
  • Range: 512 to 5000
  • Type: Dynamic
Diagnosis:
N/A
Tuning:
N/A
nfs_v3_vm_bufs
Purpose:
Sets the number of initial free memory buffers used for each NFS version 3 Paging Device Table(pdt) created after the first table. The very first pdt has a set value of 256, 512, 640 or 1000, depending on system memory. This initial value is also the default value of each newly created pdt.
Note
The initial set value for the first pdt table will never change.
Values:
  • Default: 1000
  • Range: 512 to 5000
  • Type: Dynamic
Diagnosis:
N/A
Tuning:
N/A

Examples

  1. To set the portcheck tunable parameter to a value of zero, type:

    nfso -o portcheck=0
  2. To set the udpchecksum tunable parameter to its default value of 1 at the next reboot, type:

    nfso -r -d udpchecksum
  3. To print, in colon-delimited format, a list of all tunable parameters and their current values, type:

    nfso -a -c
  4. To list the current and reboot value, range, unit, type and dependencies of all tunables parameters managed by the nfso command, type:
     nfso -L
  5. To display help information on nfs_tcp_duplicate_cache_size, type:
    nfso -h nfs_tcp_duplicate_cache_size
  6. To permanently turn off nfs_dynamic_retrans, type:
    nfso -p -o nfs_dynamic_retrans=0
  7. To list the reboot values for all Network File System tuning parameters, type:
    no -r -a

Related Information

The netstat command, no command, vmo command, ioo command, schedo command, tunsave command, tunrestore command, tuncheck command, and tundefault command.

Network File System (NFS) Overview for System Management in AIX 5L Version 5.2 System Management Guide: Communications and Networks.

TCP/IP Overview for System Management in AIX 5L Version 5.2 System Management Guide: Communications and Networks.

Monitoring and Tuning NFS Use in AIX 5L Version 5.2 Performance Management Guide.

List of NFS Commands.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]