Configure AIX and Oracle to use 16MB large pages.
Here are the basic steps to configure AIX and Oracle to use large pages.
The AIX operating system allows shared memory to be allocated in pinned memory for improved performance. Pinned memory is always present in real memory; it is not paged in and out. The primary advantage of using pinned memory for the Oracle System Global Area (SGA) is that I/O from pinned memory is optimized for improved path length.
This is possible because the asynchronous I/O routines do not need to pin the SGA memory each time it is used for an I/O operation. Because of this performance improvement, it is best to use pinned memory to allocate the Oracle SGA.
When the Oracle initialization parameter LOCK_SGA is set to TRUE, Oracle will allocate shared memory for the SGA using the AIX pinned memory. (Note: shmget() is called with the SHM_PIN flag set.) In addition to setting the Oracle LOCK_SGA parameter to TRUE, the AIX operating system must be configured to allow pinned memory to be used for shared memory.
Find out how much memory Oracle needs for the SGA. Either ask the DBA or:
ipcs -mb | grep oracle
m 1048583 0x17ea85fc --rw-r----- oracle dba 7348436992
The last number is the size in bytes.
Divide the SGA size by 16777216 (AIX large page size) and add one to the result.
bc
7348436992/16777216
438
Configure AIX VMM to allocate the required number of large pages now and at reboot time.
vmo -o lgpg_size=16777216 -o lgpg_regions=439
vmo -r -o lgpg_size=16777216 -o lgpg_regions=439
Allow users to pin memory pages.
vmo -o v_pinshm=1
vmo -r -o v_pinshm=1
Set the oracle user attributes for pinning memory and using large pages.
chuser capabilities=CAP_BYPASS_RAC_VMM,CAP_PROPAGATE oracle
Ensure that your DBA has setup oracle pfile/spfile with 'lock_sga=TRUE'
If using Oracle 10.2.0.4, there is an oracle bug (Metalink note: 728444.1) regarding setting the page size correctly.
You will need to ensure the following is set before starting a database at 10.2.0.4 only.
export ORACLE_SGA_PGSZ=16m
Check that oracle is running and using large pages. The important line is the one starting L and you should check that PoolSize and inuse both have non zero values.
svmon -G
PageSize PoolSize inuse pgsp pin virtual
s 4 KB - 3417484 9190 2133523 2430414
m 64 KB - 42236 0 26763 42236
L 16 MB 439 439 0 439 0