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

Commands Reference, Volume 6

vmo Command

Purpose

Manages Virtual Memory Manager tunable parameters.

Syntax

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

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

vmo [ -p | -r ] -D

vmo [ -p | -r ] -a

vmo -?

vmo -h Tunable

vmo -L [ Tunable ]

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

Description

Note
The vmo command can only be executed by root.

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.

Attention: 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 (VMM) and Tuning VMM Page Replacement.

Flags

-h Tunable Displays help about tunable parameter
-a Displays 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 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.
-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 becasue 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.

-L [ Tunable ] Lists the caracteristics of one or all tunables, 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 will result in amessage being displayed 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, 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.

Note
The current set of parameters managed by vmo only includes Dynamic and Bosboot types.
-? Displays the vmo command 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 meaningfull 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.

Tunable Parameters

defps
Purpose:
Turns on/off Deferred Page Space Allocation (DPSA) policy.
Values:
Default: 1

Range: 0 or 1;

Value of 1 means DPSA is on

Type: Dynamic

Diagnosis:
N/A
Tuning
May be useful to turn off DPSA policy if you are concerned about page-space overcommitment. Having the value on reduces paging space requirements.
Refer To:
Choosing between LPSA and DPSA with the vmtune Command
framesets
Purpose:
Specifies the number of real memory page sets per memory pool
Values:
  • Default: 2
  • Range: 1 to 10
  • Type: Bosboot
Diagnosis:
N/A
Tuning
N/A
lgpg_regions
Purpose:
Specifies the number of large pages to reserve for implementing with the shmget() system call with the SHM_LGPAGE flag.
Values:
  • Default: 0
  • Range: 0 - number of pages.
  • Type: Bosboot
Diagnosis:
N/A
Tuning
lpgpg_size must also be used in addition to this option. The application has to 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.
Refer To:
Miscellaneous I/O Tuning Parameters
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.
Values:
  • Default: 0
  • Range: 0 or 268435456 (on non-POWER4), or 0, 16777216 or 268435456 (on POWER4).
  • Type: Bosboot
Diagnosis:
N/A
Tuning
lgpg_region must of be set to a non-zero value in addition to this parameter. The application has to 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.
Refer To:
Miscellaneous I/O Tuning Parameters
lrubucket
Purpose:
Specifies the number of memory frames per bucket. The page-replacement algorithm divides real memory into buckets of frames. On systems with multiple memory pools, the lrubucket parameter is per memory pool.
Values:
  • Default: 131072 frames
  • Range: 65536 to total number of memory frames
  • Type: Dynamic
Diagnosis:
N/A
Tuning
Tuning this parameter is not recommended on most systems. Instead of scanning every frame in the system looking for a free frame, the page replacement algorithm scans through the contents of a bucket and scans the same bucket for the second pass before going on to the next bucket.
Refer To:
Tuning lrubucket to Reduce Memory Scanning Overhead
maxclient%
Purpose:
Specifies maximum percentage of RAM that can be used for caching client pages. Similar to maxperm% but cannot be bigger than maxperm%.
Values:
  • Default: 80
  • Range: 1 to 100%.
  • Type: Dynamic
Diagnosis:
If J2 file pages or NFS pages are causing working storage pages to get paged out, maxclient can be reduced.
Tuning
Decrease the value of maxclient if paging out to paging space is occurring due to too many J2 client pages or NFS client pages in memory. Increasing the value can allow more J2 or NFS client pages to be in memory before page replacement starts.
Refer To:
Miscellaneous I/O Tuning Parameters
maxfree
Purpose:
Specifies the number of frames on the free list at which page-stealing is to stop.
Values:
  • Default: 128
  • Range: 16 to 204800
  • Type: Dynamic
Diagnosis:
Observe free-list-size changes with vmstat n.
Tuning
If vmstat n shows free-list size frequently driven below minfree by application demands, increase maxfree to reduce calls to replenish the free list. Generally, keep maxfree - minfree equal to or less than 100. Setting the value too high causes page replacement to run for a longer period of time. Value must be at least 8 greater than minfree
Refer To:
Tuning VMM Page Replacement with the vmtune Command
maxperm%
Purpose:
Specifies the point above which the page-stealing algorithm steals only file pages.
Values:
  • Default: total number of memory frames * 0.8
  • Range: 1 to 100
  • Type: Dynamic
Diagnosis:
Monitor disk I/O with iostat n.
Tuning
This value is expressed as a percentage of the total real-memory page frames in the system. Reducing this value may reduce or eliminate page replacement of working storage pages caused by high number of file page accesses. Increasing this value may help NFS servers that are mostly read-only. For example, if some files are known to be read repetitively, and I/O rates do not decrease with time from startup, maxperm may be too low.
Refer To:
Tuning VMM Page Replacement with the vmtune Command
maxpin%
Purpose:
Specifies the maximum percentage of real memory that can be pinned.
Values:
  • Default: 80 percent
  • Range: 1 to 99
  • Type: Dynamic
Diagnosis:
Cannot pin memory, although free memory is available.
Tuning
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 maxpin values must be greater than one and less than 100. Change this parameter only in extreme situations, such as maximum-load benchmarking.
memory_affinity
Purpose:
On pSeries 690 systems this parameter can be used to instruct VMM to allocate memory frames in the same MCM that the executing thread is running in, if possible. This parameter only enables memory affinity, which can then be turned on for a given process by setting its MEMORY_AFFINITY environment variable to MCM.
Values:
  • Default: 0 (disabled)
  • Range: 0 or 1 (enabled)
  • Type: Bosboot
Diagnosis:
N/A
Tuning
If controlled, repeatable benchmarks are showing unexpected variability in execution time, enabling memory_affinity may be beneficial for performance.
Refer to:
Using AIX Memory Affinity Support
mempools
Purpose:
Changes the number of memory pools that will be configured at system boot time.
Values:
  • Default: number of CPUs/8
  • Range: 1 to number of CPUs
  • Type: Bosboot
Diagnosis:
N/A
Tuning
A value of 0 restores the default number of memory pools. Changes are not allowed on UP kernel, and are not recommended on other kernels.
Refer To:
Tuning Memory Pools
minfree
Purpose:
Specifies the minimum number of frames on the free list at which the VMM starts to steal pages to replenish the free list.
Values:
  • Default: maxfree - 8
  • Range: 8 to 204800
  • Type: Dynamic
Diagnosis:
vmstat n
Tuning
Page replacement occurs when the number of free frames reaches minfree. If processes are being delayed by page stealing, increase minfree to improve response time. The difference between minfree and maxfree should always be equal to or greater than maxpgahead.
Refer To:
Tuning VMM Page Replacement with the vmtune Command
minperm%
Purpose:
Specifies the point below (in percentage of total number of memory frames) which the page-stealer will steal file or computational pages regardless of repaging rates.
Values:
  • Default: 20 percent
  • Range: 1 to 100.
  • Type: Dynamic
Diagnosis:
Monitor disk I/O with iostat n.
Tuning
Can be useful to decrease this parameter if large number of file pages in memory is causing working storage pages to be replaced. Iif some files are known to be read repetitively, and I/O rates do not decrease with time from startup, minperm may be too low.
Refer To:
Tuning VMM Page Replacement with the vmtune Command
nokilluid
Purpose:
User IDs lower than this value are exempt from getting killed due to low page-space conditions.
Values:
  • Default: 0 (off)
  • Range: Any positive integer.
  • Type: Dynamic
Diagnosis:
N/A
Tuning
System out of paging space and system administrator's processes are getting killed. Set 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.
Refer To:
Choosing npswarn and npskill Settings
npskill
Purpose:
Specifies the number of free paging-space pages at which the operating system begins killing processes.
Values:
  • Default: MAX (64, number of paging space pages/128).
  • Range: 0 to total number of paging space pages on the system
  • Type: Dynamic
Diagnosis:
N/A
Tuning
Increase the value if you experience processes being killed because of low paging space.
Refer To:
Choosing npswarn and npskill Settings
npswarn
Purpose:
Specifies the number of free paging-space pages at which the operating system begins sending the SIGDANGER signal to processes.
Values:
  • Default: MAX (512, 4*npskill)
  • Range: 0 to total number of paging space pages on the system.
  • Type: Dynamic
Diagnosis:
N/A
Tuning
Increase the value if you experience processes being killed because of low paging space.
Refer To:
Choosing npswarn and npskill Settings
num_spec_dataseg
Purpose:
Reserve special data segment IDs for use by processes executed with the environment variable DATA_SEG_SPECIAL=Y. These data segments are assigned so that the hardware page table entries for pages within these segments are better distributed in the cache to reduce cache collisions. As many are reserved as possible up to the requested number. Running vmo -a after reboot displays the actual number reserved.
Values:
  • Default: 0
  • Range: 0 or a positive number
  • Type: Bosboot
Diagnosis:
N/A
Tuning
The correct number to reserve depends on the number of processes run simultaneously with DATA_SEG_SPECIAL=Y and the number of data segments used by each of these processes.
pagecoloring
Purpose:
Turns on or off page coloring in the VMM.
Values:
  • Default: 0 (off)
  • Range: 0 or 1.
  • Type: Bosboot
Diagnosis:
N/A
Tuning
This parameter is useful for some applications that run on machines that have a direct mapped cache.
pta_balance_threshold
Purpose:
Specifies the point at which a new pta segment will be allocated. This parameter does not exists in the 64-bit kernel.
Values:
  • Default: pta segment size * 0.5
  • Range: 1 to 99.
  • Type: Dynamic
Diagnosis:
System would crash from a dsi (abend code 300) with a stack similar to the following:
  findsrval64()
  shmforkws64()
  shmforkws()
  procdup()
  kforkx()
  kfork()
Dump investigation would show that the the pta segment is full for the page which generated the page fault.
Tuning
Tuning the pta balancing threshold lower will cause new pta segments to be allocated earlier, thereby reducing the chance that a pta segment will fill up and crash the system. If possible, a better solution would be to move to the 64-bit kernel which does not have this potential problem.
spec_dataseg_int
Purpose:
Modify the interval between the special data segment IDs reserved with num_spec_dataseg.
Values:
  • Default: 512
  • Range: 1 to any positive integer
  • Type: Bosboot
Diagnosis:
N/A
Tuning
Generally, for processes executed with DATA_SEG_SPECIAL=Y, the more pages of the data segment they all access, the higher this value should be to optimize performance. Values that are too high, however, limit the number of special segment IDs that can be reserved. The performance impact is highly dependent on the hardware architecture as well as the application behavior and different values may be optimal for different architectures and different applications.
strict_maxperm
Purpose:
If set to 1, the maxperm value will be a hard limit on how much of RAM can be used as a persistent file cache.
Values:
  • Default: 0 (off)
  • Range: 0 or 1.
  • Type: Dynamic
Diagnosis:
Excessive page outs to page space caused by too many file pages in RAM.
Tuning
Set to 1 in order to make the maxperm value a hard limit (use in conjunction with the tuning of the maxperm parameter).
Refer To:
Placing a Hard Limit on Persistent File Cache with strict_maxperm
v_pinshm
Purpose:
If set to 1, will allow pinning of shared memory segments.
Values:
  • Default: 0 (off)
  • Range: 0 or 1.
  • Type: Dynamic
Diagnosis:
Change when there is too much overhead in pinning or unpinning of AIO buffers from shared memory segments.
Tuning
Useful only if application also sets SHM_PIN flag when doing a shmget call and if doing async I/O from shared memory segments.
Refer To:
Miscellaneous I/O Tuning Parameters

Examples

  1. To list the current and reboot value, range, unit, type and dependencies of all tunables parameters managed by the vmo command, type:
    vmo -L
  2. To turn turn on and reserve 16MB large pages, type:
    vmo -r -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, type:
    vmo -h nokilluid
  4. To turn on v_pinshm after the next reboot, type:
    vmo -r -o v_pinshm=1
  5. To permanently reset all vmo tunable parameters to default, type:
    vmo -p -D
  6. To list the reboot value for all virtual Memory Manager tuning parameters, type:
    vmo -r -a

Related Information

ioo command, schedo command, no command, nfso command, tunsave command, tunrestore command, tuncheck command, and tundefault command.

Performance Overview of the Virtual Memory Manager (VMM) in AIX 5L Version 5.2 Performance Management Guide

Kernel Tuning in AIX 5L Version 5.2 Performance Tools Guide and Reference.

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