Solved

AIX Memory consumption for oracle sessions is High

Posted on 2013-06-22
4
2,253 Views
Last Modified: 2013-07-16
Hi Experts ,

Recently we upgraded the RAM of AIX Server 5.3 running the database oracle 10g. As the memory consumption on AIX was 99% so we thought of upgrading the RAM from 12GB to 18GB but still svmon shows 99% memory consumption and also there is heavy paging .

SVMON -G output
memory      4718592     4601416      117176     2993739     4086597
pg space    3145728      453044

               work        pers        clnt       other
pin         2839153           0           0      154586
in use      3695143           0      906273

PageSize   PoolSize      inuse       pgsp        pin    virtual
s   4 KB          -    4457256     453044    2889819    3942437
m  64 KB          -       9010          0       6495       9010

lsps -a
hd6             hdisk0            rootvg       12288MB    15   yes   yes    lv


After upgrading why there is memory issue.
0
Comment
Question by:oraclescsa
  • 2
4 Comments
 
LVL 25

Expert Comment

by:madunix
ID: 39268183
Run:
vmo -a | egrep "maxperm|minperm|maxclient"

As a first step, try to change the following vmo  (dont forget the % sign)
vmo -o  minperm%=10
vmo -o  maxclient%=20
vmo -o  maxperm%=20

Read more about tuning:
http://www.ibm.com/developerworks/aix/library/au-aixoracle/index.html
http://www.ibmsystemsmag.com/aix/tipstechniques/systemsmanagement/Paging,-Memory-and-I-O-Delays/?page=1
http://madunixblog.blogspot.com/2007/04/aix-53-recommendation.html
http://www-03.ibm.com/support/techdocs/atsmastr.nsf/WebIndex/WP100883
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 39268370
Why would you think that there is a memory issue?

svmon says that from your 18 GB 17.55 GB are indeed used, but that only 14.1 GB are in use for processes, which means that the remainder is used for filesystem caching ("clnt in use" means jfs2 or NFS cache).

Moreover, 10.8 GB of the used 14.1 GB are pinned, which is an indication that you might have set "lock_sga=true" (Oracle) and "v_pinshm=1" (AIX) so that this memory is (mostly) being used for Oracle SGA.

I guess that the difference between 10.8 GB and 14.1 GB is mainly used for Oracle client processes (PGA) and other user processes, e.g. a backup scheduler or a monitoring agent or the like.

The OS takes its part too, of course.

The suggestion provided by madunix can sometimes help reduce paging (by eventually reducing the amount of client/cache memory used) .
In your case the suggested 20% of 18 GB are 3.6 GB, but as of now you're only using 3.46 GB for "client" memory, so you won't probably see any effect at all.

Moreover, it will not change anything in regard to used process memory (14.1 GB).

15% of your swap space is in use (1.8 GB). Pease remember that AIX doesn't purge paged out memory immediately, so these 15% are most probably not entirely occupied by active pages.

So the really important question is: What do you mean with "heavy paging"?

Run "vmstat 1" and watch the pi/po columns, or run "topas" and check "PAGING" - "PgspIn/PgspOut" (not PageIn/PageOut!)

If these values are not too elevated there is no reason to get worried and all in all your system looks just fine.

If paging rates are indeed high you could consider going without the settings "lock_sga=true" (Oracle) and "v_pinshm=1" (AIX) - if they're really set, that is.


wmp
0
 

Author Comment

by:oraclescsa
ID: 39270452
My settings in VMO looks like this.
vmo -a | egrep "maxperm|minperm|maxclient"
      maxclient% = 20
      maxperm = 897830
      maxperm% = 20
      minperm = 224456
      minperm% = 5
     strict_maxclient = 1
     strict_maxperm = 0

Wmp

Yes you are right that my lock_sga=true and v_pinshm=1 are set like that.
I think 14.1GB is too much for oracle processes. My SGA size is 8GB and PGA is 2GB then 4GB memory is consumed by which processes.

I ran vmstat 1 and it is not showing much paging.

kthr    memory              page              faults              cpu
----- ----------- ------------------------ ------------ -----------------------
 r  b   avm   fre  re  pi  po  fr   sr  cy  in   sy  cs us sy id wa    pc    ec
 2  2 4218884 27786   0   0   0 3264 55841   0 1718 9341 3719 52  4 28 16  1.88  56.9
 6  0 4218651 27976   0  61   0 3372 49548   0 1728 43237 3802 73  4 15  7  2.57  77.9
 2  2 4218588 28144   0   0   0 3486 45987   0 1264 8192 2645 59  3 25 13  2.06  62.4
 2  2 4218620 28136   0   0   0 4146 41685   0 913 8094 2028 63  3 24 10  2.20  66.6
 2  2 4219421 27304   0   0   0 3458 42380   0 1195 74880 2553 61  4 27  8  2.17  65.7

Full VMO settings

       cpu_scale_memp = 8
data_stagger_interval = 161
                defps = 1
  force_relalias_lite = 0
            framesets = 2
            htabscale = n/a
    kernel_heap_psize = 4096
         kernel_psize = 16777216
 large_page_heap_size = 0
         lgpg_regions = 0
            lgpg_size = 0
      low_ps_handling = 1
      lru_file_repage = 1
    lru_poll_interval = 10
            lrubucket = 131072
           maxclient% = 20
              maxfree = 1088
              maxperm = 897830
             maxperm% = 20
               maxpin = 3805791
              maxpin% = 80
      mbuf_heap_psize = 65536
      memory_affinity = 1
        memory_frames = 4718592
        memplace_data = 2
 memplace_mapped_file = 2
emplace_shm_anonymous = 2
   memplace_shm_named = 2
       memplace_stack = 2
        memplace_text = 2
emplace_unmapped_file = 2
             mempools = 5
              minfree = 960
              minperm = 224456
             minperm% = 5
            nokilluid = 0
              npskill = 24576
            npsrpgmax = 196608
            npsrpgmin = 147456
          npsscrubmax = 196608
          npsscrubmin = 147456
              npswarn = 98304
     num_spec_dataseg = 0
            numpsblks = 3145728
    page_steal_method = 0
         pagecoloring = n/a
               maxperm = 897830
              maxperm% = 20
                maxpin = 3805791
               maxpin% = 80
       mbuf_heap_psize = 65536
       memory_affinity = 1
         memory_frames = 4718592
         memplace_data = 2
  memplace_mapped_file = 2
memplace_shm_anonymous = 2
    memplace_shm_named = 2
        memplace_stack = 2
         memplace_text = 2
memplace_unmapped_file = 2
              mempools = 5
               minfree = 960
               minperm = 224456
              minperm% = 5
             nokilluid = 0
               npskill = 24576
             npsrpgmax = 196608
             npsrpgmin = 147456
           npsscrubmax = 196608
           npsscrubmin = 147456
               npswarn = 98304
      num_spec_dataseg = 0
             numpsblks = 3145728
     page_steal_method = 0
          pagecoloring = n/a
       pinnable_frames = 1721953
  psm_timeout_interval = 5000
 pta_balance_threshold = n/a
   relalias_percentage = 0
              rpgclean = 0
            rpgcontrol = 2
                 scrub = 0
            scrubclean = 0
 soft_min_lgpgs_vmpool = 0
      spec_dataseg_int = 512
      strict_maxclient = 1
        strict_maxperm = 0
              v_pinshm = 1
  vm_modlist_threshold = -1
       vmm_fork_policy = 1
    vmm_mpsize_support = 1
    wlm_memlimit_nonpg = 1

I am scratching my head to figure out which process is taking more memory and not releasing it after it is used.
0
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 500 total points
ID: 39270490
OK,

from those remaining 4 GB the OS and user background processes are taking their part, which is usually > 1 GB.

To find out where your memory is used for run

topas -p30

then hit "P" (<shift><P>) and sort the now displayed process table by PAGE SPACE by positioning the cursor on that column (arrow keys).

The sizes shown are in 4K pages. Which processes are on top?

Don't worry that you're not seeing the Oracle server processes consuming much memory.
They're using shared memory which is not shown here.

To check where the shared memory is used for run

ipcs -am

The size in bytes is under SEGSZ, CPID and LPID contain the process ID of the creator and last using process, respectively.

wmp
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now