ioo Command

Purpose

Manages Input/Output tunable parameters.

Syntax

ioo [ -p | -r ] [-y]{ -o Tunable [ =NewValue ] }

ioo [ -p | -r ] [-y] {-d Tunable}

ioo [ -p | -r ] [-y] -D

ioo [ -p | -r ] [ -F ] -a

ioo -h [ Tunable ]

ioo [-F] -L [ Tunable ]

ioo [-F] -x [ Tunable ]

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

Description

Note: The ioo command can be executed only by root.

The ioo command configures Input/Output (I/O) tuning parameters. This command sets or displays current or next boot values for all I/O 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 can either display the value of a parameter or set a new value for a parameter.

If a process reads sequentially from a file, the values that are specified by the minpgahead parameter determine the number of pages to be read ahead when the condition is first detected. The value that is specified by the maxpgahead parameter sets the maximum number of pages that are read ahead, regardless of the number of preceding sequential reads.

The operating system allows tuning of the number of file system bufstructs (numfsbuf) and the amount of data that is processed by the write behind algorithm (numclust).

Note: The tunable variables which apply to the entire system might not be modified from within a workload partition.

Understanding the Effect of Changing Tunable Parameters

Misuse of the ioo command can cause performance degradation or operating-system failure. Before you start experimenting with the ioo command, you must be familiar with Performance overview of the Virtual Memory Manager.

Before you modify any tunable parameter, you must first read about all its characteristics in the Tunable Parameters section, and follow any Refer To pointer, to fully understand its purpose.

You must then make sure that the Diagnosis and Tuning sections for this parameter truly apply to your situation and that changing the value of this parameter might help improve the performance of your system.

If both the Diagnosis and Tuning sections contain only "N/A", you must probably never change this parameter unless directed by AIX® development.

Flags

Item Description
-h [Tunable] Displays help about the Tunable parameter if one is specified. Otherwise, displays the ioo command usage statement.
-a Displays current, reboot (when used with -r) or permanent (when used with -p) value for all tunable parameters, one per line in pairs tunable = value. For the permanent option, a value is only displayed for a parameter if its reboot and current values are equal. Otherwise NONE displays as the value.
-d Tunable Resets Tunable to its default value. If a Tunable must be changed (that is, it is not set to its default value) and is of type Bosboot or Reboot, or if it is of type Incremental and is changed from its default value, and -r is not used in combination, it is not changed but a warning displays.
-D Resets all tunables to their default value. If tunables that must be changed are of type Bosboot or Reboot, or are of type Incremental and were changed from their default value, and -r is not used in combination, they are not changed but a warning displays.
-o Tunable [=NewValue ] Displays the value or sets Tunable to NewValue. If a Tunable must be changed (the specified value is different from 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 is not changed but a warning displays.

When -r is used without a NewValue, the nextboot value for tunable displays. When -p is used 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 Specifies that the changes apply to both the current and reboot values when used in combination with the -o, -d, or -D flags. 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, their current value cannot be changed.

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

-r Makes changes that apply to reboot values when used with the -o, -d, or -D flags. 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.

-F Forces restricted tunable parameters to be displayed when you specify the -a, -L , or -x flag on the command line. If you do not specify the -F flag, restricted tunables are not included, unless they are named in association with a display flag (the -o, -a , -x, or -L flag).
-L [Tunable] Lists the characteristics of one or all tunables, one per line, by using the following format:
NAME                      CUR    DEF    BOOT   MIN    MAX    UNIT           TYPE 
     DEPENDENCIES 
--------------------------------------------------------------------------------
minpgahead                2      2      2      0      4K     4KB pages         D 
     maxpgahead 
-------------------------------------------------------------------------------- 
maxpgahead                8      8      8      0      4K     4KB pages         D 
     minpgahead 
-------------------------------------------------------------------------------- 
pd_npages                 64K    64K    64K    1      512K   4KB pages         D 
-------------------------------------------------------------------------------- 
maxrandwrt                0      0      0      0      512K   4KB pages         D 
-------------------------------------------------------------------------------- 
numclust                  1      1      1      0             16KB/cluster      D 
-------------------------------------------------------------------------------- 
numfsbufs                 196    196    196                                    M 
-------------------------------------------------------------------------------- 
recoveryMode              1      1      1      0      1      N/A               D 
-------------------------------------------------------------------------------- 
... 
where: 
    CUR = current value 
    DEF = default value 
    BOOT = reboot value 
    MIN = minimal value 
    MAX = maximum value 
    UNIT = tunable unit of measure 
    TYPE = parameter type: D (for Dynamic), S (for Static), R (for Reboot),
               B (for Bosboot), M (for Mount), I (for Incremental),
               C (for Connect), and d (for Deprecated) 
    DEPENDENCIES = list of dependent tunable parameters, one per line
-x [Tunable] Lists the characteristics of one or all tunables, one per line, by using the following (spreadsheet) format:
tunable,current,default,reboot,min,max,unit,type,{dtunable } 


where: 
    current = current value 
    default = default value 
    reboot = reboot value 
    min = minimal value 
    max = maximum value 
    unit = tunable unit of measure 
    type = parameter type: D (for Dynamic), S (for Static), R (for Reboot),
               B (for Bosboot), M (for Mount), I (for Incremental),
               C (for Connect), and d (for Deprecated) 
    dtunable = space separated list of dependent tunable parameters 
-y Suppresses the confirmation prompt before the bosboot command is run.

If you modify (by using the -o, -d or -D flags) a restricted tunable parameter, it results in a warning message to warn the user that a tunable parameter of the restricted-use type is modified. If you also specify the -r or -p flags, you are prompted for confirmation of the change. In addition, at system reboot, the presence of restricted tunable parameters, which are in the /etc/tunables/nextboot file, is modified to a value that is different from their default value (by using a command line that specifies the -r or -p flags). The modification results in an error log entry that identifies the list of these modified tunable parameters.

When you modify a tunable, you can specify a tunable parameter value by using the abbreviations K, M, G, T, P, and E to indicate their correspondent values:
Abbreviation Power of two
K 210
M 220
G 230
T 240
P 250
E 260
Thus, a tunable value of 1024 might be specified as 1-K.

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

Any change (with the -o, -d or -D flags) to a parameter of type Connect results in inetd being restarted, and a message, warning you that the change is only effective for future socket connections.

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

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

Tunable Parameters Type

All the tunable parameters that are manipulated by the tuning commands (no, nfso, vmo, ioo, raso, and schedo) are classified into these categories:
Item Description
Dynamic If the parameter can be changed at any time
Static If the parameter can never be changed
Reboot If the parameter can be changed only during reboot
Bosboot If the parameter can be changed only by running bosboot and rebooting the machine
Mount If changes to the parameter are only effective for future file systems or directory mounts
Incremental If the parameter can be incrementally increased, except at boot time
Connect If changes to the parameter are only effective for future socket connections
Deprecated If changing this parameter, is no longer supported by the current release of AIX.
For parameters of type Bosboot, whenever a change is performed, the tuning commands automatically prompt the user to ask if they want to execute the bosboot command. For parameters of type Connect, the tuning commands automatically restart the inetd daemon.

Note: The current set of parameters that are managed by the ioo command include only Static, Dynamic, Mount, and Incremental types.

Compatibility Mode

When running in pre-5.2 compatibility mode (controlled by the pre520tune attribute of sys0, see Performance tuning enhancements for AIX 5.2 in theAIX Version 7.1 Performance management ), reboot values for parameters, except those parameters that are of type Bosboot, are not 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 embedding calls to tuning commands in scripts that are 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 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 Kernel Tuning in AIX Version 7.1 Performance Tools Guide and Reference for more information.

Tunable Parameters

For default values and range of values for tunables, refer the ioo command help (-h <tunable_parameter_name>).
Item Description
aio_active
Purpose:
Indicates whether the AIO kernel extension is used and pinned.
Tuning:
A value of 1 indicates that the AIO kernel extension is used and pinned.
aio_maxreqs
Purpose:
Specifies the maximum number of asynchronous I/O requests that can be outstanding at one time.
Tuning:
The specified number includes I/O requests that are in progress, as well as those requests that are waiting in queues to be initiated. The maximum number of asynchronous I/O requests cannot be less than the value of AIO_MAX, as defined in the /usr/include/sys/limits.h file, but can be greater. It would be appropriate for a system with a high volume of asynchronous I/O to have a maximum number of asynchronous I/O requests larger than AIO_MAX.
aio_maxservers
Purpose:
Specifies the maximum number of AIO servers (kernel processes dedicated to asynchronous I/O processing) allowed to service slow path I/O requests.
Tuning:
This value is a per cpu value. The value of maxservers cannot be less than minservers. There can never be more than this many asynchronous I/O requests in progress at one time, so this number limits the possible I/O concurrency.
aio_minservers
Purpose:
Specifies the minimum number of AIO servers (kernel processes dedicated to asynchronous I/O processing) that remain active to process slow path I/O requests.
Tuning:
This value is a per cpu value. The value of minservers cannot be greater than maxservers. When the kernel extension is loaded, no AIO servers are created regardless of the current or default settings. This value allows a minimal AIO footprint on systems where AIO is never used. As I/O requests are initiated, AIO servers are created to service them until the maximum value allowed by maxservers is reached. Once the minservers value is exceeded, the number of servers does not fall below minservers.
aio_server_inactivity
Purpose:
Specifies how long an AIO server sleeps without servicing an I/O request.
Tuning:
When this time limit is exceeded, the server exits, unless it causes the number of available servers to fall below minservers. In this case the server goes back to sleep. The time the server sleeps in this rare case is the larger of the times that are specified for the current and default values for server_inactivity. It is a rare case and indicates that there might be an imbalance between the number of available servers and the amount of I/O.
j2_atimeUpdateSymlink
Purpose:
If j2_atimeUpdateSymlink is set to 1, then the access time of the symbolic link of Enhanced journaled file system (JFS2 or Enhanced JFS) is updated on readlink.
Tuning:
A value of 0 indicates that the access time of JFS2 symbolic links is not updated on readlink. There is a performance penalty that is associated with turning j2_atimeUpdateSymlink on, so this tunable must not be changed unless there is a real need for it. SUSv3 does not require that access time be updated on readlink, however JFS, and many other platforms do update the access time on readlink. This tunable is provided for compatibility with JFS and other UNIX conformant systems.
j2_dynamicBufferPreallocation
Purpose:
Specifies the number of 16-K slabs to preallocate when the file system is running low of bufstructs.
Tuning:
A value of 16 represents 256-K. File system does not need remounting. The bufstructs for JFS2 are now dynamic; the number of buffers that start on the paging device is controlled by j2_nBufferPerPagerDevice, but buffers are allocated and destroyed dynamically after this initial value. If the number of "external pager file system I/Os blocked with no fsbuf (from vmstat -v) increases, the j2_dynamicBufferPreallocation must be increased for that file system, as the I/O load on the file system might be exceeding the speed of preallocation. A value of 0 disables dynamic buffer allocation completely.
j2_inodeCacheSize
Purpose:
Controls the amount of memory JFS2 uses for the inode cache.
Tuning:
The value does not explicitly indicate the amount that might be used, but is instead a scaling factor; it is used in combination with the size of the main memory to determine the maximum memory usage for the inode cache.
j2_maxPageReadAhead
Purpose:
Specifies the maximum number of pages to be read ahead when a sequentially accessed file is processed on JFS2.
Tuning:
The difference between minfree and maxfree must always be equal to or greater than j2_maxPageReadAhead. If run time decreases when the value of j2_maxPageReadAhead increases, ensure that the other performance of the other applications does not deteriorate.
j2_maxRandomWrite
Purpose:
Specifies a threshold for random writes to accumulate in RAM before subsequent pages are flushed to disk by the write behind algorithm of JFS2.
Tuning:
The random write behind threshold is on a per-file basis. Useful if too many pages are flushed out by syncd.
j2_metadataCacheSize
Purpose:
Controls the amount of memory Enhanced JFS uses for the metadata cache.
Tuning:
The value does not explicitly indicate the amount that is not used, but is instead a scaling factor; it is used in combination with the size of the main memory to determine the maximum memory usage for the inode cache.
j2_minPageReadAhead
Purpose:
Specifies the minimum number of pages to be read ahead when processing a sequentially accessed file on Enhanced JFS.
Tuning:
Useful to increase if there are lots of large sequential accesses. Ensure that the performance of the other application does not deteriorate. Value of 0 might be useful if I/O pattern is purely random.
j2_nPagesPerWriteBehindCluster
Purpose:
Specifies the number of pages, per cluster, that is processed by the write behind algorithm of Enhanced JFS.
Tuning:
Useful to increase if more pages must be kept in RAM before they are scheduled for I/O, when the I/O pattern is sequential. It might be appropriate to increase, if striped logical volumes or disk arrays are being used.
j2_nRandomCluster
Purpose:
Specifies the distance apart (in clusters) that writes must exceed to be considered as random by the random write behind algorithm of Enhanced JFS.
Tuning:
Useful to increase if more pages must be kept in RAM before they are scheduled for I/O, when the I/O pattern is random and random write behind is enabled (j2_maxRandomWrite).
j2_recoveryMode
Purpose:
Sets the behavior for recovery from JFS2 write errors.
Tuning:
The default value of 1 indicates that automatic recovery from JFS2 write errors is set. The value of 0 indicates that the file systems remain in a degraded mode until unmounted.
j2_syncPageCount
Purpose:
Sets the maximum number of modified pages of a file that is written to disk by the sync system call in a single operation.
Tuning:
When an application that uses file system caching is run and does large numbers of random writes, it might be necessary to adjust this setting to avoid lengthy delays during sync operations.
j2_syncPageLimit
Purpose:
Sets the maximum number of times that the sync system call uses j2_syncPageCount to limit pages written before increasing that count to allow progress on the sync operation.
Tuning:
This tunable must be set when j2_syncPageCount is set and must be increased if the effect of the j2_syncPageCount change is not sufficient.
lvm_bufcnt
Purpose:
Specifies the number of LVM buffers for raw physical I/Os.
Tuning:
Applications performing large writes to striped raw logical volumes are not obtaining the wanted throughput rate. LVM splits large raw I/Os into multiple buffers of 128-K a piece. A value of 9 means that about 1 MB I/Os can be processed without waiting for more buffers. If a system is configured to have striped raw logical volumes and is doing writes greater than 1.125 MB, increasing this value might help the throughput of the application. If a system performs larger than 1 MB raw I/Os, it might be useful to increase this value.
maxpgahead
Purpose:
Specifies the maximum number of pages to be read ahead when a sequentially accessed file is processed.
Tuning:
The value must be a power of two and must be greater than or equal to minpgahead. Observe the elapsed execution time of critical sequential-I/O-dependent applications with the time command. Because of limitations in the kernel, do not exceed 512 as the maximum value used. The difference between minfree, and maxfree must always be equal to or greater than maxpgahead. If execution time decreases with higher maxpgahead, observe other applications to ensure that their performance does not deteriorate.
maxrandwrt
Purpose:
Specifies a threshold (in 4 KB pages) for random writes to accumulate in RAM before subsequent pages are flushed to disk by the write behind algorithm.
Tuning:
The random write behind threshold is on a per-file basis. The maximum value indicates the largest file size, in pages. You can change the value if vmstat n shows page out and I/O wait time peaks at regular intervals (usually when the sync daemon is writing pages to disk). It is useful to set this value to 1 or higher if numerous I/O occurs when syncd runs. A value of 0 disables random write behind and indicates that random writes stay in RAM until a sync operation. Setting maxrandwrt ensures that these writes get flushed to disk before the sync operation occurs. However, it might degrade performance, because the file is then being flushed each time. Tune this option to favor interactive response time over throughput. After the threshold is reached, all subsequent pages are then immediately flushed to disk. The pages up to the threshold value stay in RAM until a sync operation.
numclust
Purpose:
Specifies the number of 16-K clusters that are processed by the sequential write behind algorithm of the VMM.
Tuning:
Useful to increase if more pages must be kept in RAM before they are scheduled for I/O, when the I/O pattern is sequential. It might be appropriate to increase if striped logical volumes or disk arrays are being used.
numfsbufs
Purpose:
Specifies the number of file system bufstructs.
Tuning:
File system must be remounted. If the VMM must wait for a free bufstruct, it puts the process on the VMM wait list before the start I/O is issued and wakes it up, once a bufstruct is available. might be appropriate to increase if striped logical volumes or disk arrays are being used.
pd_npages
Purpose:
Specifies the number of pages that must be deleted in one chunk from RAM when a file is deleted.
Tuning:
The maximum value indicates the largest file size, in pages. Real-time applications that experience sluggish response time while files are being deleted. Tuning this option is only useful for real-time applications. If real-time response is critical, adjusting this option might improve response time by spreading the removal of file pages from RAM more evenly over a workload.
posix_aio_active
Purpose:
Indicates whether the AIO kernel extension is used and pinned.
Tuning:
A value of 1 indicates that the AIO kernel extension is used and pinned.
posix_aio_maxreqs
Purpose:
Specifies the maximum number of asynchronous I/O requests that can be outstanding at one time.
Tuning:
The specified number includes I/O requests that are in progress, as well as those requests that are waiting in queues to be initiated. The maximum number of asynchronous I/O requests cannot be less than the value of AIO_MAX, as defined in the /usr/include/sys/limits.h file, but can be greater. It would be appropriate for a system with a high volume of asynchronous I/O to have a maximum number of asynchronous I/O requests larger than AIO_MAX.
posix_aio_maxservers
Purpose:
Specifies the maximum number of AIO servers (kernel processes dedicated to asynchronous I/O processing) allowed to service slow path I/O requests.
Tuning:
This value is a per processor value. The value of maxservers cannot be less than minservers. There can never be more than this many asynchronous I/O requests in progress at one time, so this number limits the possible I/O concurrency.
posix_aio_minservers
Purpose:
Specifies the minimum number of AIO servers (kernel processes dedicated to asynchronous I/O processing) that remain active to process slow path I/O requests.
Tuning:
This value is a per cpu value. The value of minservers cannot be greater than maxservers. When the kernel extension is loaded, no AIO servers are created, regardless of the current or default settings. This handling allows a minimal AIO footprint on systems where AIO is never used. As I/O requests are initiated, AIO servers are created to service them until the maximum allowed by maxservers is reached. Once the minservers values exceed, the number of servers does not fall below minservers.
posix_aio_server_inactivity
Purpose:
Specifies how long an AIO server sleeps without servicing an I/O request.
Tuning:
When the time limit is exceeded, the server exits, unless it causes the number of available servers to fall below minservers. In this case the server goes back to sleep. The time the server sleeps in this rare case is the larger of the times that are specified for the current and default values for server_inactivity. It is a rare case and indicates that there might be an imbalance between the number of available servers and the amount of I/O.

Security

Attention RBAC users and Trusted AIX users: This command can perform privileged operations. Only privileged users can run privileged operations. For more information about authorizations and privileges, see Privileged Command Database in AIX Version 7.1 Security. For a list of privileges and the authorizations associated with this command, see the lssecattr command or the getcmdattr subcommand.

Examples

  1. To list the current and reboot value, range, unit, type, and dependencies of all tunable parameters that are managed by the ioo command, enter the following command:
    ioo -L 
  2. To list the current, default, and reboot values, range, unit, and type of the j2_recoveryMode tunable parameter, enter the following command:
    ioo -L j2_recoveryMode
    The result might be similar to the following output:
    NAME              CUR    DEF    BOOT   MIN    MAX    UNIT          TYPE
    -----------------------------------------------------------------------
    recoveryMode       1      1       1     0      1      n/a            D
    -----------------------------------------------------------------------
  3. To display help information for the j2_nPagesPerWriteBehindCluster tunable parameter, enter the following command:
    ioo -h j2_nPagesPerWriteBehindCluster 
  4. To set maxrandwrt to 4 after the next reboot, enter the following command:
    ioo -r -o maxrandwrt=4
  5. To permanently reset all ioo tunable parameters to default, enter the following command:
     ioo -p -D 
  6. To list the reboot value of all ioo parameters, enter the following command:
     ioo -r -a
  7. To list (spreadsheet format) the current and reboot value, range, unit, type, and dependencies of all tunables parameters that are managed by the ioo command, enter the following command:
    ioo -x