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

Commands Reference, Volume 6


vmtune Command

Purpose

Changes operational parameters of the Virtual Memory Manager and other AIX components.

Syntax

vmtune [ -a ] [ -b Numfsbuf] [ -B Numpbuf ] [ -c Nmclust ] [ -C 0 | 1 ] [ -d 0 | 1 ] [ -f MinFree ] [ -F MaxFree ] [ -g LargePageSize ] [ -h 0 | 1 ] [ -k NpsKill ] [ -l LruBucket ] [ -L LargePages ] [ -M MaxPin ] [ -n uid ] [ -N Pd_Npages ] [ -p minperm ] [ -P MaxPerm ] [ -r MinPgAhead ] [ -R MaxPgAhead ] [ -s SyncReleaseInodeLock ] [ -S 0 | 1 ] [ -t maxclient ][ -u lvm_Bufcnt] [ -U unixfile ] [ -w NpsWarn ] [ -W MaxRandWrt]

Description

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.

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

AIX Version 4 of the operating system allows tuning of the number of file system bufstructs (Numfsbuf) and the amount of data processed by the write-behind algorithm (Nmclust).

In AIX Version 4 of the operating system, 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.

vmtune can only be executed by root. Changes made by the vmtune command last until the next reboot of the system. If a permanent change in VMM parameters is needed, an appropriate vmtune command should be put in inittab.

Attention: Misuse of this command can cause performance degradation or operating-system failure. Before experimenting with vmtune, you should be thoroughly familiar with both Performance Overview of the Virtual Memory Manager (VMM) and Tuning VMM Page Replacement.

Flags


-a Displays the current statistic counters.
-b Numfsbuf Specifies the number of file system bufstructs. The default value is 64.
-B Numpbuf Specifies the number of pbufs used by the LVM. The maximum value is 128.
-c Nmclust Specifies the number of 16KB clusters processed by write behind. The default value is 1.
-C Enables page coloring for specific hardware platforms. When enabled, real memory is carefully assigned to virtual memory. On a system with a direct-mapped cache and certain workloads, this can provide more constant system performance. The bosboot command must be run and the system rebooted for this change to take affect.
-d Turns on or off deferred paging space allocation. By default, disk blocks for paging space are not allocated until pageout is actually required. This option allows this behavior to change so that the disk block is allocated when the memory is referenced.
-f MinFree Specifies the minimum number of frames on the free list. This number can range from 8 to 204800.
-F MaxFree Specifies the number of frames on the free list at which page stealing is to stop. This number can range from 16 to 204800 but must be greater than the number specified by the MinFree parameter by at least the value of MaxPgAhead.
-g LargePageSize 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. This must be enabled with a non-zero value for the -L flag and the bosboot command must be run and the system rebooted for this change to take affect.
-h Specifies that maxperm (-P) should be hard limit. By default it is a soft limit and numperm is allowed to grow beyond maxperm as long as there is free real memory available.
-k NpsKill Specifies the number of free paging-space pages at which AIX begins killing processes.
-l LruBucket Specifies the size (in 4K pages) of the least recently used (lru) page-replacement bucket size. This is the number of page frames which will be examined at one time for possible pageouts when a free frame is needed. A lower number will result in lower latency when looking for a free frame, but will also result in behavior that is not as much like a true lru algorithm. The default value is 512MB and the minimum is 256MB. Tuning this option is not recommended.
-L LargePages Specifies the number of large pages to reserve for implementing the shmget( ) system call with the SHM_LGPAGE flag. For this change to take effect, you must specify the -g flag, run the bosboot command, and reboot the system.
-M MaxPin Specifies the maximum percentage of real memory that can be pinned. The default value is 80. If this value is changed, the new value should ensure that at least 4MB of real memory will be left unpinned for use by the kernel.
-n uid Specifies that processes with uid less than uid should not be killed when paging space is low. Setting this to 1 would prevent root processes from being killed.
-N Pd_Npages Specifies the number of pages that should be deleted in one chunk from RAM when a file is deleted. The default value is the largest possible file size divided by the page size (currently 4096). If the largest possible file size is 2GB, then Pd_Npages is by default 524288. Tuning this option is really only useful for real-time applications.
-p minperm Specifies the point below which file pages are protected from the repage algorithm. This value is a percentage of the total real-memory page frames in the system. The specified value must be greater than or equal to 5.
-P MaxPerm Specifies the point above which the page stealing algorithm steals only file pages. This value is expressed as a percentage of the total real-memory page frames in the system. The specified value must be greater than or equal to 5.
-r MinPgAhead Specifies the number of pages with which sequential read-ahead starts. This value can range from 0 through 4096. It should be a power of 2.
-R MaxPgAhead Specifies the maximum number of pages to be read ahead. This value can range from 0 through 4096. It should be a power of 2 and should be greater than or equal to MinPgAhead.
-s SyncReleaseInodeLock Enables the code which minimizes the time spent holding inode lock during sync by flushing dirty pages before calling _commit. SyncReleaseInodeLock is a boolean variable: 0 to disable or a positive integer to enable. The default is 0.
-S Enables the SHM_PIN flag on shmget( ) system call. By default this flag is ignored.
-t maxclient Specifies the point above which the page stealing algorithm steals only client file pages. This value is expressed as a percentage of the total real-memory page frames in the system.
-u lvm_Bufcnt Specifies the number of LVM buffers for raw physical I/Os. The default value is 9. The possible values can range between 1 and 64. This option is only available in AIX Version 4.
-U unixfile Specifies the name of the AIX file to patch for the -m and -C flags. The default is /usr/lib/boot/unix_mp.
-w NpsWarn Specifies the number of free paging-space pages at which the operating system begins sending the SIGDANGER signal to processes.
-W MaxRandWrt Specifies a threshold (in 4KB pages) for random writes to accumulate in RAM before these pages are sync'd to disk via a write-behind algorithm. This threshold is on a per file basis.

The -W MaxRandWrt option is only available in AIX 4.1.3 and later. The default value of MaxRandWrt is 0, which disables random write-behind.

Related Information

Performance Overview of the Virtual Memory Manager (VMM)


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