How do you calculate Large Page settings for Oracle on AIX?

  • From: "Leyi Zhang (Kamus)" <kamusis@xxxxxxxxx>
  • To: oracle_l <Oracle-L@xxxxxxxxxxxxx>
  • Date: Thu, 6 Jan 2011 14:56:05 +0800

Hi, lists

I followed MOS [ID 372157.1] to setting large pages for Oracle SGA and .text
and .data. But looks something strange.

AIX : version 5300-12, 10 CPU (2 core/cpu), 40G Mem
ASM version: 10.2.0.5.1, SGA set to 124M
Oracle version: Oracle RAC 10.2.0.5.1 , SGA set to 20G, and processes is 500

I calculated as follow:
--Total 1784 (20G SGA, 500 processes)
SQL> select
((round((20*1024*1024*1024-1)/(16*1024*1024))+1)+round((9212+4095)/4096) +
500*(round((1924+4095)/4096))) from dual;

((ROUND((20*1024*1024*1024-1)/(16*1024*1024))+1)+ROUND((9212+4095)/4096)+500*(RO
--------------------------------------------------------------------------------

 1784

# vmo -p -o lgpg_regions=1784 -o lgpg_size=16777216
$ ldedit -b lpdata $ORACLE_HOME/bin/oracle
$ export LDR_CNTRL=LARGE_PAGE_TEXT=Y@LARGE_PAGE_DATA=M
$ srvctl start database ....

1784 * 16M = 28G, it's definitely can hold 20G SGA and 124M ASM SGA, right?
After I restart instance, there are only 3-5 user session connected, but
when I run RMAN backup, ORA-04030 error occured.

RMAN> run{
2>      allocate channel d1 type disk format '/backup/%T-%U';
3>      allocate channel d2 type disk format '/backup/%T-%U';
4>      sql 'alter system archive log thread 1 current';
5>      sql 'alter system archive log thread 2 current';

6>      backup database;
7>      sql 'alter system archive log thread 1 current';
8>      sql 'alter system archive log thread 2 current';
     release channel d1;
    release channel d2;
}  9> 10> 11>

using target database control file instead of recovery catalog
allocated channel: d1
channel d1: sid=1073 instance=portaldb1 devtype=DISK

allocated channel: d2
channel d2: sid=1057 instance=portaldb1 devtype=DISK
kgefec: fatal error 0
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00601: fatal error in recovery manager
RMAN-03010: fatal error during library cache pre-loading
RMAN-10015: error compiling PL/SQL program
RMAN-10033: error during compilation of job step 69: ORA-00603: ORACLE
server session terminated by fatal error
ORA-04030: out of process memory when trying to allocate 4120 bytes (PLS
non-lib hp,pdz7M87_Make)
kgefec: fatal error 0

ORA-04030 means physical memory has been exhausted , how this could happen?
After I reduced SGA to 10G or increase  lgpg_regions=1984, RMAN can run
correctly.

Finally I set lgpg_regions=1984 and used vmstat to check memory usage.
$vmstat -l 1 10

System Configuration: lcpu=20 mem=40960MB

kthr    memory              page              faults        cpu
large-page
----- ----------- ------------------------ ------------ -----------
-----------
r  b   avm   fre  re  pi  po  fr   sr  cy  in   sy  cs us sy id wa   alp
flp
16 11 11600047 10869   0 177 555 521 13819   0 4192 268673 9556 93  3  1  2
 1970    14
19  9 11584224 27109   0 325 286 498 1333   0 3211 189599 8985 89  2  5  3
 1970    14
13 10 11590628 14158   0 406   0   0    0   0 2652 329951 9395 92  3  2  3
 1970    14
13  8 11519029 65879   0 385  79 338  414   0 3124 166951 8981 91  2  3  4
 1970    14
20  8 11550865 25674   0 518   0   0    0   0 2652 165505 8513 98  2  0  0
 1970    14
16  9 11559447  9441   0 522  46 107  122   0 3622 176196 9727 97  2  1  1
 1970    14
17 16 11573425  9462   0 153 744 1054 3825   0 3392 105384 7721 91  2  5  2
 1970    14
15 18 11595834 11754   0   0 1239 1661 8939   0 4020 150253 7265 90  2  4  3
 1970    14
14 27 11614612  7952   0  35 755 916 2193   0 3757 156835 7449 89  2  4  5
 1970    14
14 25 11623826 11489   0 209 662 871 3106   0 3559 148797 8685 82  2  6 10
 1970    14

Now here's my questions:
1. I only have 20G SGA, why 1970 large pages used?
2. After setting large page, Oracle process can not use small page anymore
even still have free physical memory?
3. What value of lgpg_regions should I set in my situation: 40G physical
mem, 20G SGA ,500 processes, with ASM.

Thanks for any response.

--
Kamus <kamusis@xxxxxxxxx>

Visit my blog for more : http://www.dbform.com
Join ACOUG: http://www.acoug.org

Other related posts: