[20210508]分析library cache转储 2.txt

来源:这里教程网 时间:2026-03-03 16:40:59 作者:

[20210508]分析library cache转储 2.txt --//昨天分析library cache转储,链接http://blog.itpub.net/267265/viewspace-2771268/=>[20210507]分析library cache转储.txt --//发现每个mutex占用40字节。不过我发现出现一些别的数值。今天再仔细探究看看。 1.环境: SCOTT@book> @ ver1 PORT_STRING                    VERSION        BANNER ------------------------------ -------------- -------------------------------------------------------------------------------- x86_64/Linux 2.4.xx            11.2.0.4.0     Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production 2.测试: $ grep "Bucket:" book_ora_4308_0001.trc | sed "s/^Bucket: #=//;s/Mutex=//;s/(.*)//" > a3.txt $ awk 'NR==1{a=$1;b=strtonum($2) } NR>1{ print (strtonum($2)-b)/($1-a);a=$1;b=strtonum($2)}'  a3.txt | sort | uniq -c | sort -nr    3698 40       1 -96675.8       1 -943344       1 -5246550       1 -511229       1 509576       1 32856.1       1 205413       1 164322 --//可以发现大部分间隔都是40字节。看看出现其它数值为什么? 3.继续: $  awk 'NR==1{a=$1;b=strtonum($2);c=$2 } NR>1{ print a,c,$1,$2,(strtonum($2)-b)/($1-a);a=$1;b=strtonum($2);c=$2}'  a3.txt | grep -C 1 -v "40$" 40654 0x80bfdf88 40662 0x80bfe0c8 40 40662 0x80bfe0c8 40769 0x83ffdbb8 509576 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 40769 0x83ffdbb8 40777 0x83ffdcf8 40 -- 40910 0x83fff1c0 40947 0x83fff788 40 40947 0x83fff788 40998 0x847fd780 164322 ++++++++++++++++++++++++++++++++++++++++ 40998 0x847fd780 41014 0x847fda00 40 -- 41187 0x847ff508 41215 0x847ff968 40 41215 0x847ff968 41223 0x81ff86b8 -5246550 ########################################## 41223 0x81ff86b8 41240 0x81ff8960 40 -- 41958 0x81fff990 41963 0x81fffa58 40 41963 0x81fffa58 42007 0x81bf1230 -96675.8 42007 0x81bf1230 42033 0x81bf1640 40 -- 43472 0x81bff718 43516 0x81bffdf8 40 43516 0x81bffdf8 43542 0x80f52c50 -511229 43542 0x80f52c50 43545 0x80f52cc8 40 -- 61058 0x80ffdd30 61087 0x80ffe1b8 40 61087 0x80ffe1b8 61210 0x813d8c10 32856.1 61210 0x813d8c10 61227 0x813d8eb8 40 -- 65007 0x813fdd58 65013 0x813fde48 40 65013 0x813fde48 65031 0x81784960 205413 65031 0x81784960 65070 0x81784f78 40 -- 77515 0x817fe800 77562 0x817fef58 40 77562 0x817fef58 77584 0x804342b0 -943344 77584 0x804342b0 77617 0x804347d8 40 SYS@book> @ fcha 0x80bfe0c8 Find in which heap (UGA, PGA or Shared Pool) the memory address 0x80bfe0c8 resides... LOC KSMCHPTR           KSMCHIDX   KSMCHDUR KSMCHCOM           KSMCHSIZ KSMCHCLS   KSMCHTYP KSMCHPAR --- ---------------- ---------- ---------- ---------------- ---------- -------- ---------- ---------------- SGA 0000000080834000          1          1 permanent memor     3974984 perm              0 00 SYS@book> @ fcha 0x83fff788 Find in which heap (UGA, PGA or Shared Pool) the memory address 0x83fff788 resides... LOC KSMCHPTR           KSMCHIDX   KSMCHDUR KSMCHCOM           KSMCHSIZ KSMCHCLS   KSMCHTYP KSMCHPAR --- ---------------- ---------- ---------- ---------------- ---------- -------- ---------- ---------------- SGA 0000000083FFD160          1          1 permanent memor       10272 perm              0 00 SYS@book> @ fcha 0x847ff968 LOC KSMCHPTR           KSMCHIDX   KSMCHDUR KSMCHCOM           KSMCHSIZ KSMCHCLS   KSMCHTYP KSMCHPAR --- ---------------- ---------- ---------- ---------------- ---------- -------- ---------- ---------------- SGA 00000000847FD160          1          1 permanent memor       10272 perm              0 00 --//查询下划线,++++,####标识的chunk可以发现使用不同的chunk,这样出现跳跃就正常的,很奇怪oracle为什么不直接 --//分配完成的一个chunk放下整个这类的mutex。

相关推荐