different physical access method because of disabling Automated Memory Management?

From: Martin Berger <martin.a.berger_at_gmail.com>
Date: Fri, 2 Jan 2009 12:15:51 +0100
Message-ID: <cd8f74560901020315l4c6ea1denb213c47bb24eb809_at_mail.gmail.com>


Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi List,
once again I'm coming up with a behaviour of Oracle rdbms which I can not explain to myselve. So I'm asking here for help. If you are not interrested in theoretical discussions about how oracle heuristics might work, please excuse this email and stop here. All others are warmly welcome to read and reply ;-) My monitoring:



the same statement (select rowid from test.t_keep) is executed different only because memory_target, sga_target and shared_pool_size are different. (In addition, db_cache_size and db_keep_cache_size might be of any interrest).
With automatic memory management the DB uses 'db file sequential read' and fills up the (keep) buffer cache, with manual memory parameters it uses 'direct path read' (only 4 'db file sequential read' at the beginning).

Some facts around:


  • I bonced the instance between all the test-cases. Version 11.1.0.7 on a virtual test-machine (RedHat - 32 bit) table definition and rows:
    CREATE TABLE test.t_keep ( id NUMBER, n1 NUMBER, n2 NUMBER, pad VARCHAR2(4000) ) STORAGE (BUFFER_POOL KEEP); execute dbms_random.seed(0) INSERT INTO test.t_keep SELECT rownum AS id, 1+mod(rownum,251) AS n1, 1+mod(rownum,251) AS n2, dbms_random.string('p',255) AS pad FROM dual CONNECT BY level <= 100000 ORDER BY dbms_random.value; commit;
  • all statements run as sys (I'm lazy, alone on the node, etc).

the statements I run:


  • to check the blocks of the table select blocks from dba_tables where table_name='T_KEEP'; BLOCKS
    496
  • get obj_id: select object_id, data_object_id from dba_objects where object_name ='T_KEEP'; OBJECT_ID DATA_OBJECT_ID ---------- -------------- 64143 64143

what I run at every testcase:


  • to make sure nothing is cached yet: select obj, count(*) from x$bh where obj in (64142, 64143) group by obj;
  • test itselve select rowid from test.t_keep;
  • check cache afterwards: select obj, count(*) from x$bh where obj in (64142, 64143) group by obj;

With the 'manual' setup I get:

       OBJ COUNT(*)
---------- ----------

     64143 4

With the 'auto' setup I get:

       OBJ COUNT(*)
---------- ----------

     64143 452

Additional Infos/thoughts:



I checked traces:
In 10046 I see the difference of WAITS, but no reason why. In 10053 I see some smaller changes in derived parameters (as they are not implicite set in spfile), But I checked them and nothing changed:
  • difference in _smm_min_size and _smm_max_size and set it (in manual mode):

select a.ksppinm name, b.ksppstvl value
from sys.x$ksppi a,sys.x$ksppcv b
where a.indx = b.indx
  and a.ksppinm in ('_smm_max_size','_smm_min_size'); NAME VALUE
-------------- -------
_smm_min_size 184
_smm_max_size 36864
=> but with the same result.

  • db_file_multiblock_read_count = 128 (17 in manual mode) => same result.

I have put some files on a web-server not to bloat this mail too much:



'manual': (memory_target, sga_target and shared_pool_size set)
strings spfile => http://berx.at/traces/manual
event 10046    => http://berx.at/traces/BERX2_ora_5081.trc
event 10053    => http://berx.at/traces/BERX2_ora_6938.trc
'auto':
strings spfile => http://berx.at/traces/auto
event 10046    => http://berx.at/traces/BERX2_ora_6262.trc
event 10053    => http://berx.at/traces/BERX2_ora_6632.trc
Can anybody hint me why the acces changes from 'db file sequential read' to 'direct path read' when I change memory/SGA (and buffer) settings?

thanks in advance
 Martin

--
http://www.freelists.org/archive/oracle-l/

------=_Part_46834_10411560.1230894951496
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi List,<div><br>once again I&#39;m coming up with a behaviour of Oracle rdbms which I can not explain to myselve. So I&#39;m asking here for help.<br>If you are not interrested in theoretical discussions about how oracle heuristics might work, please excuse this email and stop here.<br>
All others are warmly welcome to read and reply ;-)<div><br>My monitoring:&nbsp;<br>=============<br>the same statement (<span class="Apple-style-span" style="font-style: italic;">select rowid from test.t_keep</span>) is executed different only because <span class="Apple-style-span" style="font-style: italic;">memory_target</span>, <span class="Apple-style-span" style="font-style: italic;">sga_target </span>and <span class="Apple-style-span" style="font-style: italic;">shared_pool_size </span>are different. (In addition, <span class="Apple-style-span" style="font-style: italic;">db_cache_size </span>and <span class="Apple-style-span" style="font-style: italic;">db_keep_cache_size </span>might be of any interrest).<br>
With automatic memory management the DB uses &#39;<span class="Apple-style-span" style="font-style: italic;">db file sequential read</span>&#39; and fills up the (keep) buffer cache, with manual memory parameters it uses &#39;<span class="Apple-style-span" style="font-style: italic;">direct path read</span>&#39; (only 4 &#39;<span class="Apple-style-span" style="font-style: italic;">db file sequential read</span>&#39; at the beginning).</div>
<div><br>Some facts around:<br>=================<br><span class="Apple-style-span" style="font-weight: bold;">*</span> I bonced the instance between all the test-cases.<br>Version 11.1.0.7 on a virtual test-machine (RedHat - 32 bit)<br>
table definition and rows:<br>-------------------------<br>CREATE TABLE test.t_keep (<br>&nbsp;&nbsp;id NUMBER,&nbsp;<br>&nbsp;&nbsp;n1 NUMBER,&nbsp;<br>&nbsp;&nbsp;n2 NUMBER,&nbsp;<br>&nbsp;&nbsp;pad VARCHAR2(4000)<br>) STORAGE (BUFFER_POOL KEEP);<br>execute dbms_random.seed(0)<br>
INSERT INTO test.t_keep<br>SELECT rownum AS id,<br>&nbsp;&nbsp; &nbsp; &nbsp; 1+mod(rownum,251) AS n1,<br>&nbsp;&nbsp; &nbsp; &nbsp; 1+mod(rownum,251) AS n2,<br>&nbsp;&nbsp; &nbsp; &nbsp; dbms_random.string(&#39;p&#39;,255) AS pad<br>FROM dual<br>CONNECT BY level &lt;= 100000<br>ORDER BY dbms_random.value;<br>
commit;</div><div><br><span class="Apple-style-span" style="font-weight: bold;">*</span> all statements run as sys (I&#39;m lazy, alone on the node, etc).</div><div><br>the statements I run:<br>--------------------<br>-- to check the blocks of the table&nbsp;<br>
<span class="Apple-style-span" style="font-style: italic;">select blocks from dba_tables where table_name=&#39;T_KEEP&#39;;</span><br>&nbsp;&nbsp; &nbsp;BLOCKS<br>----------<br>&nbsp;&nbsp; &nbsp; &nbsp; 496<br>&nbsp;&nbsp;<br>-- get obj_id:<br><span class="Apple-style-span" style="font-style: italic;">select object_id, data_object_id from dba_objects where object_name =&#39;T_KEEP&#39;;</span><br>
&nbsp;OBJECT_ID DATA_OBJECT_ID<br>---------- --------------<br>&nbsp;&nbsp; &nbsp; 64143 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;64143</div><div><br>what I run at every testcase:<br>============================<br>-- to make sure nothing is cached yet:<br><span class="Apple-style-span" style="font-style: italic;">select obj, count(*) from x$bh where obj in (64142, 64143) group by obj; &nbsp;</span></div>
<div><span class="Apple-style-span" style="font-style: italic;"><br></span>-- test itselve<br><span class="Apple-style-span" style="font-style: italic;">select rowid from test.t_keep;</span></div><div><span class="Apple-style-span" style="font-style: italic;"><br>
</span>-- check cache afterwards:<br><span class="Apple-style-span" style="font-style: italic;">select obj, count(*) from x$bh where obj in (64142, 64143) group by obj; &nbsp;</span><br><br>With the &#39;<span class="Apple-style-span" style="text-decoration: underline;">manual</span>&#39; setup I get:<br>
&nbsp;&nbsp; &nbsp; &nbsp; OBJ &nbsp; COUNT(*)<br>---------- ----------<br>&nbsp;&nbsp; &nbsp; 64143 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="Apple-style-span" style="font-weight: bold;">4</span><br>&nbsp;</div><div><br>With the &#39;<span class="Apple-style-span" style="text-decoration: underline;">auto</span>&#39; setup I get:<br>
&nbsp;&nbsp; &nbsp; &nbsp; OBJ &nbsp; COUNT(*)<br>---------- ----------<br>&nbsp;&nbsp; &nbsp; 64143 &nbsp; &nbsp; &nbsp; &nbsp;<span class="Apple-style-span" style="font-weight: bold;">452</span><br><br></div><div>Additional Infos/thoughts: &nbsp;<br>=========================<br>I checked traces:<br>
In 10046 I see the difference of WAITS, but no reason why.<br>In 10053 I see some smaller changes in derived parameters (as they are not implicite set in spfile), But I checked them and nothing changed:</div><div><br><span class="Apple-style-span" style="font-weight: bold;">*</span> difference in <span class="Apple-style-span" style="font-style: italic;">_smm_min_size</span> and <span class="Apple-style-span" style="font-style: italic;">_smm_max_size</span> and set it (in manual mode):</div>
<div><br>select a.ksppinm name, b.ksppstvl value&nbsp;<br>from sys.x$ksppi a,sys.x$ksppcv b&nbsp;<br>where a.indx = b.indx&nbsp;<br>&nbsp;&nbsp;and a.ksppinm in (&#39;_smm_max_size&#39;,&#39;_smm_min_size&#39;);<br>NAME &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;VALUE<br>-------------- -------<br>
_smm_min_size &nbsp; &nbsp; 184<br>_smm_max_size &nbsp; 36864<br><span class="Apple-style-span" style="font-weight: bold;">=&gt;</span> but with the same result.</div><div><br><span class="Apple-style-span" style="font-weight: bold;">*</span> db_file_multiblock_read_count &nbsp; &nbsp; &nbsp; = 128 &nbsp;(17 in manual mode)<br>
<span class="Apple-style-span" style="font-weight: bold;">=&gt;</span> same result.<br><br>I have put some files on a web-server not to bloat this mail too much:<br>=====================================================================<br>
&#39;<span class="Apple-style-span" style="text-decoration: underline;">manual</span>&#39;: (memory_target, sga_target and shared_pool_size set)<br>strings spfile =&gt; <a href="http://berx.at/traces/manual">http://berx.at/traces/manual</a><br>
event 10046 &nbsp; &nbsp;=&gt; <a href="http://berx.at/traces/BERX2_ora_5081.trc">http://berx.at/traces/BERX2_ora_5081.trc</a>&nbsp;<br>event 10053 &nbsp; &nbsp;=&gt; <a href="http://berx.at/traces/BERX2_ora_6938.trc">http://berx.at/traces/BERX2_ora_6938.trc</a>&nbsp;<br>
&#39;<span class="Apple-style-span" style="text-decoration: underline;">auto</span>&#39;:<br>strings spfile =&gt; <a href="http://berx.at/traces/auto">http://berx.at/traces/auto</a>&nbsp;<br>event 10046 &nbsp; &nbsp;=&gt; <a href="http://berx.at/traces/BERX2_ora_6262.trc">http://berx.at/traces/BERX2_ora_6262.trc</a>&nbsp;<br>
event 10053 &nbsp; &nbsp;=&gt; <a href="http://berx.at/traces/BERX2_ora_6632.trc">http://berx.at/traces/BERX2_ora_6632.trc</a>&nbsp;<br>Can anybody hint me why the acces changes from &#39;db file sequential read&#39; to &#39;direct path read&#39; when I change memory/SGA (and buffer) settings?</div>
<div><br>thanks in advance<br>&nbsp;Martin</div><div><br>--<br><a href="http://www.freelists.org/archive/oracle-l/">http://www.freelists.org/archive/oracle-l/</a></div></div>

------=_Part_46834_10411560.1230894951496--
--
http://www.freelists.org/webpage/oracle-l
Received on Fri Jan 02 2009 - 05:15:51 CST

Original text of this message