Counting Size of Oracle Process

Its very important for DBA to calculate the size of oracle process.

Most of the time DBAs uses OS utilities to count the size of Oracle process.

The process in memory is comprise of following.

  1. shared memory    (the SGA)
  2. shared libraries (both public, and private)
  3. private data     (referred to as DATA, or heap)
  4. the executable   (referred to as TEXT)

Unfortunately, commands such as ‘ps’ and ‘top’ include TEXT sizes when measuring private data.

Few OS provides very good utilities which provide more accurate data.Examples are PMAP , GLANCE etc.

Here is the example to prove it.

oracle@oaxgs36$ ps -eafl | grep 12456
0 O   oracle 12456 12451  10  78 20        ? 153449          22:34:37 ?         422:43 oraclexgs (DESCRIPTION=(LOCAL=YES)(

PS command show the size 153449 kb means around 153 MB.

oracle@oaxgs36$ prstat | grep 12456
12456 oracle   1199M 1130M sleep   60    0   7:01:54 9.9% oracle/11

PRSTAT command shows the size 1199 MB

oracle@oaxgs36$ pmap -x 12456
12456:  oraclexgs (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=be)))
Address     Kbytes        RSS       Anon     Locked Mode   Mapped File
0000000100000000      95672      94648          -          – r-x–  oracle
0000000105E6C000        640        408        128          – rwx–  oracle
0000000105F0C000         24          8          8          – rwx–  oracle
0000000105F12000       3992        216        208          – rwx–    [ heap ]
0000000380000000    1048592    1048592          -    1048592 rwxsR    [ ism shmid=0x2700003d ]
FFFFFFFF74200000         64         16         16          – rwx–    [ anon ]
FFFFFFFF7FFB2000        312         72         72          – rw—    [ stack ]
—————- ———- ———- ———- ———-
total Kb    1223432    1163592       4576    1048592

PMAP command shows total size 1220 MB  but gives the breakup.

0000000105F12000       3992        216        208          – rwx–    [ heap ] – Around 4 MB

0000000380000000    1048592    1048592          -    1048592 rwxsR    [ ism shmid=0x2700003d ] – Around 1GB Shared Memory

SGA is of around 1GB size.The shared memory segment identifier is 0×2700003d which you can relate with ipcs -m command.

This highlights that the private data area of approx 150kB cannot be measured accurately from standard operating system utilities such as ‘ps’ and ‘top’  whereas ‘pmap’ allows a more accurate figure to be determined.

There are currently no comments highlighted.

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>