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:
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:
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 .
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
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 .
相关文章推荐
- ora-4031 and "obj stat memory" component in Shared Pool
- ORA-04031:unable to allocate 4120 bytes of shared memory ‘obj stat mem’故障解决
- Diagnosing and Resolving Error ORA-04031 on the Shared Pool or Other Memory Pools (文档 ID 146599.1)
- Allocationand Reuse of Memory in the Shared Pool
- 【问题记录】ORA-04031 – shared_pool out of memory
- Know GCS AND GES structure size in shared pool
- ORA-04031: unable to allocate 4096 bytes of shared memory ("shared pool","BEGIN :EXEC_STR := SYS.DBMS...","PL/SQL MPCODE","BAMIM
- Gathering Initial Troubleshooting Information for Analysis of ORA-4031 Errors on the Shared Pool
- Gathering Initial Troubleshooting Information for Analysis of ORA-4031 Errors on the Shared Pool
- ORA-00371 not enough shared pool memory
- Gathering Initial Troubleshooting Information for Analysis of ORA-4031 Errors on the Shared Pool
- ORA-00093:_shared_pool_reserved_min_alloc must be between 4000 and 612xxx的另一种解决方案
- ORA-00371: not enough shared pool memory, should be atleast 62198988 bytes
- ORA-00371: not enough shared pool memory解决方法
- Know GCS AND GES structure size in shared pool
- OERR: ORA-4031 "unable to allocate %s bytes of shared memory ("%s","%s","%s")" (文档 ID 4031.1)
- ORA-04031 With Leak in "OBJ STAT MEMO" Allocations Seen in V$SGASTAT on 10.2.0.5 (文档 ID 1350050.1)
- ORA-27101 shared memory realm does not exist 错误处理
- System and method to prioritize large memory page allocation in virtualized systems
- ORA-27101: shared memory realm does not exist 错误的处理