您的位置:首页 > 其它

ora-4031 and "obj stat memory" component in Shared Pool

2010-05-28 18:43 936 查看
My customer has an application which using a lots of "temporary" table. They create so many tables but only operate once.And they are using automatic SGA management,all this cause large memory usage in shared pool, especially the "obj stat memo".
Recently they encountered  the error 4031 , there are still 1G space available in shared pool, so i believe the root cause is too many obj stat fragment .
Verified the issue in the log file as noted below:

At first, i think this "obj stat memory"  subheap can be cleaned up by flush shared pool, but i 'm wrong ; The component is permanent in shared pool.

SQL>  select  * from v$sgastat where name='obj stat memo';

POOL         NAME                            BYTES
------------ -------------------------- ----------
shared pool  obj stat memo                 1454448

SQL> alter system flush shared_pool;

System altered.
SQL> select  * from v$sgastat where name='obj stat memo';

POOL         NAME                            BYTES
------------ -------------------------- ----------
shared pool  obj stat memo                 1454448

After that I  read the metalink note "Bug 5573238  Shared pool memory use / ORA-4031 due to "obj stat memo" in one subpool", oracle support advise to workaround this problem by setting STATISTICS_LEVEL=BASIC or "_object_statistics"=false. But STATISTICS_LEVEL=BASIC will disable many automatic features like ASMM, Automatic statistics gathering;If you set "_object_statistics"=false, then as  _object_statistics control the population of segment stats in the v$segstat andv$segment_statistics views. So setting this to false will result in no data populating these v$views.Both the parameters will require a database restart.
And i have opened a new tar , the oracle support advise as below:

Trace file shows indeed a high size for the 'obj stat memo' component but also some imbalance between the subpools.

Bug 5573238 is not an issue here as fixed as from 10.2.0.4 but the workaround can be used here as well. So, setting
"statistics_level"=basic or "_object_statistics"=false should also workaround this issue.

The imbalance of the subpools on the other hand might be caused by bug 6271590 which is fixed as from PSU patch
10.2.0.4.2.

I would suggest to apply the latest PSU patch available right now and that is 10.2.0.4.4.

For the 'obj stat memo' issue, you have to choose between further investigating the issue or using the workaround by
setting "statistics_level"=basic or "_object_statistics"=false.

If you want to further investigate the issue, we will need a more detailed heapdump of the ORA-4031.

To Do:
1. Apply PSU patch 10.2.0.4.4 (patch 9352164) on top of patchset 10.2.0.4

2. Regarding the 'obj stat memo' issue:

a) Workaround the issue by setting "statistics_level"=basic or "_object_statistics"=false
+
Bounce the instance

-OR-

b) Further investigate the issue:

Set following parameters in the init.ora file (SPFILE/PFILE):
SQL> alter system set max_dump_file_size = unlimited scope=spfile;
SQL> alter system set events '4031 trace name heapdump level 536870914' scope=spfile;

Bounce the instance

Once the ORA-4031 reoccurs, provide alert+trace file

So imbalance between subpool can be fixed , and will reduce the likelihood of  4031 occurrence. But we  can never flush huge memory used by "obj stat memory",i think it's awful .
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐