You are on page 1of 3

SAP Note 973227 - AIX Virtual Memory Management: Tuning

Recommendations
Note Language: English Version: 5 Validity: Valid Since 30.11.2006

Summary

Symptom
High paging rates, low values for free memory

Other terms
AIX, Performance, Tuning, Memory Management, VMM, vmtune, vmo, minperm,
maxperm, maxclient

Reason and Prerequisites


AIX Virtual Memory Management (VMM) is designed to exploit all available
physical memory in a system. VMM distinguishes between computational memory
segments (working storage segments like process data and stack or program
text segments) and file memory segments (usually pages from permanent data
files). As long as the virtual memory demand can be contained in real
memory pages, VMM will fill up the available pages with computational
memory pages or file pages (as a result of I/O operations). When the number
of free pages drop below a certain threshold, a page replacement process
will start and attempt to free up memory pages. The page-replacement
algorithm uses a number of thresholds and re-paging rates to decide which
pages get replaced. With the current default threshold settings there is a
slight bias in favor of computational pages. Especially for database
servers, the default settings are not optimal.

Databases buffer accesses to persistent data in their own cache and as the
data is typically accessed through file system I/O operations, it is also
buffered by the VMM in file pages. This redundant buffering of the same
data can lead to unnecessary paging. The objective for SAPsystems is to
keep all working storage segments in real memory while using the unused
memory segments as file system cache while pagereplacement should only
steal memory pages from the file system cache.

In the past, the only way to achieve this objective was to set certain
thresholds like minperm, maxperm, and maxclient to rather low numbers (see
SAP Note 921196).
It is important to note that these parameters do not set the amount of
memory used for file system cache, they rather control the boundaries for
the page replacement algorithm.
If the page stealer has to free up memory and the amount of memory used by
file pages is between minperm and maxperm (or maxclient for JFS2 file
systems), then the page stealer will consider the repaging rates to
determine which type of pages to steal. If the re-paging rate for file
pages is higher than the rate for computational memory, then the page
stealer will steal working segments leading to the undesired paging for SAP
systems.
Later releases introduced a new parameter called lru_file_repage which
allows to turn off the check for re-paging rates. With lru_file_repages set
to 0, the page replacement algorithm will always steal file pages as long
the amount of memory used for file pages is larger than the minperm
setting.

With this new parameter, the recommendations for VMM page replacement
tunables are:

03.09.2011 Page 1 of 3
SAP Note 973227 - AIX Virtual Memory Management: Tuning
Recommendations
minperm% = 3 (default 20)
maxperm% = 90 (default 80)
maxclient% = 90 (default 80)
lru_file_repage = 0 (default 1)
strict_maxclient = 1 (default 1)
strict_maxperm = 0 (default 0)

With this configuration the system can use up to 90% of its memory for file
caching but favors computational pages over file pages. Page replacement
will not steal any computational pages unless the amount of computational
memory exceeds 97%.

There are two more tunables that control the behavior of the page
replacement algorithm: minfree and maxfree.
The VMM attempts to keep the size of the free list greater than or equal to
minfree. When page faults or system demands cause the free list size to
fall below minfree, the page-replacement algorithm runs and frees pages
until the number of pages on the free list reaches maxfree. The default
values for minfree and maxfree were increased in AIX 5.3 ML01 and should be
implemented for older releases as well.

The new default values are:

minfree = 960
maxfree = 1088

These settings are per memory pool. Larger systems can have more than one
memory pool (you can check the number of memory pools with the "vmstat -v"
command).
In most cases the defaults are fine and do not require specific tuning. The
exceptions are typically small systems or LPARs with a single memory pool
and heavy filesystem activity. Larger systems have multiple memory pools
and the system wide minfree and maxfree values are large enough to prevent
the depletion of the list of free memory pages.
If you see the free list dropping close to 0 (check the fre column in a
vmstat output), you should increase the minfree and maxfree values by 1024
and monitor again.

Solution

The recommendations below require the following minimum AIX levels for this
parameter set to work correctly. If you are on an older level you should
continue to use the recommendations from SAP Note 921196.

Required maintenance levels:


AIX 5.1 ML09
AIX 5.2 ML05
AIX 5.3 ML01

The current recommendations for VMM page replacement tunables for all AIX
releases are:

minperm% = 3
maxperm% = 90
maxclient% = 90
lru_file_repage = 0
strict_maxclient = 1

03.09.2011 Page 2 of 3
SAP Note 973227 - AIX Virtual Memory Management: Tuning
Recommendations
strict_maxperm = 0
minfree = 960
maxfree = 1088

You can set the parameters using the smit fastpath "TunVmo" or directly
using the following command:

/usr/sbin/vmo -p -o minperm%=3 -o maxperm%=90 -o maxclient%=90 \


-o lru_file_repage=0 -o strict_maxclient=1 -o strict_maxperm=0 \
-o minfree=960 -o maxfree=1088

The new parameter recommendations are not restricted to DB servers only and
should be implemented for all servers in the landscape (including
application servers in a 3-tier implementation).

Note:
These recommendations are based on current information and tuning exercises
on behalf of many customers and different SAP implementations on AIX in a
range of sizes and are coordinated with recommendations from the AIX
performance lab. These work well in most cases, however this does not mean
that they cannot be varied to suit a particular situation or specific
issues, especially when instructed by IBM AIX support.

Header Data
Release Status: Released for Customer
Released on: 30.11.2006 14:06:04
Master Language: English
Priority: Recommendations/additional info
Category: Performance
Primary Component: BC-OP-AIX IBM AIX

The Note is release-independent

Related Notes
Number Short Text
1508983 Long running Garbage Collection cycles
921196 AIX Memory Tuning Recommendations >5.2
856848 AIX Extended Memory Disclaiming
793113 FAQ: Oracle I/O configuration
78498 High paging rate on AIX servers, in particular DB servers

03.09.2011 Page 3 of 3

You might also like