一早就收到兄弟伙發的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