vmo Command

Purpose

Manages Virtual Memory Manager tunable parameters.

Syntax

vmo [ -p| -r] [ -y ] { -o Tunable [= Newvalue] }
vmo [ -p |-r ] [ -y ] { -d Tunable }
vmo [ -p |-r ] [ -y ] -D 
vmo [ -p | -r ] [ -F ] -a
vmo -h [ Tunable ] 
vmo [ -F ] -L [ Tunable ]
vmo [ -F ] -x [ Tunable ]
Note: Multiple -o, -d, -x and -L are allowed.

Description

Note: The vmo command can only be executed by root. The vmo command is a self-documenting command. The information about some of the flags or tunable parameters might be missing or out-of-date. You can find an up-to-date list of all the flags and by using the -h,-L, or -x flag.

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 specifies 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. The page frames are available to hold virtual-memory pages that are needed to satisfy a page fault. When the number of pages on the free list is less that the values that are 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 that are 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 only steals 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 stopping processes to release paging space.

Note: Options -o, -d, and -D, which attempt to change the value of a virtual memory manager tunable parameter, are not supported within a workload partition.
Understanding the Effect of Changing Tunable Parameters

Misuse of this command can cause performance degradation or operating-system failure. Before you experiment with the vmo command, familiarize yourself 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, 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.

Flags

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 displayed only for a parameter if its reboot and current values are equal. Otherwise, NONE is displayed as the value.
-d Tunable Resets the Tunable parameter to its default value. If a Tunable parameter, which must be changed because it is not set to its default value, meets one or more of the following sets of criteria, a warning message is displayed and no change is made to the parameter:
  • The tunable parameter is of type Bosboot or Reboot.
  • The tunable parameter is of type Incremental and was changed from its default value, and the -r flag is not used in combination.
-D Resets all Tunable values to their default values. If Tunables that need to be changed because they are not set to their default values meet one or more of the following sets of criteria, a warning message is displayed and no change is made:
  • The tunable is of type Bosboot or Reboot.
  • The tunable is of type Incremental and was changed from its default value, and -r is not used in combination.
-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:
NAME                      CUR    DEF    BOOT   MIN    MAX    UNIT           TYPE 
     DEPENDENCIES 
--------------------------------------------------------------------------------
memory_frames             128K          128K                 4KB pages         S 
-------------------------------------------------------------------------------- 
maxfree                   1088  1088    130    16     200K   4KB pages         D 
     minfree 
     memory_frames 
-------------------------------------------------------------------------------- 
minfree                   960    960    122    8      200K   4KB pages         D 
     maxfree 
     memory_frames 
-------------------------------------------------------------------------------- 
... 
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
-o Tunable[=Newvalue] Displays the value or sets tunable to Newvalue. If a tunable must be changed (the specified value is different than the current value), is of type Bosboot or Reboot, or if it is of type Incremental and its current value is greater than the specified value, and -r is not used in combination, the tunable value is not changed but a warning is displayed.

When the -r flag 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 the 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 the -r flag is used with the -a or -o options without specifying a new value, the values are displayed only if the current and next boot values for a parameter are the same. Otherwise, NONE is displayed as the value. The -r flag changes the reboot values when it is used with the -o, -d, or -D flags. For example, you can update the /etc/tunables/nextboot file when you use the -r flag. If any parameter of type Bosboot is changed, the user will be prompted to run the bosboot command.

When used with the -a or the -o options 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:
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 = list of dependent tunable parameters  
-y Suppresses the confirmation prompt before running the bosboot command.

If a restricted tunable parameter is changed, a warning message is displayed that indicates that a tunable of the restricted use type has been modified. If the -r or the -p option is specified, you are prompted to confirm the change. In addition, at system reboot, restricted tunables that are displayed in the /etc/tunables/nextboot file and are changed to values that are different from their default values (using a command line specifying the -r or -p option) causes an error log entry that identifies the list of these changed tunables.

When modifying tunable, the tunable value might be specified using abbreviations such as K, M, G, T, P and E to indicate units. See the following lists for abbreviations and their correspondent values:
  • K=210
  • M=220
  • G=230
  • T=240
  • P=250
  • E=260
Thus, a tunable value of 1024 might be specified as 1K.

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
All the tunable parameters manipulated by the tuning commands (no, nfso, vmo, ioo, raso, and schedo) have been 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 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.
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 that the current set of parameters managed by the vmo command only includes Static, Dynamic, and Bosboot types.

Compatibility Mode

When running in 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 Performance management.

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

Tunable Parameters

To view the default and range of values allowed for the tunables, run the vmo command with the -h option as follows:
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.

ame_mpsize_support
Purpose

Enables all supported page sizes in an Active Memory Expansion (AME) environment for POWER8® processor-based servers, or later, which supports the 64 KB accelerator.

Tuning

A value of 0 enables legacy behavior in an AME environment. In this case, only 4 KB and 16 MB page sizes are enabled. A value of 1 enables all supported page sizes in an AME environment. You can change this tunable parameter only in POWER8 processor-based servers, or later, which supports the 64 KB accelerator.

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 that the free-list size is frequently less than 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 is 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 after 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 less 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.

npsassert
Purpose

Asserts the LPAR when the system runs out of paging space.

Tuning
  • A value of 0 for this tunable provides legacy behavior where processes are killed when free paging space reaches the npskill threshold. Vmo tunable low_ps_handling influences which process is killed. SIGDANGER signal is sent to processes when the free paging space reaches danger levels.
  • A value of 1 for this tunable asserts the LPAR when paging space is completely exhausted. Processes are not killed when free paging space reaches npskill levels. SIGDANGER signal mechanism is suppressed, and processes are not notified when free paging space reaches danger levels.
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 less than 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.

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 Security. For a list of privileges and the authorizations that are 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 managed by the vmo command, enter:
    vmo -L
  2. To turn on and reserve 16MB large pages on a POWER4 system, enter:
    vmo -o lgpg_regions=10 -o lgpg_size=16777216

    This command will propose bosboot to the user, and warn that a reboot is necessary before the change will be effective.

  3. To display help on nokilluid, enter:
    vmo -h nokilluid
  4. To turn on v_pinshm after the next reboot, enter:
    vmo -r -o v_pinshm=1
  5. To permanently reset all vmo tunable parameters to default, enter:
    vmo -p -D
  6. To list the reboot value for all virtual memory manager tuning parameters, enter:
    vmo -r -a
  7. To list (spreadsheet format) the current and reboot value, range, unit, type and dependencies of all tunable parameters managed by the vmo command, enter:
    vmo -x