Oracle Process Memory Architecture-how to view memory consumed by Oracle processes
Last Update:2017-02-28
Source: Internet
Author: User
oracle| process
Oracle Process Memory Architecture-how to view memory consumed by Oracle processes
Last Updated:sunday, 2004-11-28 11:12 eygle
It is often asked how the memory resources consumed by the process are determined under UNIX, and why the top tool is displayed very high.
Some people say that the output of top is not accurate, this argument is not exact. In fact, the top output displays the Oracle process memory usage, which contains the SGA portion. This is also the meaning of the SGA.
The SGA can be shared, accessible to all processes, and contains the size of the SGA in the addressing space of the process.
As for how to determine the memory consumption of the process more accurately, this article briefly describes the following (under Quickio, you may not be able to see the description of this article):
1. System platform and database version
$ uname-asunos Billing 5.8 generic_108528-23 sun4u SPARC Sunw,ultra-4sun Microsystems Inc. SunOS 5.8 Generic Patch Octobe R 2001$ Sqlplus "/As SYSDBA" Sql*plus:release 9.2.0.4.0-production on Sun Nov 10:48:00 2004Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved. Connected to:oracle9i Enterprise Edition release 9.2.0.4.0-64bit productionwith The partitioning, OLAP and Oracle Data M ining optionsjserver Release 9.2.0.4.0-productionsql> select * from V$version; BANNER----------------------------------------------------------------oracle9i Enterprise Edition Release 9.2.0.4.0-64bit productionpl/sql release 9.2.0.4.0-productioncore 9.2.0.3.0 productiontns for Solaris:version 9.2.0.4 .0-productionnlsrtl Version 9.2.0.4.0-productionsql> show sgatotal System Global area 253200688 bytesfixed Size 731 440 bytesvariable Size 167772160 bytesdatabase buffers 83886080 bytesredo buffers 811008 bytesSQL> exitDisconnected fro M oracle9i Enterprise Edition release9.2.0.4.0-64bit Productionwith The partitioning, OLAP and Oracle Data Mining optionsjserver release 9.2.0.4.0-producti On
2.Top output
$ topload averages:0.12, 0.05, 0.04 billing 10:49:5254 processes:52 sleeping, 1 stopped, 1 on Cpucpu states:99.3%, 0.0% user, 0.3% kernel, 0.4% iowait, 0.0% swapmemory:2.0g Real, 1.2G free, 404M swap with, 5.1G swap free PID USERNAME THR PR NCE SIZE RES flts CPU COMMAND 10027 Oracle 1 0 2568K 1680K cpu03 0:00 0 0.09% Top 10052 Oracle 1 58 0 322M 275M sleep 21:18 0 0.01% Oracle 11264 Oracle 0 329M 275M 59:01 0 0.00% Oracle 10056 Oracle 1 0 322M 275M Sleep 3:04 0 0.00% Oracle 11262 Oracle 0 331M 270M 73:55 0 0.00% Oracle 11260 Oracle 258 0 333M 274M s Leep 52:46 0 0.00% Oracle 11266 Oracle 1 0 325M 276M sleep 26:50 0 0.00% Oracle 10054 Oracle 1 0 322M 275M sleep 18: 0 0.00% Oracle 23519 Oracle 1 0 322M 278M sleep 0:50 0 0.00% Oracle 11258 Oracle 1, 0 323M 271M sleep 0:31 0 0% Oracle 11285 Oracle 1 0 17.3M 3848K sleep 0:20 0 0.00% Tnslsnr 11270 Oracle 1 0 322M 271M sleep 0:06 0 0.00% Oracle 2990 Oracle 1 0 322M 276M Sleep 0:04 0 0.00% Oracle 9872 Oracle 1 0 1880K 1192K sleep 0:00 0 0.00% ksh 23498 Oracle 1-0 323M 278M Sleep 0:00 0 0.00% Oracle
3.Pmap output and Process memory calculation
$ ps-ef|grep Ora_ Oracle 9881 9872 0 10:49:57 pts/2 0:00 grep ora_ Oracle 11258 1 0 June 19? 0:31 Ora_pmon_hsbill Oracle 11260 1 0 June 19? 52:47 Ora_dbw0_hsbill Oracle 11262 1 0 June 19? 73:55 Ora_lgwr_hsbill Oracle 11264 1 0 June 19? 59:01 Ora_ckpt_hsbill Oracle 11266 1 0 June 19? 26:50 Ora_smon_hsbill Oracle 11268 1 0 June 19? 0:00 Ora_reco_hsbill Oracle 11270 1 0 June 19? 0:06 Ora_cjq0_hsbill Oracle 10054 1 0 Nov 02? 18:27 Ora_j001_hsbill Oracle 10052 1 0 Nov 02? 21:19 Ora_j000_hsbill Oracle 2990 1 0 Nov 25? 0:05 Ora_j003_hsbill Oracle 10056 1 0 Nov 02? 3:04 Ora_j002_hsbill Oracle 8879 1 0 09:54:32? 0:00 ora_j004_hsbill$ pmap 1126411264:ora_ckpt_hsbill0000000100000000 53824K read/exec/opt/oracle/product/9.2.0/bin /oracle000000010358e000 872K read/write/exec/opt/oracle/product/9.2.0/bin/oracle0000000103668000 7968K read/write/ exec [Heap]0000000380000000 266240K read/write/exec/shared [ism shmid=0x64]ffffffff7c802000 8K read/write/exec [anon ]ffffffff7c814000 8K Read/wriTe/exec [Anon]ffffffff7c826000 8K read/write/exec [anon]ffffffff7c838000 8K read/write/exec [anon]ffffffff7c84a000 8 K Read/write/exec [Anon]ffffffff7c85c000 8K read/write/exec [anon]ffffffff7c86e000 8K read/write/exec [Anon]FFFFFFFF 7c880000 8K read/write/exec [anon]ffffffff7c892000 8K read/write/exec [anon]ffffffff7c8a4000 8K read/write/exec [anon ]ffffffff7c8b6000 8K read/write/exec [anon]ffffffff7c8c8000 8K read/write/exec [anon]ffffffff7c8d6000 8K read/write/e Xec [Anon]ffffffff7c8da000 8K read/write/exec [anon]ffffffff7c8e8000 8K read/write/exec [anon]ffffffff7c8ec000 8K re Ad/write/exec [Anon]ffffffff7c8fa000 8K read/write/exec [anon]ffffffff7c8fe000 8K read/write/exec [Anon]FFFFFFFF7C90 C000 8K read/write/exec [anon]ffffffff7c910000 8K read/write/exec [anon]ffffffff7c91e000 8K read/write/exec [Anon]FF ffffff7ca02000 8K read/write/exec [anon]ffffffff7ca10000 8K read/write/exec [anon]ffffffff7ca14000 8K read/write/exec [Anon] ffffffff7ca22000 8K Read/write/exec [Anon]ffffffff7ca26000 8K read/write/exec [anon]ffffffff7ca34000 8K read/write/exec [Anon]FFFFFF ff7ca38000 8K read/write/exec [anon]ffffffff7ca46000 8K read/write/exec [anon]ffffffff7ca4a000 8K read/write/exec [an On]ffffffff7ca58000 8K read/write/exec [anon]ffffffff7ca5c000 8K read/write/exec [anon]ffffffff7ca6a000 8K read/write /exec [Anon]ffffffff7ca6e000 8K read/write/exec [anon]ffffffff7ca7c000 8K read/write/exec [anon]ffffffff7ca80000 8K Read/write/exec [Anon]ffffffff7ca8e000 8K read/write/exec [anon]ffffffff7ca92000 8K read/write/exec [Anon]FFFFFFFF7C AA0000 8K read/write/exec [anon]ffffffff7caa4000 8K read/write/exec [anon]ffffffff7cab2000 8K read/write/exec [anon] ffffffff7cab6000 8K read/write/exec [anon]ffffffff7cac4000 8K read/write/exec [anon]ffffffff7cac8000 8K Read/write/exe c [Anon]ffffffff7cad6000 8K read/write/exec [anon]ffffffff7cada000 8K read/write/exec [anon]ffffffff7cae8000 8K Read /write/exec [Anon]FFFFffff7caec000 8K read/write/exec [anon]ffffffff7cafa000 8K read/write/exec [anon]ffffffff7cafe000 8K read/write/exec [ Anon]ffffffff7cb0c000 8K read/write/exec [anon]ffffffff7cb10000 8K read/write/exec [anon]ffffffff7cb1e000 8K Read/wri Te/exec [Anon]ffffffff7cc00000 8K read/write/exec [anon]ffffffff7cd00000 24K read/exec/usr/lib/sparcv9/nss_files.so. 1ffffffff7ce06000 8K read/write/exec/usr/lib/sparcv9/nss_files.so.1ffffffff7cf00000 8K read/write [anon] ffffffff7cf10000 8K Read/write [anon]ffffffff7cf50000 8K read/write [anon]ffffffff7cf60000 16K Read/write [Anon]FFFF ffff7cf68000 32K Read/write [anon]ffffffff7d000000 16K read/exec/usr/platform/sun4u/lib/sparcv9/libc_ psr.so.1ffffffff7d100000 16K read/exec/usr/lib/sparcv9/libmp.so.2ffffffff7d204000 8K read/write/exec/usr/lib/ sparcv9/libmp.so.2ffffffff7d300000 8K read/write/exec [anon]ffffffff7d400000 88K read/exec/usr/lib/sparcv9/ libm.so.1ffffffff7d516000 8K read/write/exec/usr/lib/sparcv9/libm.so.1ffffffff7d600000 8K read/exec/usr/lib/sparcv9/libkstat.so.1ffffffff7d702000 8K read/write/exec/usr/lib/sparcv9/ libkstat.so.1ffffffff7d800000 32K read/exec/usr/lib/sparcv9/librt.so.1ffffffff7d908000 8K read/write/exec/usr/lib/ sparcv9/librt.so.1ffffffff7da00000 32K read/exec/usr/lib/sparcv9/libaio.so.1ffffffff7db08000 8K read/write/exec/ usr/lib/sparcv9/libaio.so.1ffffffff7dc00000 720K read/exec/usr/lib/sparcv9/libc.so.1ffffffff7ddb4000 56K read/ write/exec/usr/lib/sparcv9/libc.so.1ffffffff7ddc2000 8K read/write/exec/usr/lib/sparcv9/ libc.so.1ffffffff7df00000 8K read/write/exec [anon]ffffffff7e000000 32K read/exec/usr/lib/sparcv9/ libgen.so.1ffffffff7e108000 8K read/write/exec/usr/lib/sparcv9/libgen.so.1ffffffff7e200000 672K read/exec/usr/lib/ sparcv9/libnsl.so.1ffffffff7e3a8000 56K read/write/exec/usr/lib/sparcv9/libnsl.so.1ffffffff7e3b6000 40K read/write /exec/usr/lib/sparcv9/libnsl.so.1ffffffff7e400000 5328K read/exec/opt/oracle/product/9.2.0/lib/ libjox9.soffffffff7ea32000 384K read/write/exec/opt/oracle/product/9.2.0/lib/libjox9.soffffffff7ea92000 8K read/write/exec/opt/oracle/product/9.2.0/ lib/libjox9.soffffffff7eb00000 56K read/exec/usr/lib/sparcv9/libsocket.so.1ffffffff7ec0e000 16K read/write/exec/ usr/lib/sparcv9/libsocket.so.1ffffffff7ed00000 8K read/write/exec [anon]ffffffff7ee00000 32K read/exec/opt/oracle/ product/9.2.0/lib/libskgxn9.soffffffff7ef06000 8K read/write/exec/opt/oracle/product/9.2.0/lib/ libskgxn9.soffffffff7f000000 8K read/exec/opt/oracle/product/9.2.0/lib/libskgxp9.soffffffff7f100000 8K read/write/ exec/opt/oracle/product/9.2.0/lib/libskgxp9.soffffffff7f200000 8K read/exec/opt/oracle/product/9.2.0/lib/ libodmd9.soffffffff7f300000 8K read/write/exec/opt/oracle/product/9.2.0/lib/libodmd9.soffffffff7f400000 8K read/ exec/usr/lib/sparcv9/libdl.so.1ffffffff7f500000 8K read/write/exec [anon]ffffffff7f600000 152K read/exec/usr/lib/ sparcv9/ld.so.1ffffffff7f724000 16K read/write/exec/usr/lib/sparcv9/ld.so.1ffffffff7fffa000 24K read/write[Stack] Total 337360k$
To calculate the memory resources used by the background process:
337360k-266240k = 71,120k
This is the memory consumed by a process.
4. User process Memory usage examples
$ ps-ef|grep Local Oracle 10080 9872 0 11:00:25 pts/2 0:00 grep local Oracle 23498 1 0 Nov 25? 0:00 Oraclehsbill (local=no) Oracle 23519 1 0 Nov 25? 0:50 Oraclehsbill (local=no) $ pmap 2351923519:oraclehsbill (local=no) 0000000100000000 53824K read/exec/opt/oracle/ product/9.2.0/bin/oracle000000010358e000 872K read/write/exec/opt/oracle/product/9.2.0/bin/ oracle0000000103668000 848K read/write/exec [Heap]0000000380000000 266240K read/write/exec/shared [ism shmid=0x64]FFF fffff7cc00000 8K Read/write [anon]ffffffff7cc10000 8K read/write [anon]ffffffff7cc50000 136K Read/write [Anon]FFFFFF ff7cc76000 40K Read/write [anon]ffffffff7cd00000 8K read/write/exec [anon]ffffffff7ce00000 24K Read/exec/usr/lib/spar cv9/nss_files.so.1ffffffff7cf06000 8K read/write/exec/usr/lib/sparcv9/nss_files.so.1ffffffff7d000000 16K read/exec /usr/platform/sun4u/lib/sparcv9/libc_psr.so.1ffffffff7d100000 16K read/exec/usr/lib/sparcv9/ libmp.so.2ffffffff7d204000 8K Read/write/exec/usr/lib/sparcv9/libmp.so.2ffffffff7d300000 8K read/write/exec [anon]ffffffff7d400000 88K read/exec/usr/lib/sparcv9/ libm.so.1ffffffff7d516000 8K read/write/exec/usr/lib/sparcv9/libm.so.1ffffffff7d600000 8K read/exec/usr/lib/ sparcv9/libkstat.so.1ffffffff7d702000 8K read/write/exec/usr/lib/sparcv9/libkstat.so.1ffffffff7d800000 32K read/ exec/usr/lib/sparcv9/librt.so.1ffffffff7d908000 8K read/write/exec/usr/lib/sparcv9/librt.so.1ffffffff7da00000 32K read/exec/usr/lib/sparcv9/libaio.so.1ffffffff7db08000 8K read/write/exec/usr/lib/sparcv9/ libaio.so.1ffffffff7dc00000 720K read/exec/usr/lib/sparcv9/libc.so.1ffffffff7ddb4000 56K read/write/exec/usr/lib/ sparcv9/libc.so.1ffffffff7ddc2000 8K read/write/exec/usr/lib/sparcv9/libc.so.1ffffffff7df00000 8K read/write/exec [ Anon]ffffffff7e000000 32K read/exec/usr/lib/sparcv9/libgen.so.1ffffffff7e108000 8K read/write/exec/usr/lib/sparcv9 /libgen.so.1ffffffff7e200000 672K read/exec/usr/lib/sparcv9/libnsl.so.1ffffffff7e3a8000 56K read/write/exec/usr/ Lib/sparcv9/libnsl.so.1ffffffff7e3b6000 40K read/write/exec/usr/lib/sparcv9/libnsl.so.1ffffffff7e400000 5328K read/exec/ opt/oracle/product/9.2.0/lib/libjox9.soffffffff7ea32000 384K read/write/exec/opt/oracle/product/9.2.0/lib/ libjox9.soffffffff7ea92000 8K read/write/exec/opt/oracle/product/9.2.0/lib/libjox9.soffffffff7eb00000 56K read/ exec/usr/lib/sparcv9/libsocket.so.1ffffffff7ec0e000 16K read/write/exec/usr/lib/sparcv9/ libsocket.so.1ffffffff7ed00000 8K read/write/exec [anon]ffffffff7ee00000 32K read/exec/opt/oracle/product/9.2.0/lib /libskgxn9.soffffffff7ef06000 8K read/write/exec/opt/oracle/product/9.2.0/lib/libskgxn9.soffffffff7f000000 8K Read /exec/opt/oracle/product/9.2.0/lib/libskgxp9.soffffffff7f100000 8K read/write/exec/opt/oracle/product/9.2.0/lib/ libskgxp9.soffffffff7f200000 8K read/exec/opt/oracle/product/9.2.0/lib/libodmd9.soffffffff7f300000 8K read/write/ exec/opt/oracle/product/9.2.0/lib/libodmd9.soffffffff7f400000 8K read/exec/usr/lib/sparcv9/ libdl.so.1ffffffff7f5008K Read/write/exec [anon]ffffffff7f600000 152K read/exec/usr/lib/sparcv9/ld.so.1ffffffff7f724000 16K read/write/ exec/usr/lib/sparcv9/ld.so.1ffffffff7fff2000 56K read/write [Stack] Total 329968k$
From the PMAP output, we can see the library files called by the process, and their read and write status.
The author of this article:
Eygle,oracle technology concern, from China's largest Oracle technology forum Itpub.
Www.eygle.com is the author's personal site. You can contact the author by Guoqiang.Gai@gmail.com. Welcome technical discussions and exchange of links.
Original source:
Http://www.eygle.com/faq/How.To.Get.Process.Memory.Consume.htm