使用svmon诊断AIX上的Oracle内存_MySQL, Oracle及数据库讨论区_Weblogic技术|Tuxedo技术|中间件技术|Oracle论坛|JAVA论坛|Linux/Unix技术|hadoop论坛_联动北方技术论坛  
网站首页 | 关于我们 | 服务中心 | 经验交流 | 公司荣誉 | 成功案例 | 合作伙伴 | 联系我们 |
联动北方-国内领先的云技术服务提供商
»  游客             当前位置:  论坛首页 »  自由讨论区 »  MySQL, Oracle及数据库讨论区 »
总帖数
1
每页帖数
101/1页1
返回列表
0
发起投票  发起投票 发新帖子
查看: 4990 | 回复: 0   主题: 使用svmon诊断AIX上的Oracle内存        下一篇 
紫狐狸988
注册用户
等级:上士
经验:261
发帖:29
精华:0
注册:2012-3-5
状态:离线
发送短消息息给紫狐狸988 加好友    发送短消息息给紫狐狸988 发消息
发表于: IP:您无权察看 2012-3-5 10:39:39 | [全部帖] [楼主帖] 楼主

使用svmon诊断AIX上的Oracle内存

目标:

AIX上使用"svmon"诊断一个oracle进程占用多少内存。

应用范围:

使用svmon监控AIX上的Oracle内存使用。

对于诊断和打破Oracle进程的内存组件,AIX上的"svmon"是很好的工具。“svmon”可以通过AIX操作系统光盘安装,使用需要root权限。

svmon -P 20876
-------------------------------------------------------------------------------
Pid Command [1] Inuse [2] Pin [3] Pgsp[4] Virtual 64-bit Mthrd
20876 ora_pmon_V8 29598 1451 182 16560 N N
Vsid Esid Type Description Inuse Pin Pgsp Virtual Addr Range
[5] [6] [7] [8]
1781 3 work shmat/mmap 11824 [9] 0 0 11824 0..24700
1761 1 pers code,large file /dev 9681 [10] 0 - - 0..9680
0 0 work kernel seg 3982 [11] 1450 182 3390 0..21804 :
65474..65535
18018 d work shared library text 2852 [12] 0 0 158 0..65535
4764 2 work process private 1127 [15] 1 0 1127 [13] 0..1182 :
65307..65535
f74f f work shared library data 81 [16] 0 0 61 [14] 0..1291
1e59e - pers large file /dev/lv00 33 0 - - 0..32
e58e - pers large file /dev/lv00 16 0 - - 0..82
b74b - pers large file /dev/lv00 1 0 - - 0..0
3703 - pers large file /dev/lv00 1 0 - - 0..0


在顶部,你会看到摘要(整体进程的总计):

[1] "Command" indicates the command name,this case it is the ora_pmon_v817 process
[2] "Inuse" column is the total number of pages in real memory from segments that
are used by the process), in this example,a total of 29598 pages for the
ora_pmon_V8 process (each page is normally 4 KB on AIX, to be confirmed by IBM).
[3] "Pin" column is the total number of pages pinned from segments that are
used by the process. Those pages are part of the "Inuse", but are pinned in
memory so that they can't be swapped out.
[4] "Pgspace" column (total number of paging-space pages that are used by the
process) shows 6427 pages.


详细的部分是对于进程的每个段的细分,在总结的部分提到:

[5] "Vsid" column is the virtual segment ID
[6] "Esid" column is the effective segment ID.
[7] "Type" is the type of segment (pers = persistent, work = versatile)
[8] "Description" gives more details for the segment id. It normally includes
volume name and the i-node of the file for persistent segments.


显示与i-node的相关文件的名称:

ncheck -i
find -xdev -inum -print


牢记要点:

一个段可以使用多个进程。通常情况下,SGA[9]和代码段([10][12])是共享的。发出不同的后台进程的svmon命令,使用相同的共享段ID。私有部分的段ID应该改变。段的实际内存中的每一页包含在的“INUSE”字段。“INUSE”的总额可能超过实际内存的页面总数。

Comparing the "svmon" output with "ps v
" output
-----------------------------------------------------
The 'ps v
' command gives less details memory information, e.g.
ps v 20876
PID TTY STAT TIME PGIN SIZE RSS LIM TSIZ TRS %CPU %MEM COMMAND
20876 - A 0:00 0 4752 43556 32768 27289 38724 0.0 5.0 ora_pmon_V8
[1] [2] [3] [4] [5]
Looking at 'svmon' and 'ps v
' output gives the following correspondence:
[1] "SIZE" value equates with the Pgspace number from the svmon command
for 'process private' [13] + shared library data [14] in 1 K units,
i.e. 4752 = 4 * (1127 + 61)
[2] "RSS" value equates with the Inuse numbers from the svmon command
for private working-storage segments [15], for code segments [10],
and for shared library data [16] of the process in 1-K units multiplied by 4.
i.e. 43556 = 4 * ( 1127 + 9681 + 81)
[3] "TSIZ" value is the size of text (shared-program) image. This is the size
of the text section of the executable file. Pages of the text section of the
executable program are only brought into memory when they are touched, that is,
branched to or loaded from. This TSIZ value can also be seen by executing the
'dump -ov' command against an executable program.
[4] "TRS" value equates with the Inuse numbers from the svmon command
for code segments [10] process in 1-K units multiplied by 4.
i.e. 38724 = 4 * 9681
To get the private non shared memory used subtract TRS [4] from RSS [2] of
the process, but remember value will change if the process is active.
e.g. 43556 - 38724 = 4832K private memory usage for pmon.
[5] %MEM is calculated as the sum of the number of working segment and
code segment pages in memory times 4 (that is, the RSS value), divided
by the size of the real memory of the machine in KB, times 100, rounded
to the nearest full percentage point.


备注:

1. 确定影子进程的内存使用情况更复杂,因为使用的内存量可以大大改变,从一个时刻到未来取决于用户正在做什么。... ...使用这个值乘以用户的数量从而估计系统将需要多少内存。

2. 为了检查内存泄露,使用SVMON查看Type=work discrible=Private.检查在Pgspace列下有多少4K页面被使用。这是工作页面的最低数量,这部分是在所有的虚拟内存使用。Pgspace数量增长,从来没有下降,可能会表明内存泄漏。北京联动北方科技有限公司




赞(0)    操作        顶端 
总帖数
1
每页帖数
101/1页1
返回列表
发新帖子
请输入验证码: 点击刷新验证码
您需要登录后才可以回帖 登录 | 注册
技术讨论