26 05, 2008
SHARED POOLÖÐKGH: NOACCESSÕ¼ÓôóÁ¿ÄÚ´æµÄÎÊÌâ·ÖÎö
½ÓÉÏÆªµÄORA-04031´íÎó£¬ÖªµÀÕû¸öSHARED POOLµÄ×é¼þÖУ¬ASM extent pointer arrayÕ¼ÓúܴóµÄÄÚ´æÊÇÏÔʾµÄÒ»¸öBUGºó£¬¼ÌÐø·ÖÎö¸÷¸ö×é¼þÕ¼ÓõÄÄÚ´æ´óС£¬½á¹û·¢ÏÖKGH: NO ACCESS×é¼þÒ²Õ¼ÓÃÁË400¶àM£¬Õâ¸öÓÖÊǸöʲô¹í¶«Î÷ÄØ£¿»¹ÊÇ¿´¿´METALINKÉÏÔõô˵µÄ°É¡£
Ê×ÏÈÕÒµ½ÁËÏÂÃæÒ»ÆªÎÄÕ£º
https://metalink.oracle.com/metalink/plsql/f?p=130:14:4157546628394209832::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,461160.1,1,0,1,helvetica
Applies to:
Oracle Server - Enterprise Edition - Version: 10.2.0.1
This problem can occur on any platform.
Symptoms
Frequent ORA-4031 even after increasing SGA_TARGET, Shared_pool
Things observed:
1) ASMM
Sga_target is set
2) 'KGH: NO ACCESS' increasing in shared pool
SQL> select * from v$sgastat where pool = 'shared pool' and (name in ('free memory', 'sql area', 'library cache', 'miscellaneous', 'row cache', 'KGH: NO ACCESS') );
We can see High KGH: NOACCESS entries in the shared pool.
Cause
Bug 5045507 ASMM - FREQUENT RESIZING OF SHARED POOL & BUFFER CACHE
Symptoms:
1) The allocation between shared pool and default buffer cache is growing/shrinking regularly (every 1-5 minutes).
2) AWR report OR query on v$sgastat shows high value for " KGH: NOACCESS "
3) Disabling Automatic Shared Memory Management (ASMM) not causing the ORA-4031 errors
Solution
This is caused because of frequent allocation operation between shared pool and default buffer cache. Alllocation from buffer cache is being converted to "KGH: NOACCESS" in the shared pool.
This trashing from cache to shared pool was fixed in 10.2.0.2. Bug 4507532 (Unpublished) was used to fix it into 10.2.0.2
Patch for Bug 4507532 (Unpublished) cannot be provided on top of 10.2.0.1
So, the options to resolve this issue are
1) Upgrade to the latest patchset 10.2.0.3
OR
2) Disable ASMM as a workaround.
ÕâÆªÎÄÕÂÉÏ˵µÄÊÇ´ÓBUFFER CACHEÊÕ¹ÎÀ´µÄÄڴ棬±»·ÖÅ䏸SHARED POOLµÄʱºò£¬¾ÍÊÇÏȱ»±êʶΪKGH: NOACCESS£¬È»ºóSHARED POOLµÄÆäËû×é¼þ¿ÉÒÔ´ÓÕâ¸öKGH: NOACCESS×é¼þÖÐÔÙÀ´È¡×Ô¼ºÐèÒªµÄÄÚ´æ¡£ÄǼÈÈ»KGH: NOACCESS×é¼þÓÐ500M£¬ÎªÉ¶»¹»á±¨ORA-04031´íÄØ£¬ÓÖÍùÏ¿´£¬·¢ÏÖÎÒµÄÏÖÏó¸úÕâÀï˵µÄÒ»ÃþÒ»Ñù£¬¾ÍÊÇBUFFER CACHEºÍSHARED POOLÁ½¸ö×é¼þÖ®¼ä²»Í£µÄÔÚGROWºÍSHRINK£¬¾ÍÄǼ¸Ê®MµÄÄÚ´æÔÚÁ½¸ö³ØÖ®¼ä²»Í£µÄ°á¹ýÀ´°á¹ýÈ¥£¬Ò²²»ÏÐÀÛ£¬¶øÇÒ£¬ÔÚRAC»·¾³ÖУ¬Ö»ÓÐÆäÖÐÒ»¸ö½ÚµãÓÐÕâÑùµÄÎÊÌ⣬ÕâÓÖÊÇÎªÉ¶ÄØ£¿
Oracle Server - Enterprise Edition - Version: 10.1 to 10.2
Information in this document applies to any platform.
Goal
The value for the component 'KGH: NO ACCESS' in the Shared Pool is growing when ASMM is enabled by setting SGA_TARGET. What does this component signify? How to prevent the growth of this component?
Solution
'KGH: NO ACCESS' refers to granules that are in transit with ASMM i.e memory being reassigned from the Shared Pool to the Database Buffer Cache and vice-versa.
This memory component in the Shared Pool marked as 'KGH: NO ACCESS' is used by the Buffer Cache.
One could see the value for this component increasing when ASMM (Automatic Shared Memory Management) is enabled by setting the SGA_TARGET parameter.
When ASMM is enabled, Oracle will dynamically manage the memory allocations between the tunable pools based on the requirement.
Note that one can still specify a value for the each of the tunable parameters i.e Shared Pool, Database Buffer Cache, Large Pool, Java Pool and Streams Pool when ASMM is enabled. When minimum value for each of the tunable parameters is set, Oracle will make sure that the amount of memory being allocated for the corresponding pool will not shrink below the specified amount.
Thus by setting minimum value for the Shared Pool and Database Buffer Cache, we will be ensuring that the amount of memory available for reassignment between the two pools will be lesser thus preventing the growth of this 'KGH: NO ACCESS' component.
To prevent the growth of this component you can either
1> Disable ASMM
Or
2> Set the minimum values for the Shared Pool and the Database Buffer Cache
ÕâÉÏÃæÓÖ˵SHARED POOLÖеÄKGH: NO ACCESSÊDZ»BUFFER CACHEʹÓõģ¬Õâ¸öºÃÏñºÍÇ°ÃæµÄ˵·¨ÕýºÃ·´¹ýÀ´ÁË£¬ÊÇÎÒEÎÄÌ«ÀÃÁË»¹ÊÇORACLE×Ô¼ºÒ²¸ãºýÍ¿ÁËÄØ£¿
Õý¹ýÀ´·´¹ýÈ¥£¬·´ÕýÕâ¸ö¶«Î÷¾ÍÊÇÓÎÀëÔÚBUFFER CACHEºÍSHARED POOLÖ®¼äµÄÒ»¿éÄÚ´æ¡£ÁíÍâÒ»¸öÎÊÌâ¾ÍÊÇ£¬ÒòΪBUGµÄÔÒò£¬Ê¹ÓÃASMM»áµ¼ÖÂSHARED POOLºÍBUFFER CACHE»áƵ·±µÄ±»À©´óºÍËõС¡£½â¾öµÄ°ì·¨ÒªÃ´¾Í²»ÒªÊ¹ÓÃASSM£¬Òª²»¾ÍÉý¼¶¡£
ÕâÀïÔÝʱ°ÑSHARED POOLµÄ×îСֵÀ©´óÁËһЩ£¬ÈÃËûÔõôÀ©´óËõС¶¼²»Òªµ¼ÖÂORA-04031¾ÍºÃ