<?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>OS与Oracle</title>
	<atom:link href="http://www.os2ora.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.os2ora.com</link>
	<description>专注于现实世界Oracle数据库的高性能，高可扩展性与新一代数据库Exadata架构</description>
	<lastBuildDate>Fri, 16 Jul 2010 02:55:51 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>cardinality feedback</title>
		<link>http://www.os2ora.com/cardinality-feedback/</link>
		<comments>http://www.os2ora.com/cardinality-feedback/#comments</comments>
		<pubDate>Fri, 16 Jul 2010 02:55:51 +0000</pubDate>
		<dc:creator>Kaya</dc:creator>
				<category><![CDATA[数据库性能调优]]></category>
		<category><![CDATA[11G]]></category>
		<category><![CDATA[cardinality feedback]]></category>
		<category><![CDATA[Tunning]]></category>

		<guid isPermaLink="false">http://www.os2ora.com/cardinality-feedback/</guid>
		<description><![CDATA[到了10g的时代，cardinality feedback这个词正在变得越来越流行。我想，开始导致这个词流行的或许不是来自Oracle官方的推广，而是来自Wolfgang Breitling在Hotsos Symposium 2006上的一个演讲。
到了11g，Oracle有个new feature就叫做cardinality feedback...]]></description>
			<content:encoded><![CDATA[<p><span class="Apple-style-span" style="word-spacing: 0px; font: medium simsun; text-transform: none; color: rgb(0,0,0); text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; orphans: 2; widows: 2; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"><span class="Apple-style-span" style="font-size: 12px; color: rgb(85,85,85); font-family: verdana, &#39;BitStream vera Sans&#39;, helvetica, sans-serif; text-align: left">Kaya 发表于<span class="Apple-converted-space">&#160;</span><a style="font-weight: bold; color: rgb(102,102,102); text-decoration: underline" href="http://www.os2ora.com/">os2ora.com</a></span></span></p>
<p><span class="Apple-style-span" style="word-spacing: 0px; font: medium simsun; text-transform: none; color: rgb(0,0,0); text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; orphans: 2; widows: 2; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"><span class="Apple-style-span" style="font-size: 12px; color: rgb(85,85,85); font-family: verdana, &#39;BitStream vera Sans&#39;, helvetica, sans-serif; text-align: left">到了10g的时代，cardinality feedback这个词正在变得越来越流行。我想，开始导致这个词流行的或许不是来自Oracle官方的推广，而是来自Wolfgang Breitling在<a href="https://portal.hotsos.com/events/SYM06">Hotsos Symposium 2006</a>上的一个演讲: </span></span>Tuning by Cardinality Feedback: Method and Examples. 从作者的网站有下面的信息:</p>
<blockquote><p><b>Tuning by Cardinality Feedback</b></p>
<p>Tuning by cardinality feedback looks at discrepancies between estimated and real row source cardinalities of an execution plan and attempts to find ways to correct the CBO’s error in estimation and trusting it to find a better plan based on the corrected, more accurate estimates.</p>
<p>Faced with an underperforming SQL, the question the TCF method is trying to answer is not      <br />&#160;&#160;&#160; What would be a better access plan?       <br />But instead       <br />&#160;&#160;&#160; Why is this plan, which the CBO chose as optimal, performing so poorly?</p>
<p>Once the answer to that question is found, the next goal is to find a way to remedy the cause for the miscalculation, but ultimately get out of the way and let the CBO do its job again.</p>
<p>The presentation was given at the 2006 Hotsos Symposium on Oracle® System Performance March 5–9, 2006 in Dallas, Texas and at CBO Days June 21-22 in Zurich, Switzerland.</p>
<p><a href="http://www.centrexcc.com/Tuning%20by%20Cardinality%20Feedback.pdf">Paper</a>&#160; <a href="http://www.centrexcc.com/Tuning%20by%20Cardinality%20Feedback.ppt.pdf">Presentation</a></p>
</blockquote>
<p>这种方法，也是我们平常调优SQL的最主要方法。虽然以前没有专门介绍过，不过有一些文章还是偶尔提及的，例如这篇: <a href="http://www.os2ora.com/fantastic-11gr2-sql-monitor-report/">11gR2出色的SQL Monitor Report</a>, 提到了用SQL Monitor Report查看actual rows与estimate rows的方法。</p>
<p>网上的另一个介绍cardinality feedback的演讲可以参考这一篇，<a href="http://jonathanlewis.wordpress.com/2009/05/11/cardinality-feedback/">http://jonathanlewis.wordpress.com/2009/05/11/cardinality-feedback/</a>,作者是<span class="Apple-style-span" style="word-spacing: 0px; font: medium simsun; text-transform: none; color: rgb(0,0,0); text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; orphans: 2; widows: 2; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"><span class="Apple-style-span" style="font-size: 13px; line-height: 21px; font-family: verdana, tahoma, arial, sans-serif"><strong><em>Michelle Deng，</em></strong><strong><em>Sanofi Aventis.</em></strong><font color="#555555" size="2">注意这里已经是2009年的事情了。</font></span></span></p>
<p>看看Oracle内部开发人员的演讲吧，这是VLDB 2008上的一个演讲.</p>
<p>Allison W. Lee, Mohamed Zaït: Closing the query processing loop in Oracle 11g: <a href="http://www.vldb.org/pvldb/1/1454178.pdf">Paper</a>, <a href="https://www.se.auckland.ac.nz/conferences/VLDB2008resources/presentations/papers/I14.ppt">Presentation</a></p>
<p>这俨然成为了11g的一个new feature，如何你手头有Oracle 11g，你甚至现在就可以演练一下。</p>
<p>下面是一个用到了cardinality feedback的执行计划，注意最后一行: cardinality feedback used for this statement</p>
<p>&#160;</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">---------------------------------------------------------------------------------------------------------------</span>
<span style="color: #66cc66;">|</span> Id  <span style="color: #66cc66;">|</span> Operation                      <span style="color: #66cc66;">|</span> Name                         <span style="color: #66cc66;">|</span> Rows  <span style="color: #66cc66;">|</span> Bytes <span style="color: #66cc66;">|</span> Cost <span style="color: #66cc66;">&#40;</span>%CPU<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">|</span> Time     <span style="color: #66cc66;">|</span>
<span style="color: #808080; font-style: italic;">---------------------------------------------------------------------------------------------------------------</span>
<span style="color: #66cc66;">|</span>   <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">|</span> <span style="color: #993333; font-weight: bold;">SELECT</span> STATEMENT               <span style="color: #66cc66;">|</span>                              <span style="color: #66cc66;">|</span>       <span style="color: #66cc66;">|</span>       <span style="color: #66cc66;">|</span> <span style="color: #cc66cc;">98089</span> <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">|</span>          <span style="color: #66cc66;">|</span>
<span style="color: #66cc66;">|</span>   <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">|</span>  SORT <span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span>                 <span style="color: #66cc66;">|</span>                              <span style="color: #66cc66;">|</span>     <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">|</span>    <span style="color: #cc66cc;">97</span> <span style="color: #66cc66;">|</span> <span style="color: #cc66cc;">98089</span>   <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">|</span> 00:<span style="color: #cc66cc;">19</span>:<span style="color: #cc66cc;">38</span> <span style="color: #66cc66;">|</span>
<span style="color: #66cc66;">|*</span>  <span style="color: #cc66cc;">2</span> <span style="color: #66cc66;">|</span>   HASH <span style="color: #993333; font-weight: bold;">JOIN</span>                    <span style="color: #66cc66;">|</span>                              <span style="color: #66cc66;">|</span>     <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">|</span>    <span style="color: #cc66cc;">97</span> <span style="color: #66cc66;">|</span> <span style="color: #cc66cc;">98088</span>   <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">|</span> 00:<span style="color: #cc66cc;">19</span>:<span style="color: #cc66cc;">38</span> <span style="color: #66cc66;">|</span>
<span style="color: #66cc66;">|</span>   <span style="color: #cc66cc;">3</span> <span style="color: #66cc66;">|</span>    <span style="color: #993333; font-weight: bold;">VIEW</span>                        <span style="color: #66cc66;">|</span> VW_NSO_1                     <span style="color: #66cc66;">|</span>     <span style="color: #cc66cc;">4</span> <span style="color: #66cc66;">|</span>    <span style="color: #cc66cc;">36</span> <span style="color: #66cc66;">|</span> <span style="color: #cc66cc;">47108</span>   <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">|</span> 00:09:<span style="color: #cc66cc;">26</span> <span style="color: #66cc66;">|</span>
<span style="color: #66cc66;">|</span>   <span style="color: #cc66cc;">4</span> <span style="color: #66cc66;">|</span>     SORT <span style="color: #993333; font-weight: bold;">UNIQUE</span>                <span style="color: #66cc66;">|</span>                              <span style="color: #66cc66;">|</span>     <span style="color: #cc66cc;">4</span> <span style="color: #66cc66;">|</span>   <span style="color: #cc66cc;">148</span> <span style="color: #66cc66;">|</span> <span style="color: #cc66cc;">47108</span>  <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">51</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">|</span> 00:09:<span style="color: #cc66cc;">26</span> <span style="color: #66cc66;">|</span>
<span style="color: #66cc66;">|</span>   <span style="color: #cc66cc;">5</span> <span style="color: #66cc66;">|</span>      UNION<span style="color: #66cc66;">-</span><span style="color: #993333; font-weight: bold;">ALL</span>                 <span style="color: #66cc66;">|</span>                              <span style="color: #66cc66;">|</span>       <span style="color: #66cc66;">|</span>       <span style="color: #66cc66;">|</span>            <span style="color: #66cc66;">|</span>          <span style="color: #66cc66;">|</span>
<span style="color: #66cc66;">|*</span>  <span style="color: #cc66cc;">6</span> <span style="color: #66cc66;">|</span>       <span style="color: #993333; font-weight: bold;">TABLE</span> ACCESS STORAGE <span style="color: #993333; font-weight: bold;">FULL</span><span style="color: #66cc66;">|</span> TA                           <span style="color: #66cc66;">|</span>     <span style="color: #cc66cc;">2</span> <span style="color: #66cc66;">|</span>    <span style="color: #cc66cc;">62</span> <span style="color: #66cc66;">|</span> <span style="color: #cc66cc;">23549</span>   <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">|</span> 00:04:<span style="color: #cc66cc;">43</span> <span style="color: #66cc66;">|</span>
<span style="color: #66cc66;">|*</span>  <span style="color: #cc66cc;">7</span> <span style="color: #66cc66;">|</span>       <span style="color: #993333; font-weight: bold;">TABLE</span> ACCESS STORAGE <span style="color: #993333; font-weight: bold;">FULL</span><span style="color: #66cc66;">|</span> TA                           <span style="color: #66cc66;">|</span>     <span style="color: #cc66cc;">2</span> <span style="color: #66cc66;">|</span>    <span style="color: #cc66cc;">86</span> <span style="color: #66cc66;">|</span> <span style="color: #cc66cc;">23558</span>   <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">|</span> 00:04:<span style="color: #cc66cc;">43</span> <span style="color: #66cc66;">|</span>
<span style="color: #66cc66;">|*</span>  <span style="color: #cc66cc;">8</span> <span style="color: #66cc66;">|</span>    <span style="color: #993333; font-weight: bold;">TABLE</span> ACCESS STORAGE <span style="color: #993333; font-weight: bold;">FULL</span>   <span style="color: #66cc66;">|</span> TB                           <span style="color: #66cc66;">|</span>   469K<span style="color: #66cc66;">|</span>    39M<span style="color: #66cc66;">|</span> <span style="color: #cc66cc;">50978</span>   <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">|</span> 00:<span style="color: #cc66cc;">10</span>:<span style="color: #cc66cc;">12</span> <span style="color: #66cc66;">|</span>
<span style="color: #808080; font-style: italic;">---------------------------------------------------------------------------------------------------------------</span>
&nbsp;
<span style="color: #66cc66;">....</span>
&nbsp;
Note
<span style="color: #808080; font-style: italic;">-----</span>
   <span style="color: #66cc66;">-</span> cardinality feedback used <span style="color: #993333; font-weight: bold;">FOR</span> this statement</pre></div></div>

<p>可以google下”<a href="http://www.google.com/search?q=%2B%22cardinality+feedback+used+for+this+statement%22+%2Boracle">cardinality feedback</a>”。会有人其它人的演练报告。</p>
<p>想想吧，以后的DBA，回顾这段历史，想想以前的人们如何用手工的方法用cardinality feedback 进行调优，是不是会和我们现在想着过去人们如何用手工方法进行space management, memory management的场景类似？ evolving, evolving, evolving…</p>
]]></content:encoded>
			<wfw:commentRss>http://www.os2ora.com/cardinality-feedback/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FW: Hiring Senior/Principle member-Real World Performance Group</title>
		<link>http://www.os2ora.com/fw-hiring-seniorprinciple-member-real-world-performance-group/</link>
		<comments>http://www.os2ora.com/fw-hiring-seniorprinciple-member-real-world-performance-group/#comments</comments>
		<pubDate>Wed, 07 Jul 2010 10:14:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.os2ora.com/fw-hiring-seniorprinciple-member-real-world-performance-group/</guid>
		<description><![CDATA[转一个比较正式的招聘，也顺便做下广告，欢迎您的加盟。
Job description:
Real World Performance Group is part of the Oracle Database product management team. We do customer benchmarks and post-product escalations to help to shorten sales cycle, to make quality insurance of the Oracle database product, and master the competitive intelligence of the Oracle database product. We are a global team including people in US, [...]]]></description>
			<content:encoded><![CDATA[<p><span class="Apple-style-span" style="word-spacing: 0px; font: medium simsun; text-transform: none; color: rgb(0,0,0); text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; orphans: 2; widows: 2; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"><span class="Apple-style-span" style="font-size: small; font-family: arial, helvetica, verdana, sans-serif">转一个比较正式的招聘，也顺便做下广告，欢迎您的加盟。</span></span></p>
<p><span class="Apple-style-span" style="word-spacing: 0px; font: medium simsun; text-transform: none; color: rgb(0,0,0); text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; orphans: 2; widows: 2; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"><span class="Apple-style-span" style="font-size: small; font-family: arial, helvetica, verdana, sans-serif"><strong>Job description:</strong></span>
<p><strong>Real World Performance Group is part of the Oracle Database product management team. We do customer benchmarks and post-product escalations to help to shorten sales cycle, to make quality insurance of the Oracle database product, and master the competitive intelligence of the Oracle database product. We are a global team including people in US, EMEA and APAC and we need people to cooperating with people in other time zones.</strong></p>
</p>
<p><strong>Responsibilities:</strong></p>
<p><strong>1. Perform database benchmarks<span class="Apple-converted-space">&#160;</span>          <br />2. File bugs and get rapid resolutions<span class="Apple-converted-space">&#160;</span>          <br />3. Cooperate with other people in a global team<span class="Apple-converted-space">&#160;</span>          <br /></strong></p>
</p>
<p><strong>Qualifications</strong></p>
<p><strong>1. Bachelor or master degree of computer science, or have firm computer science basic knowledge<span class="Apple-converted-space">&#160;</span>          <br />2. Deep understanding of Oracle database and operating system<span class="Apple-converted-space">&#160;</span>          <br />3. Skilled in SQL tuning<span class="Apple-converted-space">&#160;</span>          <br />4. Proficient in writing shell scripts<span class="Apple-converted-space">&#160;</span>          <br />5. Minimum 3 years of work experiences, better in DBA area, SQL development area or OS area<span class="Apple-converted-space">&#160;</span>          <br />6. Self-motivated and can work under tight timeline<span class="Apple-converted-space">&#160;</span>          <br />7. Good team work spirit and can work in a global team<span class="Apple-converted-space">&#160;</span>          <br />8. Fluent in English and Mandarin<span class="Apple-converted-space">&#160;</span>          <br /></strong></p>
</p>
<p><strong>How to Apply</strong></p>
<p><strong>Send your <em>English</em> C.V. to kaiyao.huang##oracle.com and/or christine.qu##oracle.com</strong></p>
<p>   </span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.os2ora.com/fw-hiring-seniorprinciple-member-real-world-performance-group/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exadata V2 架构分析 (6)</title>
		<link>http://www.os2ora.com/exadata-architecture-analysis-6/</link>
		<comments>http://www.os2ora.com/exadata-architecture-analysis-6/#comments</comments>
		<pubDate>Thu, 24 Jun 2010 03:25:27 +0000</pubDate>
		<dc:creator>Kaya</dc:creator>
				<category><![CDATA[Exadata]]></category>
		<category><![CDATA[数据库性能调优]]></category>
		<category><![CDATA[系统架构]]></category>
		<category><![CDATA[Cell Flash Cache]]></category>
		<category><![CDATA[EHCC]]></category>
		<category><![CDATA[Exadata Hybrid Columnar Compression]]></category>
		<category><![CDATA[Flash Cache]]></category>
		<category><![CDATA[Partition]]></category>
		<category><![CDATA[Storage Index]]></category>

		<guid isPermaLink="false">http://www.os2ora.com/exadata-architecture-analysis-6/</guid>
		<description><![CDATA[从第一篇开始到现在，Cell Flash Cache, Exadata Hybrid Columnar Compression, Storage Index轮番上场，加上V1版本里出现的Smart Scan，Infiniband等等，多少会给人以眼花缭乱的感觉。

最根本的一点，当然在于Exadata本身是一个balanced system。

不过，这些技术做为一个整体对实际应用会带来多大的好处呢？这不是一个很好回答的问题，当然也可以用一句话回答——具体问题具体分析......]]></description>
			<content:encoded><![CDATA[<p>Kaya 发表于 <a href="http://www.os2ora.com/">os2ora.com</a></p>
<p>做下回顾与思考。</p>
<p>从第一篇开始到现在，Cell Flash Cache, Exadata Hybrid Columnar Compression, Storage Index轮番上场，加上V1版本里出现的Smart Scan，Infiniband等等，多少会给人以眼花缭乱的感觉。</p>
<p>最根本的一点，当然在于Exadata本身是一个balanced system。</p>
<p>不过，这些技术做为一个整体对实际应用会带来多大的好处呢？这不是一个很好回答的问题，当然也可以用一句话回答——具体问题具体分析。</p>
<p>思路应该是这样的，首先明了当前系统的现状</p>
<ul>
<li>如果当前系统运作得很好，简直完美的设计，分区，并行，并发控制等都无可挑剔，业务量也没超过系统极限，那么也许只有一些技术会对性能提升比较明显，如Smart Scan。举个例子，如果原来系统没存在IO上的瓶颈，Cell Flash Cache就英雄无用武之地了。</li>
<li>如果当前系统运作得很好，简直完美的设计，分区，并行，并发控制等都无可挑剔，业务量大大超过系统极限，系统出现CPU或者IO或者Network上的瓶颈了，这时或许就是考虑升级的时候了。</li>
<li>如果当前系统为小数据量所设计，如刚开始没有分区，但随着业务量的增长，系统出现CPU或者IO或者Network上的瓶颈了，这时可以有两条途径，改进原来的设计，或者考虑硬件升级了。</li>
</ul>
<p>设计上的改进包括</p>
<ul>
<li>分区</li>
<li>压缩</li>
<li>etc.</li>
</ul>
<p>硬件上的升级包括</p>
<ul>
<li>Smart Scan</li>
<li>Flash Cache</li>
<li>Storage Index</li>
<li>etc.</li>
</ul>
<p>最后，做为一个例子，可以考核一个原来的系统（没分区，没压缩，没Flash Cache，没Storage Index），分区，压缩，Flash Cache，Storage Index，分别能带来的性能上的提升，及做为一个整体带来的性能提升。</p>
<p>感性认识还是更重要的，虽然我把它放在最后面了。</p>
<p>&#160;</p>
<p><a href="http://www.os2ora.com/wp-content/uploads/2010/06/image1.png"><img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="342" alt="image" src="http://www.os2ora.com/wp-content/uploads/2010/06/image_thumb1.png" width="662" border="0" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.os2ora.com/exadata-architecture-analysis-6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exadata V2 架构分析 (5)</title>
		<link>http://www.os2ora.com/exadata-architecture-analysis-5/</link>
		<comments>http://www.os2ora.com/exadata-architecture-analysis-5/#comments</comments>
		<pubDate>Tue, 22 Jun 2010 13:20:53 +0000</pubDate>
		<dc:creator>Kaya</dc:creator>
				<category><![CDATA[Exadata]]></category>
		<category><![CDATA[数据库性能调优]]></category>
		<category><![CDATA[系统架构]]></category>
		<category><![CDATA[DB2]]></category>
		<category><![CDATA[MDC]]></category>
		<category><![CDATA[Multi Dimensional Clustering]]></category>
		<category><![CDATA[SI]]></category>
		<category><![CDATA[Smart Scan]]></category>
		<category><![CDATA[Storage Index]]></category>
		<category><![CDATA[Storage Indexing]]></category>

		<guid isPermaLink="false">http://www.os2ora.com/exadata-architecture-analysis-5/</guid>
		<description><![CDATA[Exadata上另一个聪明的软件设计是实现了storage index.
如果Exadata给你的印象就是有很强大的硬件，却不会利用传统的性能优化方法，比如索引，去加快查询速度的话，那么Storage Index的出现或许会改变你的这种观念。而且，storage index是完全自动化的，它甚至不需要人工的干涉就能工作得很好......]]></description>
			<content:encoded><![CDATA[<p>Kaya 发表于 <a href="http://www.os2ora.com/">os2ora.com</a></p>
<p>Exadata上另一个聪明的软件设计是实现了storage index.</p>
<p>另一篇白皮书中有对Storage Index的一个描述 <a href="http://www.oracle.com/us/solutions/datawarehousing/039572.pdf" target="_blank">A Technical Overview of the Sun Oracle Exadata Storage Server and Database Machine</a></p>
<blockquote><p class="Default" style="margin: 0cm 0cm 0pt"><font color="#000000"><font face="Arial"><b><span lang="EN-US" style="font-size: 8pt">Storage Indexing </span></b><span lang="EN-US" style="font-size: 8pt"></span></font></font></p>
</p>
</p>
</p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt"><span lang="EN-US" style="font-family: &quot;Garamond&quot;,&quot;serif&quot;; mso-bidi-font-size: 10.5pt; mso-bidi-font-family: garamond"><font color="#000000" size="3">Storage Indexes are a very powerful capability provided in Exadata storage that helps avoid I/O operations. The Exadata Storage Server Software creates and maintains a Storage Index in Exadata memory. The Storage Index keeps track of minimum and maximum values of columns for tables stored on that cell. When a query specifies a WHERE clause, but before any I/O is done, the Exadata software examines the Storage Index to determine if rows with the specified column value exists in the cell by comparing the column value to the minimum and maximum values maintained in the Storage Index. If the column value is outside the minimum and maximum range, scan I/O for that query is avoided. Many SQL Operations will run dramatically faster because large numbers of I/O operations are automatically replaced by a few in-memory lookups. To minimize operational overhead, Storage Indexes are created and maintained transparently and automatically by the Exadata Storage Server Software.</font></span></p>
</blockquote>
<p>如果Exadata给你的印象就是有很强大的硬件，却不会利用传统的性能优化方法，比如索引，去加快查询速度的话，那么Storage Index的出现或许会改变你的这种观念。而且，storage index是完全自动化的，它甚至不需要人工的干涉就能工作得很好。</p>
<p>Smart Scan之所以冠名以Smart，是因为它在扫描数据的时候同时做过滤操作，只把必需的数据返回给数据服务器端；而Storage Index在这里却直接避免了对Disks的访问，其Smart的程度与Smart Scan相比，或许已经到了超凡脱俗的境界了。</p>
<p>如果真要找一个类比的话，DB2中有个特性或许可以与Storage Index做下对比，那就是<a href="http://www.research.ibm.com/mdc/index.html" target="_blank">Multi Dimensional Clustering</a>. 仔细阅读下MDC的介绍，两者真的有异曲同工之妙。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.os2ora.com/exadata-architecture-analysis-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exadata V2 架构分析 (4)</title>
		<link>http://www.os2ora.com/exadata-architecture-analysis-4/</link>
		<comments>http://www.os2ora.com/exadata-architecture-analysis-4/#comments</comments>
		<pubDate>Tue, 22 Jun 2010 13:12:01 +0000</pubDate>
		<dc:creator>Kaya</dc:creator>
				<category><![CDATA[Exadata]]></category>
		<category><![CDATA[数据库性能调优]]></category>
		<category><![CDATA[系统架构]]></category>
		<category><![CDATA[EHCC]]></category>
		<category><![CDATA[Exadata Hybrid Columnar Compression]]></category>
		<category><![CDATA[HCC]]></category>
		<category><![CDATA[Smart Scan]]></category>
		<category><![CDATA[白皮书]]></category>

		<guid isPermaLink="false">http://www.os2ora.com/exadata-architecture-analysis-4/</guid>
		<description><![CDATA[下一个要出场的是HCC, Hybrid Columnar Compression. 目前它是Exadata上面才有的一个特性。
在Exadata V2 架构分析 (1)中，曾提到“在软件设计上，还有另一个重头戏，它更是大大的利用起了存贮节点上的CPU处理能力，同时还能减少对带宽的争用”。Exadata的很多设计，或许从根本上讲，就在于充分利用起存贮节点上的处理能力，Smart Scan和这里所要提及的HCC，就是两个典型的代表了。HCC中文翻译过来或许就叫做混合列压缩，它是在单纯的行存贮和列存贮之间取得的一个折衷......]]></description>
			<content:encoded><![CDATA[<p>Kaya 发表于 <a href="http://www.os2ora.com/">os2ora.com</a></p>
<p>下一个要出场的是HCC, Hybrid Columnar Compression. 目前它是Exadata上面才有的一个特性，所以又叫做Exadata Hybrid Columnar Compression。</p>
<p>在<a href="http://www.os2ora.com/exadata-architecture-analysis-1/" target="_blank">Exadata V2 架构分析 (1)</a>中，曾提到“<span class="Apple-style-span" style="word-spacing: 0px; font: medium simsun; text-transform: none; color: rgb(0,0,0); text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; orphans: 2; widows: 2; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"><span class="Apple-style-span" style="font-size: 12px; color: rgb(85,85,85); font-family: verdana, &#39;BitStream vera Sans&#39;, helvetica, sans-serif; text-align: left">在软件设计上，还有另一个重头戏，它更是大大的利用起了存贮节点上的CPU处理能力，同时还能减少对带宽的争用”。Exadata的很多设计，或许从根本上讲，就在于充分利用起存贮节点上的处理能力，Smart Scan和这里所要提及的HCC，就是两个典型的代表了。HCC中文翻译过来或许就叫做混合列压缩，它是在单纯的行存贮和列存贮之间取得的一个折衷。</span></span></p>
<p><span class="Apple-style-span" style="word-spacing: 0px; font: medium simsun; text-transform: none; color: rgb(0,0,0); text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; orphans: 2; widows: 2; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"><span class="Apple-style-span" style="font-size: 12px; color: rgb(85,85,85); font-family: verdana, &#39;BitStream vera Sans&#39;, helvetica, sans-serif; text-align: left">一个比较好的参考文档是这篇白皮书<a href="http://www.oracle.com/technology/products/bi/db/exadata/pdf/ehcc_twp.pdf" target="_blank">Exadata Hybrid Columnar Compression</a>.</span></span></p>
<p><a href="http://www.os2ora.com/wp-content/uploads/2010/06/image.png"><img title="image" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="202" alt="image" src="http://www.os2ora.com/wp-content/uploads/2010/06/image_thumb.png" width="701" border="0" /></a> </p>
<p><span class="Apple-style-span" style="word-spacing: 0px; font: medium simsun; text-transform: none; color: rgb(0,0,0); text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; orphans: 2; widows: 2; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"><span class="Apple-style-span" style="font-size: 12px; color: rgb(85,85,85); font-family: verdana, &#39;BitStream vera Sans&#39;, helvetica, sans-serif; text-align: left">上图中，典型地，4个8KB的blocks被当成一个Compression Unit。在这个CU所能存贮的rows中，每个column被分开存贮。可以想像到，每个column里的内容是很相似的，如果与row之间的内容做比较的话。于是，对每个column的内容进行压缩，会得到很好的压缩率。根据压缩算法的不同，Oracle提供了四种不同的压缩等级，详见上面提到的白皮书，这里就不详细列出了。</span></span></p>
<p><span class="Apple-style-span" style="word-spacing: 0px; font: medium simsun; text-transform: none; color: rgb(0,0,0); text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; orphans: 2; widows: 2; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"><span class="Apple-style-span" style="font-size: 12px; color: rgb(85,85,85); font-family: verdana, &#39;BitStream vera Sans&#39;, helvetica, sans-serif; text-align: left">到底EHCC的压缩率可以达到多少呢？白皮书中提到两个数据，可以做为参考，对于Warehouse Compression，有10x的压缩率，对于Archive Compression，有15x的压缩率。</span></span></p>
<p><span class="Apple-style-span" style="word-spacing: 0px; font: medium simsun; text-transform: none; color: rgb(0,0,0); text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; orphans: 2; widows: 2; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"><span class="Apple-style-span" style="font-size: 12px; color: rgb(85,85,85); font-family: verdana, &#39;BitStream vera Sans&#39;, helvetica, sans-serif; text-align: left"></span></span></p>
<p><span class="Apple-style-span" style="word-spacing: 0px; font: medium simsun; text-transform: none; color: rgb(0,0,0); text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; orphans: 2; widows: 2; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"><span class="Apple-style-span" style="font-size: 12px; color: rgb(85,85,85); font-family: verdana, &#39;BitStream vera Sans&#39;, helvetica, sans-serif; text-align: left">EHCC相对于单纯的Column Compression而言，有一个极其突出的优点，这点是不得不提及的。当进行行级访问数据时，如根据rowid返回一行数据，EHCC只要一个IO就够了，不管所访问的表有多少列，而对于单纯的Column Compression而言，对于每个Column，都必须有一个IO操作。那么，随着表设计的复杂，如一个表拥有成百上千列，两种存贮方式的性能就能体现出成百上千倍的差距了。</span></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.os2ora.com/exadata-architecture-analysis-4/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>招聘</title>
		<link>http://www.os2ora.com/%e6%8b%9b%e8%81%98/</link>
		<comments>http://www.os2ora.com/%e6%8b%9b%e8%81%98/#comments</comments>
		<pubDate>Thu, 10 Jun 2010 19:34:10 +0000</pubDate>
		<dc:creator>Kaya</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.os2ora.com/%e6%8b%9b%e8%81%98/</guid>
		<description><![CDATA[Kaya 发表于 os2ora.com
RWP(Oracle RealWorld Database Performance Group)准备在中国多招一员干将，有没朋友有兴趣。工作地点最好在深圳，北京也可以接受。工作内容主要在于性能调优(OLTP/OLAP)还有可扩展性方面，希望有这方面比较丰富的经验。
仅仅是先做个不正式的预告，不过有兴趣&#38;&#38;有疑问的朋友也可以给我发邮件。
]]></description>
			<content:encoded><![CDATA[<p>Kaya 发表于 <a href="http://www.os2ora.com/">os2ora.com</a></p>
<p>RWP(Oracle RealWorld Database Performance Group)准备在中国多招一员干将，有没朋友有兴趣。工作地点最好在深圳，北京也可以接受。工作内容主要在于性能调优(OLTP/OLAP)还有可扩展性方面，希望有这方面比较丰富的经验。</p>
<p>仅仅是先做个不正式的预告，不过有兴趣&amp;&amp;有疑问的朋友也可以<a href="mailto:kaiyao.huang@gmail.com" target="_blank">给我发邮件</a>。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.os2ora.com/%e6%8b%9b%e8%81%98/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>无奈的DBA</title>
		<link>http://www.os2ora.com/helpless-dba/</link>
		<comments>http://www.os2ora.com/helpless-dba/#comments</comments>
		<pubDate>Sun, 30 May 2010 15:28:13 +0000</pubDate>
		<dc:creator>Kaya</dc:creator>
				<category><![CDATA[Exadata]]></category>
		<category><![CDATA[数据库性能调优]]></category>
		<category><![CDATA[系统架构]]></category>
		<category><![CDATA[DBA]]></category>
		<category><![CDATA[DSS]]></category>
		<category><![CDATA[Index]]></category>
		<category><![CDATA[容量规划]]></category>
		<category><![CDATA[架构]]></category>

		<guid isPermaLink="false">http://www.os2ora.com/helpless-dba/</guid>
		<description><![CDATA[在检查客户的代码中，有时会深刻地感觉到原代码编写者在调试代码时的无奈。
这使我想起以前调试代码时的经历。一个SQL迟迟不返回结果，一小时过去了，又一小时过去了...... 于是，想了好多调优的方法，调整系统参数，为这个SQL建立很多Index，加上各种各样的Hint ...... 
于是，现在在代码中看到似曾相识的/*+ index(t_xx, idx_xx) */时，有时会发自内心的笑了，同时，轻巧地把里面的+号删掉了，我就让这些个hint不起作用，不强迫CBO走index了，结果当然是CBO选择了Hash Join，而不是原代码编写者指定的Nested Loop，于是，执行速度嗖一下上去了。
有另一个有趣的事情......]]></description>
			<content:encoded><![CDATA[<p>Kaya 发表于 <a href="http://www.os2ora.com/">os2ora.com</a></p>
<p>在检查客户的代码中，有时会深刻地感觉到原代码编写者在调试代码时的无奈。</p>
<p>这使我想起以前调试代码时的经历。一个SQL迟迟不返回结果，一小时过去了，又一小时过去了&#8230;&#8230; 于是，想了好多调优的方法，调整系统参数，为这个SQL建立很多Index，加上各种各样的Hint &#8230;&#8230; </p>
<p>于是，现在在代码中看到似曾相识的/*+ index(t_xx, idx_xx) */时，有时会发自内心的笑了，同时，轻巧地把里面的+号删掉了，我就让这些个hint不起作用，不强迫CBO走index了，结果当然是CBO选择了Hash Join，而不是原代码编写者指定的Nested Loop，于是，执行速度嗖一下上去了。</p>
<p>还有另一个有趣的事情，对大表的操作DSS查询或DML操作，检查客户的执行计划，无一例外地没有用并行查询或者并行DML，当然，里面会用到很多类似上面的/*+ index(t_xx, idx_xx) */。于是，心里很纳闷，这样跑DSS查询或DML操作，要跑到啥时候才跑完啊？有趣的地方在于，发现了原代码编写者的一个可能的workaround，对大表进行分割分片处理，一次跑不完，我跑它个几百上千次还可以吧。很聪明的做法，不过也感觉到一阵阵深深的无奈。</p>
<p>不可否以地，很多客户有很复杂的业务逻辑要处理，DBA们和开发者们也很聪明地运用着Oracle的技术。编写的代码质量其实也是可圈可点的。不过，在代码实现与现实世界之间，我们却不得不面对一个折衷，优雅的代码，在糟糕的机器配置之前，只能无能为力，于是，过度的调优也就理所当然，顺理成章的成为了主流。</p>
<p>或许，我们的DBA们要主动地进行呐喊；或许，我们还需要有这样的职位，能够从大局上对系统进行规划，包括对系统硬件的容量规划，系统软件实现上的总体设计，最佳实践上的运用等等；或许，也应该是架构师工作的一部分？</p>
]]></content:encoded>
			<wfw:commentRss>http://www.os2ora.com/helpless-dba/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>测试: 一个SQL Monitor Report的具体例子</title>
		<link>http://www.os2ora.com/test-sql-monitor-report-example/</link>
		<comments>http://www.os2ora.com/test-sql-monitor-report-example/#comments</comments>
		<pubDate>Sun, 23 May 2010 14:06:17 +0000</pubDate>
		<dc:creator>Kaya</dc:creator>
				<category><![CDATA[Exadata]]></category>
		<category><![CDATA[数据库性能调优]]></category>
		<category><![CDATA[AWR]]></category>
		<category><![CDATA[PGA]]></category>
		<category><![CDATA[SQL Monitor Report]]></category>
		<category><![CDATA[Temp tablespace]]></category>
		<category><![CDATA[测试]]></category>

		<guid isPermaLink="false">http://www.os2ora.com/test-sql-monitor-report-example/</guid>
		<description><![CDATA[之前曾提到如何利用SQL Monitor Report对SQL进行诊断与调优，对于具体的SQL调优而言，SQL Monitor Report提供的信息无疑比AWR更有针对性，当然，AWR在信息的全面性方面会更胜一筹。本文提供一个具体的例子，同样的SQL，同样的执行计划，第一次执行的时间远远大于第二次执行的时间......]]></description>
			<content:encoded><![CDATA[<p>Kaya 发表于 <a href="http://www.os2ora.com/">os2ora.com</a></p>
<p>之前曾提到如何<a href="http://www.os2ora.com/use-sql-monitor-report-to-tune-and-diagnose-sql/">利用SQL Monitor Report对SQL进行诊断与调优</a>，对于具体的SQL调优而言，SQL Monitor Report提供的信息无疑比AWR更有针对性，当然，AWR在信息的全面性方面会更胜一筹。本文提供一个具体的例子，同样的SQL，同样的执行计划，第一次执行的时间远远大于第二次执行的时间。</p>
<p>SQL Monitor Report详细提供了SQL执行所消耗的系统资源曲线，每一步骤的显著等待事件。通过对比上面两种情形下的系统资源曲线，执行计划中提供的等待事件分布，基本上应该可以诊断出第二次执行为什么比第一次执行快的原因。</p>
<p>下面是两个Reports的链接，你不妨试着对比对比。也借此体验下11.2 中的SQL Monitor Report在展现信息方面的灵活性(让鼠标指向每一个可能隐藏信息的地方，如每个可能的bar)。</p>
<ul>
<li><a href="http://www.os2ora.com/wp-content/uploads/2010/05/before.html" target="_blank">第一次执行的SQL Monitor Report</a></li>
<li><a href="http://www.os2ora.com/wp-content/uploads/2010/05/after.html" target="_blank">第二次执行的SQL Monitor Report</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.os2ora.com/test-sql-monitor-report-example/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Exadata V2 架构分析 (3)</title>
		<link>http://www.os2ora.com/exadata-architecture-analysis-3/</link>
		<comments>http://www.os2ora.com/exadata-architecture-analysis-3/#comments</comments>
		<pubDate>Thu, 20 May 2010 12:14:37 +0000</pubDate>
		<dc:creator>Kaya</dc:creator>
				<category><![CDATA[Exadata]]></category>
		<category><![CDATA[数据库性能调优]]></category>
		<category><![CDATA[系统架构]]></category>
		<category><![CDATA[Cell Flash Cache]]></category>
		<category><![CDATA[Flash Cache]]></category>
		<category><![CDATA[IOPS]]></category>
		<category><![CDATA[MBPS]]></category>
		<category><![CDATA[混合负载]]></category>

		<guid isPermaLink="false">http://www.os2ora.com/exadata-architecture-analysis-3/</guid>
		<description><![CDATA[关于Cell Flash Cache，或许大家都余兴未尽，例如：
1. 一个真正的生产系统，真的需要1,000,000 IOPS吗？
2. Cell Flash Cache对用户带来的真正的好处在哪里？
假设用户的逻辑IOPS达到1,000,000 IO/s. buffer cache命中率为98%。则落在Cell Flash Cache中的IOPS为20,000次......]]></description>
			<content:encoded><![CDATA[<p>Kaya 发表于 <a href="http://www.os2ora.com/">os2ora.com</a></p>
<p>关于Cell Flash Cache，好象大家都余兴未尽，例如：    <br />1. 一个真正的生产系统，真的需要1,000,000 IOPS吗？     <br />2. Cell Flash Cache对用户带来的真正的好处在哪里？</p>
<p>假设用户的<strong><em>逻辑IOPS</em></strong>达到1,000,000 IO/s. buffer cache命中率为98%。则落在Cell Flash Cache中的IOPS为20,000次。这个数据对于1/4配，即一个quarter的Exadata来说，当然是小菜一碟，不过对于一般磁盘呢？一般的磁盘每秒大约为300 IOPS，这意味着需要有20,000/300=66个磁盘，这已经是一个不低的配置了。</p>
<p>再进一步考虑，如果系统想支持混合负载，即系统同时支持数据仓库查询和OLTP在线系统。那么这时OLTP的性能将会受到严重影响。要知道，数据仓库查询要求的MBPS，而OLTP要求的则是IOPS，这两个指标是会相互影响的，用户一般考虑的是OLTP优先。甚至于出现一种情形，我不清楚下面这种情况会多普遍：</p>
<blockquote><p>在IO受限的情形下，不敢对OLAP查询启用并行，由于不启用并行，OLAP查询很久不返回结果，进一步地，用户会在表上建更多的索引来“优化”这些OLAP查询。最终，整个混合型的系统就变成了一个类似OLTP的系统了。</p>
</blockquote>
<p>在这种情形下，Cell Flash Cache或许会带有性能上的实质提升，通过Flash Cache会大大提升OLTP的查询性能，同时，后端的磁盘和Flash Cache会<em><strong>一起</strong></em>提供足够的带宽给OLAP查询(很聪明吧)，这在硬件上保证了两者并存的可能性。另一方面，由于在IO上的财大气粗，对原有OLAP的过度优化终于可以停止了，系统设计因些会回归简单，与此对应地，系统维护成本也会大大降低。</p>
<p>或许这是Cell Flash Cache可能给大家带来的一个很诱人的地方。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.os2ora.com/exadata-architecture-analysis-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exadata V2 架构分析 (2)</title>
		<link>http://www.os2ora.com/exadata-architecture-analysis-2/</link>
		<comments>http://www.os2ora.com/exadata-architecture-analysis-2/#comments</comments>
		<pubDate>Sun, 16 May 2010 16:30:39 +0000</pubDate>
		<dc:creator>Kaya</dc:creator>
				<category><![CDATA[Exadata]]></category>
		<category><![CDATA[数据库性能调优]]></category>
		<category><![CDATA[系统架构]]></category>
		<category><![CDATA[buffer cache]]></category>
		<category><![CDATA[Buffer Hit Ratio]]></category>
		<category><![CDATA[Flash Cache]]></category>
		<category><![CDATA[IOPS]]></category>
		<category><![CDATA[MBPS]]></category>
		<category><![CDATA[OLTP]]></category>
		<category><![CDATA[Smart Scan]]></category>

		<guid isPermaLink="false">http://www.os2ora.com/exadata-architecture-analysis-2/</guid>
		<description><![CDATA[既然提到了Flash Cache,如果不提下对OLTP的提速好象会缺少点什么。对OLTP系统而言，缓存是一个极其重要的设计，不管是数据库节点上的内存上的Buffer Cache，还是存贮节点上的Flash Cache（Exadata)，还有数据库节点上的Flash Cache(某些平台，如Linux)......]]></description>
			<content:encoded><![CDATA[<p>Kaya 发表于 <a href="http://www.os2ora.com/">os2ora.com</a></p>
<p>既然提到了Flash Cache,如果不提下对OLTP的提速好象会缺少点什么。对OLTP系统而言，缓存是一个极其重要的设计，不管是数据库节点上的内存上的Buffer Cache，还是存贮节点上的Flash Cache（Exadata)，还有数据库节点上的Flash Cache(某些平台，如Linux)。</p>
<p>前几天在<a href="http://www.eygle.com" target="_blank">Eygle</a>的性能调优课程上听过他提过的一句话，缓存为王（致敬，呵呵），深以为然，这应该是他极其重要的实践总结，对于OLTP系统而言，这真是一点不为过。</p>
<p>下面的表格列出了一个实际场景，分别测试了不同的buffer 命中率和引入Flash Cache之后的性能变化。</p>
<table cellspacing="0" cellpadding="2" width="987" border="1">
<tbody>
<tr>
<td valign="top" width="59">Cache</td>
<td valign="top" width="89">Executions</td>
<td valign="top" width="86">Buffer Hit %</td>
<td valign="top" width="90">CPU Time (s)</td>
<td valign="top" width="100">user IO time (s)</td>
<td valign="top" width="108">Elapsed Time</td>
<td valign="top" width="134">total Elapsed Time (s)</td>
<td valign="top" width="62">CPU %</td>
<td valign="top" width="106">response time</td>
<td valign="top" width="151">SpeedUp Factor</td>
</tr>
<tr>
<td valign="top" width="67">Buffer Cache</td>
<td valign="top" width="96">30000</td>
<td valign="top" width="85">85</td>
<td valign="top" width="89">70</td>
<td valign="top" width="99">4082</td>
<td valign="top" width="106">00:02:20</td>
<td valign="top" width="133">4138</td>
<td valign="top" width="64">3</td>
<td valign="top" width="106">0.138</td>
<td valign="top" width="149">1</td>
</tr>
<tr>
<td valign="top" width="70">Flash Cache</td>
<td valign="top" width="100">30000</td>
<td valign="top" width="85">85</td>
<td valign="top" width="89">69</td>
<td valign="top" width="98">265</td>
<td valign="top" width="105">00:00:12</td>
<td valign="top" width="132">323</td>
<td valign="top" width="65">36</td>
<td valign="top" width="106">0.011</td>
<td valign="top" width="149">13</td>
</tr>
<tr>
<td valign="top" width="71">Buffer Cache</td>
<td valign="top" width="101">30000</td>
<td valign="top" width="85">100</td>
<td valign="top" width="89">19</td>
<td valign="top" width="100">0</td>
<td valign="top" width="111">00:00:02</td>
<td valign="top" width="142">26</td>
<td valign="top" width="69">61</td>
<td valign="top" width="111">0.001</td>
<td valign="top" width="165">158</td>
</tr>
</tbody>
</table>
<p>上面的三行对应的OLTP负载是相同的，但总的执行时间却是大大不同的，从2分多钟到10几秒到2秒。唯一的区别就在于Cell Flash Cache, Buffer Cache 的介入。</p>
<p>上面这些数据起码可以得出几个结论：</p>
<p>1. Buffer Cache会减少CPU Time,但Cell Flash Cache不会。这从另一个方面说明，IO调度是需要CPU的。</p>
<p>2. Cell Flash Cache和Buffer Cache都大大减少了User IO Time。最终的结果就是大大提升了响应时间，例如上面我们得到了从13倍到158倍的性能提升。</p>
<p>3. Cell Flash Cache和Buffer Cache都提高了DB节点的CPU利用率。例如上面我们的CPU利用率从3%提高到36%和61%。</p>
<p>Exadata V2宣传的一个令人惊诧的数字之一是每秒钟一百万个8K的随机IO。很恐怖吧，1,000,000 IO/s.</p>
<p>其实，如果只是进行读操作而没有写操作的话，这个数字会更令人恐怖。下面是一个截图。把里面的峰值(300k)除以3乘以14，就得到整个机器14个cell可以达到的一个IOPS: 1.4 million IO/s.</p>
<p><a href="http://www.os2ora.com/wp-content/uploads/2010/05/iops.jpg"><img title="iops" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="233" alt="iops" src="http://www.os2ora.com/wp-content/uploads/2010/05/iops_thumb.jpg" width="804" border="0" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.os2ora.com/exadata-architecture-analysis-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
