暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

在AIX中计算ORACLE消耗的私有内存总数

原创 黄宸宁 2013-04-03
764


一早就收到兄弟伙发的QQ信息,关于aix中oracle内存计算的内容



The RSS number is equal to the sum of the number of working-segment pages in memory times 4 and

the code-segment pages in memory times 4.



The TRS number is equal to just the code-segment pages in memory times 4.



Please note that an AIX memory page is 4096 bytes, which is why the number of memory pages must be multiplied by 4 to get the value for

RSS and TRS (which are each reported in kilobytes).  For example, if the actual memory used by the code-segment was 2 pages

( 2 pages * 4096 byte page size = 8192 bytes), then the TRS value would be reported as 8 ( 2 {number of pages} * 4 = 8 {kilobytes} ).



Since RSS includes both working-segment and code-segment pages, if we subtract TRS, which is just the code-segment pages, from RSS, we are

left with only the working-segment pages, or private memory.  In the example above, the oracle pmon background process is using...



  13904 (RSS) - 13512 (TRS) = 392

  392 * 1024 = 401408 bytes



The correct amount of memory used by the pmon background process is 392k (401408 bytes), not 34 MB as reported by the "ps -lf" command.



The value of TRS will be approximately the same for all oracle background processes, since all of these processes are just different

invocations of the same $ORACLE_HOME/bin/oracle executable.



 



来自于AIX: Determining Oracle Memory Usage On AIX [ID 123754.1]



 



根据以上内容自己写了一条命令来查看



 



ps vx|grep ora|grep -v grep|awk '{sum+=($7-$10)};end{print sum/1024 "mb"}'



得到只是oracle消耗的私有内存的总量,不包含SGA等



 



查看每个oracle进程占用的私有内存:



ps vx|grep ora|awk '{print $1,($7-$10)/1024}'|sort -n -k2


「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论