Wednesday, 22 June 2011

How to find SGA is using HugePages

Posted by Aneesh On 01:20 No comments

    SQL> show parameter sga
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    lock_sga                             boolean     FALSE
    pre_page_sga                         boolean     FALSE
    sga_max_size                         big integer 15G
    sga_target                           big integer 0
    SQL> select name from v$database;
    SQL> !ipcs -m
    ------ Shared Memory Segments --------
    key        shmid      owner      perms      bytes      nattch     status
    0xa17c9c18 1146880    orprod  640        16108224512 123
    SQL>select 16108224512/1024/1024/1024 "Shared Memory in GB's" from dual;
    Shared Memory in GB's
    SQL>!cat /etc/sysctl.conf |grep kernel.shmmax
    kernel.shmmax = 17716740096
    SQL> select 17716740096/1024/1024/1024 "Max Shared memory in GB's" from dual;
    Max Shared memory in GB's
    SQL>!cat /etc/sysctl.conf |grep huge
    # Set parameter only if hugepages patch #4322630 has been applied on AMD64/SLES9
    SQL> select 7500*2048/1024/1024 "Total Huge Page size in GB's" from dual;
    Total Huge Page size in GB's
    PROD instance instance is not using hugepages because the current huge page size is not sufficient to accomidate the SGA and instance started without using the memory allocated in hugepages.
    + If we need to set and use huge pages.The following is the recomendation for setting the Total huge page size value.
    SQL>  select 15*1024/2+20 "Recomended Huge Page Size" from dual;
    Recomended Huge Page Size

Huge Pages are not configured to work with Automatic memory management in 11g and Automatic shared memory management in 11g . If you want to use Huge pages then  disable AMM / ASMM .


Post a Comment

You may also like the below posts