Manages Virtual Memory Manager tunable parameters.
vmo [ -p | -r ] [ -y ] { -o Tunable [= Newvalue] }
vmo [ -p | -r ] [ -y ] { -d Tunable }
vmo -h [ Tunable ]
Use the vmo command to configure Virtual Memory Manager tuning parameters. This command sets or displays current or next boot values for all Virtual Memory Manager 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.
The Virtual Memory Manager (VMM) maintains a list of free real-memory page frames. These page frames are available to hold virtual-memory pages needed to satisfy a page fault. When the number of pages on the free list falls below that specified by the minfree parameter, the VMM begins to steal pages to add to the free list. The VMM continues to steal pages until the free list has at least the number of pages specified by the maxfree parameter.
If the number of file pages (permanent pages) in memory is less than the number specified by the minperm% parameter, the VMM steals frames from either computational or file pages, regardless of repage rates. If the number of file pages is greater than the number specified by the maxperm% parameter, the VMM steals frames only from file pages. Between the two, the VMM normally steals only file pages, but if the repage rate for file pages is higher than the repage rate for computational pages, computational pages are stolen as well.
You can also modify the thresholds that are used to decide when the system is running out of paging space. The npswarn parameter specifies the number of paging-space pages available at which the system begins warning processes that paging space is low. The npskill parameter specifies the number of paging-space pages available at which the system begins killing processes to release paging space.
Understanding the Effect of Changing Tunable Parameters
Misuse of this command can cause performance degradation or operating-system failure. Before experimenting with vmo, you should be thoroughly familiar with both Performance overview of the Virtual Memory Manager and Enhanced JFS file system cache limit with the maxclient parameter.
Before modifying any tunable parameter, you should first carefully read about all its characteristics in the Tunable Parameters section below, and follow any Refer To pointer, in order 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 could help improve the performance of your system.
If the Diagnosis and Tuning sections both contain only "N/A", you should probably never change this parameter unless specifically directed by AIX® development.
Item | Description |
---|---|
-a | Displays current, reboot (when used with the -r option), or permanent (when used with the -p option) values 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 is displayed as the value. |
-d Tunable | Resets Tunable to 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 will be displayed instead. |
-D | Resets all tunables to their default value. If tunables 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 won't be changed but a warning will be displayed instead. |
-F | Forces display of the restricted tunable parameters when the -a, -L or -x options are specified alone on the command line to list all tunables. When the -F flag is not specified, restricted tunables are not displayed, unless these restricted tunables are specifically named with a display option. |
-h [Tunable] | Displays help about the Tunable parameter if one is specified. Otherwise, displays the vmo command usage statement. |
-L [ Tunable ] | Lists the characteristics of one or all tunables,
one per line, using the following format:
|
-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 will be displayed instead. When -r is used in combination without a new value, the nextboot value for tunable is displayed. When -p is used in combination without a new value, a value is displayed only if the current and next boot values for tunable are the same. Otherwise NONE is displayed as the value. |
-p | When used in combination with -o, -d or -D,
makes changes apply to both current and reboot values, that is, 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 can't 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 is displayed as the value. |
-r | When used in combination with -o, -d or -D,
makes changes apply to reboot values, for example, turns on the updating
of the /etc/tunables/nextboot file. If any parameter of type Bosboot is
changed, the user will be prompted to run bosboot. When used with -a or -o without specifying a new value, next boot values for tunables are displayed instead of current values. |
-x [Tunable] | Lists characteristics of one or all tunables,
one per line, using the following (spreadsheet) format:
|
-y | Suppresses the confirmation prompt before running the bosboot command. |
Any change (with the -o, -d, or -D options) to a restricted tunable parameter results in a warning message to the user that a tunable of the restricted use type has been modified. If the -r or -p options are also specified, the user will be prompted to confirm the change. In addition, at system reboot, restricted tunables displayed in the /etc/tunables/nextboot file, which were modified to values that are different from their default values (using a command line specifying the -r or -p options) causes an error log entry that identifies the list of these modified tunables.
Any change (with -o, -d or -D) to a parameter of type Mount will result in a message being displayed to warn the user that the change is only effective for future mountings.
Any change (with -o, -d or -D flags) to a parameter of type Connect will result in inetd being restarted, and a message displaying a warning to the user that the change is only effective for future socket connections.
Any attempt to change (with -o, -d or -D) a parameter of type Bosboot or Reboot without -r, will result 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, will result in an error message.
Tunable Parameters Type
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 only be changed during reboot |
Bosboot | If the parameter can only be changed 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 only be incremented, 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. |
Note that the current set of parameters managed by the vmo command only includes Static, Dynamic, and Bosboot types.
Compatibility Mode
When running in pre-AIX 5.2 compatibility mode (controlled by the pre520tune attribute of sys0), reboot values for parameters, except those of type Bosboot, are not really meaningful because in this mode they are not applied at boot time. For more information, see AIX 5.2compatibility mode in the AIX Version 7.1 Performance management.
In pre-AIX 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 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. For more information, see Kernel Tuning in AIX Version 7.1 Performance Tools Guide and Reference.
vmo -h <tunable_parameter_name>
Tunable | Description |
---|---|
ame_cpus_per_pool | Purpose Determines the ratio of CPUs per compressed memory pool. For every ame_cpus_per_pool CPUs, at least one compressed memory pool is created. Tuning Lower ratios are used to reduce contention on compressed memory pools. This ratio is not the only factor used to determine the number of compressed memory pools (amount of memory and the layout is also considered) so certain changes to this ratio may not result in any change to the number of compressed memory pools. |
ame_maxfree_mem | Purpose Specifies the average amount of free memory in a compressed memory pool free list at which the VMM will shrink the compressed pool. Tuning Excessive shrink and grow operations can occur if compressed memory pool size tends to change significantly. This can occur if the workload working set size frequently changes. Increase this tunable to raise the threshold at which the VMM will shrink a compressed memory pool and thus reduce the number of overall shrink and grow operations. |
ame_min_ucpool_size | Purpose Defines the minimum size of the uncompressed pool. Tuning If compressed memory pool grows too large, there may not be enough space in memory to house uncompressed memory which can slow down application performance due to excessive use of the compressed memory pool. Increase this value to limit the size of the compressed memory pool and make more uncompressed pages available. |
ame_minfree_mem | Purpose Specifies the amount of free memory in a compressed memory pool free list at which the VMM will grow the compressed pool. Tuning If processes are being delayed waiting for compressed memory to become available, increase ame_minfree_mem to improve response time. Note, that this must be at least 64 KB less than ame_maxfree_mem. |
ams_loan_policy | Purpose This tunable toggles the loaning behavior when shared memory mode is enabled. Tuning When the tunable is set to 0, loaning is disabled. When set to 1, loaning of file cache is enabled. When set to 2, loaning of any type of data is enabled. In response to low memory in the AMS pool, the VMM will free memory and loan it to the hypervisor. |
force_relalias_lite | Purpose If set to 0, a heuristic is used, when tearing down a mmap region, to determine when to avoid locking the source mmapped segment Tuning This is a scalability tradeoff, controlled by relalias_percentage, possibly costing more compute time used. If set to 1, the source segment lock is avoided whenever possible, regardless of the value of relalias_percentage. |
kernel_heap_psize | Purpose Specifies the default page size to use for the kernel heap. Tuning This is an advisory setting. Support for 64 KB pages is provided by POWER5+ and later machines and used when vmm_mpsize_support is enabled. The 16 MB pages, provided by POWER4 and later machines, should only be used for the kernel heap under high performance environments. A value of 0 indicates that the kernel will use the preferred default value of 64 KB, if that page size is supported, else 4 KB pages are used. |
lgpg_regions | Purpose Specifies the number of large pages to reserve for implementing with the shmget() system call with the SHM_LGPAGE flag Tuning The lgpg_size parameter must also be used in addition to this option. The application must be modified to specify the SHM_LGPAGE flag when calling shmget(). This will improve performance in the case where there are many TLB misses and large amounts of memory is being accessed. Although this parameter is Dynamic on DLPAR-capable systems, the nextboot value is written into the boot image when a bosboot command is run so that the setting is optimally restored at reboot. |
lgpg_size | Purpose Specifies the size in bytes of the hardware-supported large pages used for the implementation for the shmget() system call with the SHM_LGPAGE flag. Tuning Supported on systems from POWER4 onwards. Although this parameter is Dynamic on DLPAR-capable systems, the nextboot value is written into the boot image when a bosboot command is issued so that the setting is optimally restored at reboot. The lgpg_regions parameter must be set to a non-zero value in addition to this parameter. The application must be modified to specify the SHM_LGPAGE flag when calling the shmget() subroutine. This will improve the performance in the case where there are many TLB misses and large amounts of memory is being accessed. |
low_ps_handling | Purpose Specifies the action to change the system behavior in relation to process termination during low paging space conditions. Tuning A value of 1 indicates current behavior of process termination on low paging space. A value of 2 indicates a new behavior where processes with SIGDANGER handler will be killed, if no other processes were found earlier to recover from low paging space condition. |
maxfree | Purpose Specifies the number of frames on the free list at which page-stealing is to stop. Tuning Observe free-list-size changes with vmstat -n command. If the vmstat -n command displays the free-list size frequently driven below minfree by application demands, increase the maxfree value to reduce calls to replenish the free list. Setting the value too high causes page replacement to run for a longer period of time. The difference between maxfree and minfree should be of the order of maxpgahead, and no less than 8. |
maxpin% | Purpose Specifies the maximum percentage of real memory that can be pinned. Tuning Change if cannot pin memory, although free memory is available. If this value is changed, the new value should ensure that at least 4 MB of real memory will be left unpinned for use by the kernel. The vmo command converts maxpin% to the corresponding maxpin absolute value, which is the value used by the kernel. Change this parameter only in extreme situations, such as maximum-load benchmarking. This dynamic parameter will have its nextboot value written into the boot image if a bosboot command is issued. |
memory_frames | Purpose Number of valid memory frames. Tuning N/A |
memplace_data | Purpose Specifies the default memory placement policy for data. Tuning Refers to the data of the main executable (initialized data, BSS), heap, shared library and object modules loaded at run-time. Data placement can be set to first-touch (value of 1), round-robin across the system (value of 2) or automatic (value of 0), where the system decides the best placement for the memory. |
memplace_mapped_file | Purpose Specifies the default memory placement policy for files that are mapped into the address space of a process (such as through shmat() and mmap()). Tuning Default placement of memory mapped files can be set to first-touch (value of 1) or round-robin across the system (value of 2) or automatic (value of 0), where the system decides the best placement for the memory. |
memplace_shm_anonymous | Purpose Specifies the default memory placement policy for anonymous shared memory. Tuning Anonymous shared memory refers to working storage memory, created via shmget() or mmap(), that can be accessed only by the creating process or its descendants. This memory is not associated with a name (or key). Default placement of anonymous shared memory can be set to first-touch (value of 1) or round-robin across the system (value of 2) or automatic (value of 0), where the system decides the best placement for the memory. |
memplace_shm_named | Purpose Specifies the default memory placement policy for named shared memory. Tuning Named shared memory refers to working storage memory, created via shmget() or shm_open(), which is associated with a name (or key) that allows more than one process to access it simultaneously. Default placement of named shared memory can be set to first-touch (value of 1) or round-robin across the system (value of 2) or automatic (value of 0), where the system decides the best placement for the memory. |
memplace_stack | Purpose Specifies the default memory placement policies for the program stack. Tuning Stack placement can be set to first-touch (value of 1) or round-robin across the system (value of 2) or automatic (value of 0), where the system decides the best placement for the memory. |
memplace_text | Purpose Specifies the default memory placement policy for the application text. Tuning This applies only to the text of the main executable and not to its dependencies. Text placement can be set to first-touch (value of 1) or round-robin across the system (value of 2) or automatic (value of 0), where the system decides the best placement for the memory. |
memplace_unmapped_file | Purpose Specifies the default memory placement policy for unmapped file access, such as through read()/write(). Tuning Default placement of unmapped file access can be set to first-touch (value of 1) or round-robin across the system (value of 2) or automatic (value of 0), where the system decides the best placement for the memory. |
minfree | Purpose Specifies the number of frames on the free list at which the VMM starts to steal pages to replenish the free list. Tuning Page replacement occurs when the number of free frames reaches minfree. If the processes are being delayed by page stealing, increase minfree to improve response time. The difference between maxfree and minfree should be of the order of maxpgahead, and no less than 8. |
minperm% | Purpose Specifies the point below which the page-stealer will steal file or computational pages regardless of repaging rates. Tuning You can decrease this parameter if large number of file pages in memory is causing working storage pages to be replaced. On the other hand, if some files are known to be read repetitively, and I/O rates do not decrease with time from startup, minperm may be too low. |
nokilluid | Purpose The user IDs lower than this value will be exempt from getting killed due to low page-space conditions. Tuning A value of 0 indicates off. Useful when system is out of paging space and the system administration processes are being killed. Either set this tunable to 1 in order to protect specific user ID processes from getting killed due to low page space or ensure there is sufficient paging space available. |
npskill | Purpose Specifies the number of free paging-space pages at which the operating system begins killing processes. Tuning The default value is the maximum of 64 and (number of paging space pages)/128. The npskill value must be greater than zero and less than the total number of paging space pages on the system. |
npswarn | Purpose Specifies the number of free paging-space pages at which the operating system begins sending the SIGDANGER signal to processes. Tuning The default value is the maximum of 512 and (4*npskill). The value of npswarn must be greater than zero and less than the total number of paging space pages on the system. Increase the value if you experience processes being killed because of low paging space. |
numpsblks | Purpose Total number of paging-space blocks. Tuning N/A |
pinnable_frames | Purpose Number of pages available for pinning Tuning N/A |
relalias_percentage | Purpose If force_relalias_lite is set to 0, then this specifies the factor used in the heuristic to decide whether to avoid locking the source mmapped segment. Tuning This is used when tearing down an mmapped region and is a scalability statement, where avoiding the lock may help system throughput, but, in some cases, at the cost of more compute time used. If the number of pages being unmapped is less than this value divided by 100 and multiplied by the total number of pages in memory in the source mmapped segment, then the source lock is avoided. A value of 0 for relalias_percentage, with force_relalias_lite also set to 0, will cause the source segment lock to always be taken. Effective values for relalias_percentage will vary by workload, however, a suggested value is 200. |
scrub | Purpose Enables or Disables freeing of paging space disk blocks from pages in memory for Deferred Page Space Allocation Policy pages. Tuning A value of 0 disables scrubbing completely. A value of 1 enables scrubbing of in memory paging space disk blocks when the number of system free paging space blocks is below npsscrubmin, and continues until above npsscrubmax. |
v_pinshm | Purpose If set to 1, will allow pinning of shared memory segments. Tuning A value of 0 indicates off. Change this value when the overhead is high and in pinning or unpinning of AIO buffers from shared memory segments. Useful only if the application also sets the SHM_PIN flag when doing a shmget() call and if doing async I/O from shared memory segments. |
vmm_default_pspa | Purpose This tunable controls the default aggressiveness of page size promotion. The value is an abstract aggressiveness weighting which is treated by the operating system as the inverse of the page promotion threshold. Tuning A value of 0 for the vmm_default_pspa setting is equivalent to a page promotion threshold of 100%, that is, a memory range must have 100% real memory occupancy in order to be promoted. A value of 100 for the vmm_default_pspa setting is equivalent to a page promotion threshold of 0%, that is, a memory range should be promoted immediately on first reference to memory in the range. A value of -1 for the vmm_default_pspa setting is equivalent to a page promotion threshold of -1, that is, never do page promotion for a memory range. Page size promotion thresholds are only considered at segment creation time. Thus, changing vmm_default_pspa will only affect the page size promotion thresholds for segments created after the tunable is adjusted. |
wlm_memlimit_nonpg | Purpose Selects whether non-pageable page sizes (16M, 16G) are included in the WLM realmem and virtmem counts. If 1 is selected, then non-pageable page sizes are included in the realmem and virtmem limits count. If 0 is selected, then only pageable page sizes (4K, 64K) are included in the realmem and virtmem counts. This value can only be changed when WLM Memory Accounting is off, or the change will fail. Tuning When this tunable is set to 0, WLM virtual and real memory limits will only apply to pageable pages consumed by a WLM class. Because heavy use of pageable pages is what causes paging on a system, a value of 0 provides more granular control over how much a WLM class pages when non-pageable pages are in use. This tunable should only be adjusted when WLM real or virtual memory limits are being used on a system configured with non-pageable pages. |
vmo -L
vmo -r -o lgpg_regions=10 -o lgpg_size=16777216
vmo -h nokilluid
vmo -r -o v_pinshm=1
vmo -p -D
vmo -r -a
vmo -x