This document discusses the vmtune command used to modify the Virtual Memory Manager (VMM) parameters that control the behavior of the memory management subsystem. This information applies to AIX Versions 4.x.
You can obtain more information in the AIX
Performance Management Guide, available online:
http://www.rs6000.ibm.com/doc_link/en_US/a_doc_lib/aixbman/prftungd/toc.htm
The product documentation library is also available:
http://www.rs6000.ibm.com/resource/aix_resource/Pubs/index.html
The command and source for vmtune are found in the /usr/samples/kernel directory. It is installed with the bos.adt.samples fileset.
There may be times when the default VMM parameters prove unsatisfactory. For instance, consider the situation where the aggregate size of the working pages is very large and file system pages are only referenced infrequently. In this case, the pages from the file system are read once and never used again. With the default parameters, the system would try to maintain up to ((RAMSIZE-4MB)*.8), or approximately 80%, of real memory with persistent pages, leaving only ((RAMSIZE-4MB)*.2), approximately 20%, for working pages. This imbalance would cause more working pages than necessary to be paged to and from paging space.
In this example, you can choose to reduce the maxperm value to 65% in an attempt to maintain a larger set of working pages in memory. This setting could lead to less paging to page space with no detrimental effect on the persistent storage. That will decrease, though, as the system brings in working pages and replaces some file pages.
If your system frequently requires quick access to many frames from the free list, you may want to increase the minfree and maxfree values. A larger minfree ensures that more frames are readily available when they are needed. The difference between minfree and maxfree determines how many pages are to be stolen for each call to the page replacement code (PRC). A larger difference usually means longer intervals between calls to the PRC but each call takes longer to complete.
You can achieve significant differences in read times by using various minpgahead and maxpgahead values. It is very dependent upon disk activity and access to the individual files. The VMM read-ahead algorithms, which these values affect, are designed to improve sequential access read performance.
It takes experience and know-how to set vmtune parameters properly. Therefore, it is highly recommended that you set vmtune values only after consulting the AIX Performance Team. Contact your AIX support center and ask for a performance analysis through consult line.
Here are all of the parameters available for AIX Version 4.1.3 and later versions. Earlier versions of AIX contain some, but not all, of the following options:
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 1. The default value of the minperm percentage is always around 17-19% of memory.
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 1. The default value of the maxperm percentage is always around 75-80% of memory. A pure Network File System (NFS) server may obtain better performance by increasing the maxperm value. A system that accesses large files (over 50-75% of the amount of RAM on the system; look at numperm to see how much memory is currently used for file mapping), may benefit by increasing the maxperm value. Reducing the maxperm value on systems with large active working storage requirements may reduce page space I/O.
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. The default value is 2.
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. The default value is 8. Increasing this number will help large sequential read performance.
Because of other limitations in the kernel and the Logical Volume Manager (LVM), the maximum value should not be greater than 128. The delta between minfree and maxfree should always be equal to or greater than maxpgahead.
Specifies the minimum number of frames on the free list. This number can range from 8 to 204800. The default value depends on the amount of RAM on the system. minfree is by default the value of maxfree: 8. The value of maxfree is equal to minimum (the number of memory pages divided by 128, 128). The delta between minfree and maxfree should always be equal to or greater than maxpgahead.
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. The default value of maxfree is determined by this formula: maxfree=minimum (the number of memory pages divided by 128, 128). The difference between minfree and maxfree should always be equal to or greater than maxpgahead.
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. maxpin values must be greater than 1 and less than 100. The value under maxpin is converted to a percentage at the end of the output of vmtune.
Specifies the number of free paging space pages at which AIX begins sending the SIGDANGER signal to processes. The formula to determine the default value is:
MAX(512, 4*npskill)
See the npskill description below. The value of npswarn has to be greater than 0 and less than the total number of paging space pages on the system.
Specifies the number of free paging space pages at which AIX begins killing processes. The formula to determine default value of npskill in AIX Version 4 is:
MAX(64, number_of_paging_space_pages/128)
The npskill value has to be greater than 0 and less than the total number of paging space pages on the system.
Specifies the number of 16KB clusters processed by the VMM's sequential write-behind algorithm. The default value is 1. Values can be any integer above 0. Higher number of clusters may result in larger sequential write performance on devices that support very fast writes (RAID and so on). Setting the value to a very high number like 500000 will essentially defeat the write-behind algorithm. This can be beneficial in cases such as database index creations where pages that were written to are read a short while later; write-behind could actually cause this process to take longer. One suggestion is to turn off write-behind before building indexes and then turn it back on after indexes have been built. For example, the mkpasswd command can run significantly faster when write-behind is disabled.
Specifies the number of file system bufstructs. The current default in AIX Version 4 is 93 since it is dependent on the size of the buf struct. This value must be greater than 0. Increasing this value will help write performance for very large writes sizes (on devices that support very fast writes). In order to enable this value, you must unmount the file system, change the value, and then mount the system again.
Controls the number of pbufs available to the LVM device driver. pbufs are pinned memory buffers used to hold I/O requests related to a Journaled File System (JFS). On systems where large amounts of sequential I/O occurs, this can result in I/Os bottlenecking at the LVM layer waiting for pbufs to be freed. In AIX Version 4, a single pbuf is used for each sequential I/O request regardless of the number of pages in that I/O. The maximum value is 128.
Specifies the number of LVM buffers for raw physical I/Os. The default value is 9. It may be beneficial to increase this value if you are doing large raw I/Os (that is, not going through the JFS). The possible values range between 1 and 64.
Specifies the number of pages that should be deleted in one chunk from RAM when a file is deleted. Changing this value may only be beneficial to real-time applications that delete files. By reducing the value of pd_npages, a real-time application can get better response time since few number of pages will be deleted before a process or thread is dispatched. 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.
Specifies a threshold (in 4KB pages) for random writes to accumulate in RAM before these pages are sync'ed to disk via a write-behind algorithm. This threshold is on a per file basis. This option is only available in AIX Version 4.1.3 and later versions. The default value of maxrandwrt is 0, which disables random write-behind. By enabling random write-behind (a typical value might be 128), applications that make heavy use of random writes can get better performance due to less dependence on the sync daemon to force writes out to disk. Some applications may degrade their performance due to write-behind (such as database index creations). In these cases, it may be beneficial to disable write-behind before creating database indexes and then reenabling write-behind after the indexes are created.
This parameter specifies the size (in 4KB 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 alogorithm. The default value is 512MB and the minimum is 256MB. Tuning this option is not recommended.
Turns on/off Deferred Page Space Allocation (DPSA) policy.
Default: 1; Range: 0 or 1; Value of 1 means DPSA is on.
It may be useful to turn off DPSA policy if you are concerned about page-space overcommitment (having the value on reduces paging space requirements).
A new page-space allocation policy was introduced in operating system version 4.3.2: Deferred Page Space Allocation. Prior to operating system version 4.3.2, a page-space disk block was allocated when a page was touched. However, this paging space may never be used, especially on systems with large real memory where paging is rare. With Deferred Page Space Allocation, the disk block allocation of paging space is delayed until it is necessary to page out the page, which results in no wasted paging space allocation. This may, however, result in additional overcommitment of paging space in systems where enough virtual memory is accessed that paging is necessary. On such systems, the amount of paging space required may be as much as was required before the DPSA policy was implemented.
Default: 0 (off); Range 0 or 1
Change takes effect immediately and is effective until next boot.
If set, this will cause a sync() to flush all I/O to a file without holding the i-node lock, and then use the i-node lock to do the commit.
For further information on this subject, see the AIX Performance Management Guide,"Appendix G."
This flag is used differently depending on what level you have for bos.adt.samples. If you are 4.3.3.0 or 4.3.3.1 of bos.adt.samples, your option will be for nokillroot. At 4.3.3.2 and later bos.adt.samples your option will be for nokilluid.
Setting the nokillroot option to 1 with the command vmtune -n 1, allows processes owned by root to be exempt from being killed when the npskill threshold is reached.
Setting the nokilluid option to a nonzero value with the command vmtune -n, allows user IDs lower than this value to be exempt from being killed because of low paging space conditions.
If set to 1, it will allow pinning of shared memory segments.
Default: 0 (off); Range 0 or 1
Change takes effect immediately and is effective until next boot.
Useful only if application also sets SHM_PIN flag when doing a shmget()call and if doing async I/O from shared memory segments.
For further information on this subject, see the AIX Performance Management Guide, "Appendix G."
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.
Default: 0 (off); Range 0 or 1
Change takes effect immediately and is effective until next boot.
Set to 1 in order to make the maxperm value a hard limit (use in conjunction with the tuning of the maxperm parameter).
For further information on this subject, see the AIX Performance Management Guide, "Appendix G."
The current values are displayed when vmtune is executed without any parameters. Changes to the values go into effect immediately but do not exist after you restart the system.
[ Doc Ref: 90605227614710 Publish Date: Jan. 18, 2001 4FAX Ref: 1777 ]