版本11.2.0.2 @ RHEL4.8 X86_64

V$SGASTAT

shared pool,KGLHD,2738019744shared pool,free memory,882513336shared pool,KGLH0,588651896
shared pool,SQLA,520359200
shared pool,Checkpoint queue,67117056
shared pool,kglsim object batch,48531840
shared pool,KKSSP,46507096
shared pool,dbwriter coalesce buffer,33587200
shared pool,ASH buffers,33554432


Free虽然很大,但几乎碎片化很重,常发生ORA-04031。

跑类似应用的其他DB KGLHD通常只有100M不到,这台有2G多还在不断吃Memory. 也无法 shrink。

这个KGLHD 查下来似乎是library cache handle, 但handle的size>1/2 size of shared pool 很不正常了,感觉是很多东西无法释放。