<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>LoadRunner TnT &#187; Oracle</title>
	<atom:link href="http://www.loadrunnertnt.com/tag/oracle/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.loadrunnertnt.com</link>
	<description>Performance Testing, LoadRunner Tips &#38; Tricks</description>
	<lastBuildDate>Mon, 08 Mar 2010 07:57:02 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Analyzing Oracle SGA Large Pool</title>
		<link>http://www.loadrunnertnt.com/analyze/analyzing-oracle-sga-large-pool/</link>
		<comments>http://www.loadrunnertnt.com/analyze/analyzing-oracle-sga-large-pool/#comments</comments>
		<pubDate>Tue, 04 Nov 2008 06:34:19 +0000</pubDate>
		<dc:creator>TnT Admin</dc:creator>
				<category><![CDATA[Analyze]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://www.loadrunnertnt.com/?p=315</guid>
		<description><![CDATA[
Oracle provides the ability to create a optional area in the SGA (System Global Area), called the Large Pool to provide large memory allocations for the following. By allocating session memory from the large pool for shared server, Oracle XA, or parallel query buffers, Oracle can use the shared pool primarily for caching shared SQL [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" title="Oracle" src="http://loadrunnertnt.com/images/oracle_logo.jpg" alt="" width="221" height="76" /></p>
<p>Oracle provides the ability to create a optional area in the SGA (System Global Area), called the <strong>Large Pool</strong> to provide large memory allocations for the following. By allocating session memory from the large pool for shared server, Oracle XA, or parallel query buffers, Oracle can use the shared pool primarily for caching shared SQL and avoid the performance overhead caused by shrinking the shared SQL cache.<span id="more-315"></span></p>
<p>Some of the uses of <strong>Large Pool</strong> are listed below:</p>
<ul>
<li>Session memory for the shared server and the Oracle XA interface</li>
<li>I/O server processes (DBW0)</li>
<li>Oracle backup and restore operations</li>
<li>Parallel execution message buffers, if the initialization parameter PARALLEL_AUTOMATIC_TUNING is set to true (otherwise, these buffers are allocated to the shared pool)</li>
</ul>
<p><a title="Oracle Memory Architecture" href="http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96524/c08memor.htm" target="_blank">(Source: Oracle Memory Architecture)</a></p>
<p>The counters that we should be watching are as followed:</p>
<ul>
<li>V$SGASTAT: Large Pool bytes</li>
</ul>
<p>What we want to see of the counters are:</p>
<ul>
<li>Watch the value for free memory when the results returned. If high or increasing values for free memory, you have over allocated space to the Large Pool. If low or decreasing values for free memory, you may need to consider increasing the Large Pool size.</li>
</ul>
<p>The following queries will be used to determine the hit-ratio:</p>
<ul>
<li>SELECT name, bytes FROM V$SGASTAT WHERE pool =&#8217;large pool&#8217;;</li>
</ul>
<p><strong>Real world scenario</strong></p>
<p>When using the Recovery Manager feature in Oracle, RMAN will buffer its I/O activity in Shared Pool. If database activity is high during the time that the RMAN backup is running, &#8220;ORA-04031 unable to allocate x bytes of shared memory&#8221; errors can result. This error indicates that a large piece of contiguous memory was requested in the Shared Pool, but could not be obtained. If this request is coming from RMAN, errors in the backup and poor application performance can result.  When the Large Pool is present, RMAN will use the Large Pool to buffer this I/O instead of the Shared Pool. This will result in not only better RMAN performance but also in improved Shared Pool hit-ratios.</p>
<p><a title="OCP Oracle 9i Performance Tuning Study Guide" href="http://www.amazon.com/gp/product/0782140653?ie=UTF8&amp;tag=pertesloatipt-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0782140653" target="_blank">(Source: OCP Oracle 9i Performance Tuning Study Guide)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.loadrunnertnt.com/analyze/analyzing-oracle-sga-large-pool/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Analyzing Oracle SGA Java Pool</title>
		<link>http://www.loadrunnertnt.com/analyze/analyzing-oracle-sga-java-pool/</link>
		<comments>http://www.loadrunnertnt.com/analyze/analyzing-oracle-sga-java-pool/#comments</comments>
		<pubDate>Tue, 04 Nov 2008 06:31:37 +0000</pubDate>
		<dc:creator>TnT Admin</dc:creator>
				<category><![CDATA[Analyze]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://www.loadrunnertnt.com/?p=313</guid>
		<description><![CDATA[
Oracle includes several application program interfaces and Java class libraries in order to facilitate the interaction of Java-based applications with Oracle databases.  Oracle also allows you to dedicate a portion of the SGA, called Java Pool, as the location where session-specified Java code and application variables reside during program execution.
Similarly, like the Large Pool, the [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" title="Oracle" src="http://loadrunnertnt.com/images/oracle_logo.jpg" alt="" width="221" height="76" /></p>
<p>Oracle includes several application program interfaces and Java class libraries in order to facilitate the interaction of Java-based applications with Oracle databases.  Oracle also allows you to dedicate a portion of the SGA, called <strong>Java Pool</strong>, as the location where session-specified Java code and application variables reside during program execution.<span id="more-313"></span></p>
<p>Similarly, like the <strong>Large Pool</strong>, the V$SGASTAT is used to determined the amount of memory allocated to <strong>Java Pool</strong>.  The counters that we should be watching are as followed:</p>
<ul>
<li>V$SGASTAT: Java Pool bytes</li>
</ul>
<p>What we want to see of the counters are:</p>
<ul>
<li>The value for <em>free memory</em> can be used to help tune the size of the Java Pool.  If V$SGASTAT shows high or increasing values for <em>free memory</em> when compared to <em>memory in use</em>, you have probably over allocated space to the Java Pool.  If you have low or decreasing values for<em> free memory</em>, you may need to consider increasing the Java Pool size.</li>
</ul>
<p>The following queries will be used to determine the hit-ratio:</p>
<ul>
<li>SELECT name, bytes FROM V$SGASTAT WHERE pool = &#8216;java pool&#8217;;</li>
</ul>
<p><span><span><a title="OCP Oracle 9i Performance Tuning Study Guide" href="http://www.amazon.com/gp/product/0782140653?ie=UTF8&amp;tag=pertesloatipt-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0782140653" target="_blank"><span style="color: #0066cc;">(Source: OCP Oracle 9i Performance Tuning Study Guide)</span></a></span></span></p>
<p>For Oracle 10g, Oracle recommends the total required Java pool memory to range between 10 and 50MB for Dedicated Servers.  While for Shared Servers, this could as large as more than 100MB.</p>
<p><a title="Oracle 10 Database Java Application Performance" href="http://www.stanford.edu/dept/itss/docs/oracle/10g/java.101/b12021/perf.htm#i1006240" target="_blank">(Source: Oracle® Database Java Developer&#8217;s Guide 10g Release 1 (10.1),10 Oracle Database Java Application Performance) </a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.loadrunnertnt.com/analyze/analyzing-oracle-sga-java-pool/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Analyzing Oracle SGA Database Buffer Cache</title>
		<link>http://www.loadrunnertnt.com/analyze/analyzing-oracle-sga-database-buffer-cache/</link>
		<comments>http://www.loadrunnertnt.com/analyze/analyzing-oracle-sga-database-buffer-cache/#comments</comments>
		<pubDate>Wed, 08 Oct 2008 06:36:37 +0000</pubDate>
		<dc:creator>TnT Admin</dc:creator>
				<category><![CDATA[Analyze]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://www.loadrunnertnt.com/?p=318</guid>
		<description><![CDATA[Like the Shared Pool (Library Cache and Data Dictionary Cache), the performance of the Database Buffer Cache is determine with the cache hit-ratio.  Cache hits occur whenever a user process finds that a data buffer needed by their SQL statement is already cached in memory;  Consequently, cache misses occur when the user process does not [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" title="Oracle" src="http://loadrunnertnt.com/images/oracle_logo.jpg" alt="" width="221" height="76" />Like the <strong>Shared Pool</strong> (Library Cache and Data Dictionary Cache), the performance of the <strong>Database Buffer Cache</strong> is determine with the cache hit-ratio.  Cache hits occur whenever a user process finds that a data buffer needed by their SQL statement is already cached in memory;  Consequently, cache misses occur when the user process does not find the requested data to already be cached in memory &#8211; causing the data to be read form disk instead.  High cache hit ratios indicate that your application users are frequently finding that the data buffers they need are already in memory thus reducing the need (and delay) to read from disk (remember that disk reads are much slower than memory).</p>
<p><span id="more-318"></span>On the other hand, there are also non-hit ratio measures of <strong>Database Buffer Cache</strong> effectiveness such as Free Buffer Inspected Waits, Buffer Busy Wait events and Free Buffer Wait events.  To find out about the hit-ratio for the Database Buffer Cache, we can use V$SYSSTAT, V$SYSTEM_EVENT and STATSPACK.</p>
<p>The counters that we should be watching are as followed:</p>
<ul>
<li>V$SYSSTAT: Buffer Cache Hit Ratio</li>
<li>V$SYSSTAT &amp; V$SYSTEM_EVENT: Free Buffer Inspected</li>
<li>STATSPACK &gt; Instance Efficiency Percentages (Target 100%): Buffer Hit %</li>
<li>STATSPACK &gt; Instance Activity Stats for DB: &lt;instance&gt;: Free Buffer Inspected</li>
<li>STATSPACK &gt; Buffer Pool Statistics for DB: &lt;instance&gt;: Buffer Busy Wait</li>
</ul>
<p>What we want to see of the counters are:</p>
<ul>
<li>Buffer Cache Hit Ratio should be higher than 90% for OLTP system according to Oracle.</li>
</ul>
<p>The following queries will be used to determine the hit-ratio:</p>
<ul>
<li>SELECT 1 &#8211; ((physical.value &#8211; direct.value -lobs.value) / logical.value) &#8220;Buffer Cache Hit Ratio&#8221; FROM V$SYSSTAT physical, V$SYSSTAT direct, V$SYSSTAT lobs, V$SYSSTAT logical WHERE physical.name = &#8216;physical reads&#8217; AND direct.name = &#8216;physical reads direct&#8217; AND lobs.name = &#8216;physical reads direct (lob)&#8217; AND logical.name = &#8217;session logical reads&#8217;;</li>
<li>SELECT name, value FROM V$SYSSTAT WHERE name IN (&#8216;free buffer inspected&#8217;) UNION SELECT event, total_waits FROM V$SYSTEM_EVENT<br />
WHERE event in (&#8216;free buffer waits&#8217;, &#8216;buffer busy waits&#8217;);</li>
</ul>
<p>To know more about the counters, read on.</p>
<p><span style="text-decoration: underline;"><strong>[1] V$SYSSTAT</strong></span></p>
<p>Out of the 200 different available statistics, the performance of <strong>Database Buffer Cache</strong> for hit-ratio is calculated and based on four statistics, namely, Physical Reads, Physical Reads Direct, Physical Reads Direct [LOB] and Session Logical Reads.   Based on the four statistics, we are trying to calculate the physical reads made unintentionally (or on normal circumstances) against the the total of hits made on the cache represented by Session Logical Reads.  The general formula for Database Buffer Cache is as followed:</p>
<p>1 &#8211; ((physical reads &#8211; physical reads direct &#8211; physical reads direct [LOB]) / session logical reads)</p>
<p>The syntax of the SQL is as followed:</p>
<p>SELECT 1 &#8211; ((physical.value &#8211; direct.value &#8211; lobs.value) / logical.value) &#8220;Buffer Cache Hit Ratio&#8221; FROM V$SYSSTAT physical, V$SYSSTAT direct, V$SYSSTAT lobs, V$SYSSTAT logical WHERE physical.name = &#8216;physical reads&#8217; AND direct.name = &#8216;physical reads direct&#8217; AND lobs.name = &#8216;physical reads direct (lob)&#8217; AND logical.name = &#8217;session logical reads&#8217;;</p>
<p><em>Physical Reads; </em>This indicates the number of data blocks (i.e. tables, indexes, and rollback segments) read from disk into the Buffer Cache since instance startup.</p>
<p><em>Physical Reads Direct; </em>This indicates the number of reads that bypassed the Buffer Cache because the data blocks were read directly from disk instead.  Because direct physical reads are done intentionally by Oracle when using certain features like Parallel Query, these reads are subtracted from the Physical Reads value when the Buffer Cache hit ratio is calculated.  Otherwise, including these direct reads in the Buffer Cache hit ratio calculation would result in an artificially low hit ratio.</p>
<p><em>Physical Reads Direct (LOB);</em> This indicates the number of reads that bypassed the Buffer Cache because the data blocks were associated with a Large Object (LOB) data type.</p>
<p>Because direct physical reads are done intentionally by Oracle when accessing segments that contain LOB datatypes, these reads are also subtracted from the Physical Reads value when the Buffer Cache hit-ratio is calculated.  Including these direct reads in the Buffer Cache hit ratio calculation would also result in an artificially low hit ratio.</p>
<p><em>Session Logical Reads; </em>This indicates the number of times a request for a data block was satisfied by using a buffer that was already cached in the Database Buffer cache.  For read consistency, some of these buffers may have contained data from rollback segments.</p>
<p>Hit-ratios are one effective measure of <strong>Database Buffer Cache</strong> performance.  However, there are also ways to measure performance of Database Buffer Cache through non-hit ratio. TIP: Because these statistics can help guide you towards the true tuning trouble-spot, using them as a starting point of Buffer Cache tuning is often more effective than calculating Buffer Cache hit ratios and blindly increasing the size of the Buffer Cache.  The V$SYSSTAT and V$SYSTEM_EVENT can be used to monitor these secondary indicators of Buffer Cache Performance.  The V$SYSSTAT contains statistics of the Free Buffer Inspected statistics and the V$SYSTEM_EVENT contains statistics on the Free Buffer Waits and Buffer Busy Waits.  All three of these can be combined into one query using the SQL below:</p>
<p>SELECT name, value FROM V$SYSSTAT WHERE name IN (&#8216;free buffer inspected&#8217;) UNION SELECT event, total_waits FROM V$SYSTEM_EVENT<br />
WHERE event in (&#8216;free buffer waits&#8217;, &#8216;buffer busy waits&#8217;);</p>
<p><em>Free Buffer Inspected; </em>Number of Buffer Cache buffers inspected by user Server Process before finding a buffer.  A closely related statistic is dirty buffer inspected, which represents the total number of dirty buffers a user process found while trying to find a free buffer.</p>
<p><em>Free Buffer Waits; </em>Number of waits experienced by user Server Processes during Free Buffer Inspected activity,  These waits occur whenever the Server Process had to wait for Database Writer to write a dirty buffer to disk.</p>
<p><em>Buffer Busy Waits; </em>Number of times user Server Processes waited for a free buffer to become available.  These waits occur whenever a buffer requested by user Server Processes is already in memory, but is in use by another process.  These waits can occur for rollback segment buffers as well as data and index buffers.</p>
<p>The SQL statement queries the state of the statistics and it is recommend to record a benchmark over a period of time before proceeding with a load test.  High or steadily increasing values for any of these statistics indicate that user Server Processes are spending too much time searching for, and wait for access to, free buffers in the Database Buffer Cache.</p>
<p><span style="text-decoration: underline;"><strong>[2] STATSPACK</strong></span></p>
<p>Unlike the V$SYSSTAT and V$SYSTEM_EVENT, STATSPACK does not require calculation of the statistics as it has been calculated before display.  In the Instance Efficiency Percentage section, look at &#8220;Buffer Hit %&#8221; for the Database Buffer Cache hit-ratio.  For non-hit ratio, look at Instance Activity Stats for DB: &lt;instance&gt;: Free Buffer Inspected for Free Buffer Statistics and Buffer Pool Statistics for DB: &lt;instance&gt;: Buffer Busy Wait provides statistics for Number of times user Server Processes waited for a free buffer to become available.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.loadrunnertnt.com/analyze/analyzing-oracle-sga-database-buffer-cache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Analyzing Oracle SGA Shared Pool (Library Cache)</title>
		<link>http://www.loadrunnertnt.com/analyze/analyzing-oracle-sga-shared-pool-library-cache/</link>
		<comments>http://www.loadrunnertnt.com/analyze/analyzing-oracle-sga-shared-pool-library-cache/#comments</comments>
		<pubDate>Sun, 28 Sep 2008 08:05:59 +0000</pubDate>
		<dc:creator>TnT Admin</dc:creator>
				<category><![CDATA[Analyze]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://www.loadrunnertnt.com/?p=345</guid>
		<description><![CDATA[Starting with the Oracle System Global Area, we are going to touch on the basics of Shared Pool &#8211; Library Cache followed by Data Dictionary Cache (which will be in another article). The Shared Pools&#8217; Library Cache is the area Oracle caches the SQL and PL/SQL statements that have been recently issued by application users. [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" title="Oracle" src="http://loadrunnertnt.com/images/oracle_logo.jpg" alt="" width="221" height="76" />Starting with the <strong>Oracle System Global Area</strong>, we are going to touch on the basics of Shared Pool &#8211; <strong>Library Cache</strong> followed by <strong>Data Dictionary Cache </strong>(which will be in another article). The Shared Pools&#8217; Library Cache is the area Oracle caches the SQL and PL/SQL statements that have been recently issued by application users. PL/SQL statements can be in the form of procedures, functions, packages, triggers, anonymous PL/SQL blocks, or Java classes.<span id="more-345"></span></p>
<p>The primary indicator of the performance of the Shared Pool (both Library Cache and Data Dictionary Cache) is the <strong>Cache Hit Ratio</strong>. High cache-hit ratios indicate that the application users are frequently finding the SQL and PL/SQL statements they are issuing already in memory. Oracle recommends maximizing the Library Cache before the <strong>Database Buffer Cache</strong> because the Library Cache has a greater impact on performance thanan under performing cache hit ratio for the Database Buffer Cache. The performance of the Library Cache is measure by calculating its hit ratio. Through this article, we wil be showing how to use three tools, namely, <strong>V$LIBRARYCACHE</strong>, <strong>STATSPACK</strong> and <strong>OEM Performance Manager</strong> to analyze the hit ratio.</p>
<p>The following will be the counters associating with Library Cache.</p>
<ul>
<li>V$LIBRARYCACHE: GETHITRATIO column</li>
<li>V$LIBRARYCACHE: GETPINRATIO column</li>
<li>V$LIBRARYCACHE: INVALIDATION column</li>
<li>V$LIBRARYCACHE: RELOAD ratio</li>
<li>STATSPACK &gt; Instance Efficiency Percentages (Target 100%): Library Hit %</li>
<li>STATSPACK &gt; Library Cache Activity: Invalidations: Pct Miss</li>
<li>STATSPACK &gt; Library Cache Activity: Reloads</li>
<li>OEM  &gt; Performance Manager &gt; Database Instance Category &gt; Library Cache Hit %</li>
</ul>
<p>The actual threshold for the Library Cache is as followed:</p>
<ul>
<li>The higher the GETHITRATIO, the better is the application is performing. According to Oracle, well-tuned OLTP systems can expect to have GETHITRATIO of 90% or higher for the SQL Area portion of the Library Cache. DSS and data warehouse applications often have lower hit ratios because of the ad hoc nature of the queries against them.</li>
<li>Oracle recommends that well-tuned OLTP systems strive for PINHITRATIO that exceeds 90% for the SQL Area portion. DSS and data warehouse applications are generally lower.</li>
<li>Low reload ratio for PINS is good. Oracle considers well-tuned systems to be those with Reload Ratios of less than 1 percent.</li>
<li>High values for INVALIDATIONS mean additional overhead for the application. Therefore, performing activities that might cause INVALIDATIONS should be weighed against the expected benefit of those activities.</li>
<li>For STATSPACK, look at Library Hit % for the percentage of Library Cache hit-ratio. The Namespace, <strong>SQL AREA</strong> should have a 90% hit-ratio for the Library Cache.</li>
</ul>
<p>Queries to be used for Library Cache:</p>
<ul>
<li>SELECT NAMESPACE,GETHITRATIO,PINHITRATIO FROM V$LIBRARYCACHE;</li>
<li>SELECT SUM(RELOADS)/SUM(PINS) &#8220;Reload Ratio&#8221; FROM V$LIBRARYCACHE;</li>
</ul>
<p>The explanation of the counters are discussed after the table and will be recommended to read through them if you are unsure what they mean.</p>
<p><strong><span style="text-decoration: underline;">[1] V$LIBRARYCACHE </span></strong></p>
<p>A library cache miss can occur at either the Parse or Execute phases of SQL statement processing. The <strong>cache hit ratio</strong> related to the Parse Phase is shown in the GETHITRATIO column of <strong>V$LIBRARYCACHE</strong> while the Execute Phase is shown in the PINHITRATIO column of V$LIBRARYCACHE.  Other than GETHITRATIO and PINHITRATIO, the RELOADS and INVALIDATIONS columns of V$LIBRARYCACHE are also examined to uncovered behaviour of the Library Cache.</p>
<p><strong>GETHITRATIO</strong><br />
Oracle uses the term &#8220;get&#8221; to refer to a type of lock, called a &#8220;Parse Lock&#8221;, that is taken out on an object during the Parse Phase for the statement that references that object. Each time a statement is parsed, the value for GETS in the V$LIBRARYCACHE view is incremented by 1. On the other hand, the column GETHIT stores the number of times that the SQL and PL/SQL statements issued by the application found a parsed copy of themselves already in memory. When this occurs, there is no parsing of the statement required and the user&#8217;s server process just executes the copy already in memory instead. The ratio of parsed statements (GETS) to those that did not required parsing (GETHITS) is calculated in the GETHITRATIO column of V$LIBRARYCACHE.</p>
<p><strong>PINHITRATIO</strong></p>
<p>PINs like GETS, are also related to locking. However, while GETS are associated with locks that occur at Parse time, PINS are related to locks that occur at Execution time. These locks are the short-term locks used when accessing an object. Therefore, each library cache GET also requires an associated PIN, in either Shared or Exclusive mode, before accessing the statement&#8217;s reference objects. Each time a statement is executed, the value for PINS is increments by 1. The PINHITRATIO column in V$LIBRARYCACHE indicates how frequently executed statements found the associated parsed SQL already in the Library Cache.</p>
<p><strong>RELOADS</strong></p>
<p>RELOADS column shows the number of times that an executed statement had to be re-parsed because the library cache had aged out or invalidated the parsed version of the statement.  Examining the RELOAD column individually will not tell much.  Reload activity can be monitored by comparing the number of statement that have been executed (PINS) to the number of those statements that required a reload (RELOADS), calculated based on the following SQL:</p>
<div>SELECT SUM(RELOADS)/SUM(PINS) &#8220;Reload Ratio&#8221; FROM V$LIBRARYCACHE;</div>
<p><strong>INVALIDATIONS</strong></p>
<p>INVALIDATIONS occur when a cached SQL statement is marked as invalid and forced to parse even though it was already in the Library Cache. Cached statements are marked as invalid whenever the objects they referenced are modified in some way. For example, recompiling a view that was used by previously cached SQL statements will cause the those cached statements to be marked as invalid. Therefore, any subsequent statements that use this view will need to be parsed even though an exact copy of that statement may already be cached. High values for INVALIDATIONS mean additional overhead for the application. Therefore, performing activities that might cause invalidations should be weighed against the expected benefit of those activities.</p>
<p><span style="text-decoration: underline;"><strong>[2] STATSPACK</strong></span></p>
<p>The same cache hit-ratio information can be found in the results of STATSPACK. Library Cached performance statistics are included in the STATSPACK section headed Instance Efficiency Percentages (Target 100%). Look at Library Hit % for the percentage of Library Cache hit-ratio. Also, it is possible to look at the STATSPACK for INVALIDATIONS and RELOADS, under Library Cache Activity. Observe Pct Miss which conversely means that percentage that hits when minus off 100%.</p>
<p><span style="text-decoration: underline;"><strong>[3] OEM Performance Manager</strong></span></p>
<p>From OEM, access Performance Manager &gt; Database Instance Category &gt; Library Cache Hit %. This gives a runtime view of the Library Cache hit-ratio which eliminates the need to query V$LIBRARYCACHE. However, as this is a runtime view, you won&#8217;t be able to conduct analysing work after a load test.  Therefore, for analysing work after a load test, it is advisable to use Custom Query of Oracle Monitoring in LoadRunner to query <strong>V$LIBRARYCACHE</strong> from a load testing perspective.</p>
<p><a title="OCP Oracle 9i Performance Tuning Study Guide" href="http://www.amazon.com/gp/product/0782140653?ie=UTF8&amp;tag=pertesloatipt-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0782140653" target="_blank">(Source: OCP Oracle 9i Performance Tuning Study Guide)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.loadrunnertnt.com/analyze/analyzing-oracle-sga-shared-pool-library-cache/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Understanding Oracle&#8217;s underlying architecture</title>
		<link>http://www.loadrunnertnt.com/concepts/understanding-oracles-underlying-architecture/</link>
		<comments>http://www.loadrunnertnt.com/concepts/understanding-oracles-underlying-architecture/#comments</comments>
		<pubDate>Tue, 23 Sep 2008 14:33:33 +0000</pubDate>
		<dc:creator>TnT Admin</dc:creator>
				<category><![CDATA[Concepts]]></category>
		<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://www.loadrunnertnt.com/?p=235</guid>
		<description><![CDATA[
Before we are able to analyze and determine tuning areas, we need to understand Oracle Server Architecture and it&#8217;s underlying mechanism. Oracle Server Architecture consist of two main categories: logical (memory) structures and physical (or file) structures. The Oracle memory structure is collectively known as Oracle Instance.  While the physical file structures are collectively [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" title="Oracle" src="http://loadrunnertnt.com/images/oracle_logo.jpg" alt="" width="228" height="78" /></p>
<p>Before we are able to analyze and determine tuning areas, we need to understand <strong>Oracle Server Architecture</strong> and it&#8217;s underlying mechanism. Oracle Server Architecture consist of two main categories: logical (memory) structures and physical (or file) structures. The Oracle memory structure is collectively known as <strong>Oracle Instance</strong>.  While the physical file structures are collectively known as <strong>Oracle databas</strong>e.  Together, they are call an Oracle Server.<span id="more-235"></span></p>
<p><span style="text-decoration: underline;"><strong>Oracle Instance</strong></span></p>
<p>The Oracle Instance consist of the Oracle&#8217;s main memory structure, <strong>System Global Area (SGA)</strong> and the Oracle background processes. The SGA is made up of the following components: (a) Shared Pool, (b) Database Buffer Cache, (c) Java Pool and (d) Redo Log Buffer. In Oracle 9.2 and later, (e) Streams Pool was introduced into the SGA. Other components such as (f) Large Pool may also exist as it is dependent on the optional features from Oracle. The background processes, included (a) System Monitor (SMON), (b) Process Monitor (PMON), (c) Database Writer (DBW0), (d) Log Writer (LGWR) and the (e) Checkpoint Process (CKPT). Other optional processes maybe running as well such as Recoverer (RECO).</p>
<p>The following illustrates the entire <strong>System Global Area</strong> Components:</p>
<p style="text-align: center;" align="center"><img class="aligncenter" title="Oracle Instance Architecture" src="http://loadrunnertnt.com/images/Oracle_Instance_Architecture.png" alt="" width="461" height="538" /></p>
<p>The components of the instance &#8211; the SGA and the required background processes &#8211; acquired space in the server&#8217;s memory immediately upon startup of the database. While the required background processes will always acquire the same amount of memory for their purposes, there are four <strong>init.ora</strong> parameters are the primary determinants of SGA&#8217;s memory requirements.  They are:</p>
<ul>
<li>DB_CACHE_SIZE</li>
<li>SHARED_POOL_SIZE</li>
<li>LOG_BUFFER</li>
<li>LARGE_POOL_SIZE</li>
</ul>
<p>However, there is still one parameter in init.ora that determines the overall size of the System Global Area, which is SGA_MAX_SIZE.  Within this parameter contains two component, Shared Pool and Database Buffer Cache that can be dynamically resized using ALTER SYSTEM command. If the value for SGA_MAX_SIZE is less that the sum of the component at instance startup, Oracle will ignore the setting for SGA_MAX_SIZE and use the sum of the components as the value instead.</p>
<p><span style="text-decoration: underline;"><strong>Oracle Database</strong></span></p>
<p>An Oracle database is made up of physical files called (a) control files, (b) datafiles and (c) redo logs. Additional files associated with the database are (d) <strong>init.ora</strong>, trace and alert log files, password file, and any archived redo log files.  The usage of the files are as followed:</p>
<table style="height: 166px;" border="0" width="479">
<tbody>
<tr>
<td><strong> File Name<br />
</strong></td>
<td><strong>Information Contained in File </strong></td>
</tr>
<tr>
<td>Control File</td>
<td>Locations of other physical files, database name, database block size, database character set, and recovery information.</td>
</tr>
<tr>
<td>Datafile</td>
<td>Data blocks from all database segments including tables and indexes</td>
</tr>
<tr>
<td>Redo Log</td>
<td>A record of all changes made to the database which is used for recovery</td>
</tr>
<tr>
<td>init.ora</td>
<td>A listing of configuration parameters for the instance and database.</td>
</tr>
<tr>
<td>Archived log file</td>
<td>Copy of the contents of previous online Redo log, used for recovery</td>
</tr>
<tr>
<td>Password file</td>
<td>Users who have been granted the SYSDBA and SYSOPER privilege</td>
</tr>
<tr>
<td>Alert log file</td>
<td>Informatioal messages and error messages generated by database activity.</td>
</tr>
<tr>
<td>Trace files</td>
<td>Informational messages and error messages generated by users or background processes</td>
</tr>
</tbody>
</table>
<p>Of all the files mentioned, the <em>init.ora</em> file have great importance in Oracle Server performance tuning with many parameters associated to improve the performance. The default location of <em>init.ora</em> on Windows is <em>%ORACLE_HOME%\database</em> while Unix is <em>$ORACLE_HOME/dbs</em>.</p>
<p><a title="OCP Oracle 9i Performance Tuning Study Guide" href="http://www.amazon.com/gp/product/0782140653?ie=UTF8&amp;tag=pertesloatipt-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0782140653" target="_blank">(Source: OCP Oracle 9i Performance Tuning Study Guide)</a></p>
<p>Following this article, we will be covering the following sections on the individual components that can be tuned in the Oracle Instance and the Database itself.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.loadrunnertnt.com/concepts/understanding-oracles-underlying-architecture/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How-to configure Oracle Database monitoring</title>
		<link>http://www.loadrunnertnt.com/how-tos/how-to-configure-oracle-database-monitoring/</link>
		<comments>http://www.loadrunnertnt.com/how-tos/how-to-configure-oracle-database-monitoring/#comments</comments>
		<pubDate>Thu, 21 Aug 2008 06:27:01 +0000</pubDate>
		<dc:creator>TnT Admin</dc:creator>
				<category><![CDATA[How-Tos]]></category>
		<category><![CDATA[LoadRunner]]></category>
		<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://www.loadrunnertnt.com/?p=72</guid>
		<description><![CDATA[Most of the time, with every application, there comes with the Database setup and most of the time, it’s Oracle (being the biggest player in the DB industry). Fundamentally, (1) it requires a Oracle client to be installed on the machine as a native client. (2) A valid account and privileges to the Oracle V$ [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" title="Oracle" src="http://loadrunnertnt.com/images/oracle_logo.jpg" alt="" width="253" height="87" />Most of the time, with every application, there comes with the Database setup and most of the time, it’s Oracle (being the biggest player in the DB industry). Fundamentally, (1) it requires a Oracle client to be installed on the machine as a native client. (2) A valid account and privileges to the Oracle V$ tables that holds statistics. (3) Ensure that you can properly query from the Controller using the SQL tools and extract data from the V$ table and you should be fine with the setup. In this article, we will be providing the a typical connection to the Oracle database for monitoring (i.e. we will not be focusing on counters directly related for analyzing database performance).</p>
<p>Let’s go through an overview for implementing the Oracle DB. Basically, we are doing in this sequence:<span id="more-72"></span></p>
<ol>
<li> Get an account in Oracle and access to the V$ tables that contains the monitoring data.</li>
<li>Install 32-bit Oracle client on the Controller machine.</li>
<li>Ensuring that proper configuration is done to connect to the DB using TNSNAMES.ora and defining the Oracle path.</li>
<li>Login to the DB using SQL*PLUS and run a query to see if you can collect the statistics from the V$ tables.</li>
<li>Launch LoadRunner Controller, configure the monitor and start your load test!</li>
</ol>
<p>Ok, let’s dive into the details!</p>
<p>1. Request for an account and password to be created in the database instance (unless you are the DBA). Example, loadtester, and grant them access to read the following table. These tables consist of the statistic of the database instance.</p>
<ul>
<li> V$SESSTAT</li>
<li>V$SYSSTAT</li>
<li>V$STATNAME</li>
<li>V$INSTANCE</li>
<li>V$SESSION</li>
</ul>
<p>2. Ensure that Oracle client libraries are installed on the Controller. Remembered that in order to monitor, you need local installation of the client in order for LoadRunner to query the monitoring data. If you do not have the client libraries, download it from Oracle Downloads. Download only the 32-bit Oracle client.</p>
<p>3. If you have the client installed, ensure the 32-bit Oracle client is installed on the Controller, not the 16-bit client.</p>
<p>4. Verify that %OracleHome%\bin is included in the path environment. This can be done by going to START &gt; My Computer &gt; Properties &gt; “Advanced Tab” &gt; Enviromental Settings.</p>
<p>5. Configure the TNSNAMES.ora file on the Controller. TNSNAMES.ora file is a SQL*Net configuration file that defines databases addresses for establishing connections to them. This file normally resides in the ORACLE_HOME\NETWORK\ADMIN directory. (Source: OraFaq)</p>
<p>Attached is an example of the TNSNAMES.ora file. Click here to download.</p>
<p>6. Ensure login successful with the created account (e.g. loadtester) with SQL*Plus from the Controller machine.</p>
<p>7. Ensure the privileges are given properly by typing the following command. If they don’t return results or return access rights issues, most probably the steps for prior to this one has not been configured properly. Therefore, approach the Database Administrator for assistance or go back to the previous steps to ensure they are properly configured.</p>
<ul>
<li> SELECT * FROM V$SESSTAT</li>
<li>SELECT * FROM V$SYSSTAT</li>
<li>SELECT * FROM V$STATNAME</li>
<li>SELECT * FROM V$INSTANCE</li>
<li>SELECT * FROM V$SESSION</li>
</ul>
<p>8. Launch LoadRunner Controller as per norm and add the Oracle Database Monitor. When prompt, enter the account name (e.g. loadtester), it’s corresponding password and the destination server name. Statistics should be drawn from the V$ table and displayed in Controller.</p>
<p>With the above, you should be able to successfully configure the monitoring environment and the Controller with minimal difficulty.</p>
<blockquote><p>Note:<br />
You can change the sampling interval for the monitor using the vmon.cfg file located in {loadrunner-installed-dir}\monitors\vmon.cfg</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.loadrunnertnt.com/how-tos/how-to-configure-oracle-database-monitoring/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Analyzing Oracle SGA Shared Pool (Data Dictionary Cache)</title>
		<link>http://www.loadrunnertnt.com/analyze/analyzing-oracle-sga-shared-pool-data-dictionary-cache/</link>
		<comments>http://www.loadrunnertnt.com/analyze/analyzing-oracle-sga-shared-pool-data-dictionary-cache/#comments</comments>
		<pubDate>Sun, 24 Feb 2008 08:01:45 +0000</pubDate>
		<dc:creator>TnT Admin</dc:creator>
				<category><![CDATA[Analyze]]></category>
		<category><![CDATA[Oracle]]></category>

		<guid isPermaLink="false">http://www.loadrunnertnt.com/?p=341</guid>
		<description><![CDATA[Like the Library Cache, the measure of the effectiveness of Data Dictionary Cache is expressed in terms of hit-ratio percentage. This Data Dictionary Cache hit ratio shows how frequently the application finds the data dictionary information it needs in memory, instead of having to read it from the disk.
The counters that we should be watching [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" title="Oracle" src="http://loadrunnertnt.com/images/oracle_logo.jpg" alt="" width="221" height="76" />Like the <strong>Library Cache</strong>, the measure of the effectiveness of <strong>Data Dictionary Cache </strong>is expressed in terms of hit-ratio percentage. This Data Dictionary Cache hit ratio shows how frequently the application finds the data dictionary information it needs in memory, instead of having to read it from the disk.</p>
<p>The counters that we should be watching are as followed:<span id="more-341"></span></p>
<ul>
<li>V$ROWCACHE: Data Dictionary Hit Ratio</li>
<li>STATSPACK &gt; Dictionary Cache Stats  DB/Inst: Pct Miss: 1- dc_xxxxxxxxxx</li>
</ul>
<p>What we want to see of the counters are:</p>
<ul>
<li>Break the Data Dictionary Cache to its individual component, dc_xxxxxxxx (e.g. dc_free_extents, dc_object_ids).  Examine cache activity by monitoring the GETS and GETMISSES columns.  For frequently accessed dictionary caches, the ratio of total GETMISSES to total GETS should be less than 10% or 15%, depending on the applicatio.  Else it warrants tuning on the Oracle recommends that consideration should be given to tuning the Shared Pool. <a title="Data Dictionary Cache Threshold" href="http://www.lorentzcenter.nl/awcourse/oracle/server.920/a96533/memory.htm" target="_blank">(Source: Oracle9i Database Performance Tuning Guide and Reference Release 2 (9.2))</a></li>
</ul>
<p>The following queries will be used to determine the hit-ratio:</p>
<ul>
<li>SELECT parameter, 1 &#8211; (SUM(getmisses)/SUM(gets)) &#8220;Data Dictionary Hit Ratio&#8221; FROM V$ROWCACHE;</li>
<li>SELECT parameter, (SUM(getmisses)/SUM(gets)) &#8220;Data Dictionary Hit Ratio&#8221; FROM V$ROWCACHE;</li>
</ul>
<p>To know more about the counters, read on.</p>
<p><span style="text-decoration: underline;"><strong>[1] V$ROWCACHE</strong></span></p>
<p>Two of the columns contained in the <strong>V$ROWCACHE</strong> view, GETS and GETMISSES, can be used to calculate the Data Dictionary Cache hit ratio. The statistics in this view are not generally examined individually, but as a combined equation query shown below.  In the below query, we are calculating the hit-ratio of successful GETS from the Data Dictionary Cache by subtracting the value of the total GETMISSES over total of GETS by 1.  Not subtracting by 1 will result in the GETMISSES ratio.  The first SQL gives the ratio for GETS and the latter gives the ratio for GETMISSES.</p>
<p>SELECT 1 &#8211; (SUM(getmisses)/SUM(gets)) &#8220;Data Dictionary Hit Ratio&#8221; FROM V$ROWCACHE;</p>
<p>SELECT parameter, 1 &#8211; (SUM(getmisses)/SUM(gets)) &#8220;Data Dictionary Hit Ratio&#8221; FROM V$ROWCACHE;</p>
<p><span style="text-decoration: underline;"><strong>[2] STATSPACK</strong></span></p>
<p>Under the Dictionary Cache Stats of the DB Instance section of the STATSPACK output, look at Pct Miss which represent the miss ratio.  For each components of the Data Dictionary Cache, minus the value shown in STATSPACK (Pct Miss) will result in the hit-ratio for the component of the Data Dictionary Cache. Threshold fo the Pct Miss will still be the same for <strong>V$ROWCACHE</strong>.</p>
<p><a title="OCP Oracle 9i Performance Tuning Study Guide" href="http://www.amazon.com/gp/product/0782140653?ie=UTF8&amp;tag=pertesloatipt-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0782140653" target="_blank">(Source: OCP Oracle 9i Performance Tuning Study Guide)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.loadrunnertnt.com/analyze/analyzing-oracle-sga-shared-pool-data-dictionary-cache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

