13.07.2015 Views

Automatic Performance Diagnosis and Tuning in Oracle

Automatic Performance Diagnosis and Tuning in Oracle

Automatic Performance Diagnosis and Tuning in Oracle

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

One of the th<strong>in</strong>gs that makes performance tun<strong>in</strong>gdifficult is that the performance of different componentsof the database is often measured us<strong>in</strong>g unrelated metricslike buffer hit-ratio, transactions per second <strong>and</strong> averageI/O latency. Such unrelated metrics make it <strong>in</strong>feasible toweigh the performance impact of one component of thedatabase with the impact of others components. <strong>Tun<strong>in</strong>g</strong>actions that are solely based on such metrics have atendency either to make the DBAs believe that thedatabase needs excessive hardware or to make just onecomponent of the database perform better with negligibleeffect on the total database throughput.Keep<strong>in</strong>g these limitations <strong>in</strong> m<strong>in</strong>d, we built the<strong>Automatic</strong> Database Diagnostic Monitor (ADDM) <strong>in</strong><strong>Oracle</strong> 10g. ADDM automates the entire process ofdiagnos<strong>in</strong>g performance issues <strong>and</strong> suggests relevanttun<strong>in</strong>g recommendations with the primary objective ofmaximiz<strong>in</strong>g the total database throughput.Modern database systems have complicated<strong>in</strong>teractions between their sub-components <strong>and</strong> have theability to work with a variety of applications. This results<strong>in</strong> a very large list of potential performance issues suchautomatic diagnosis solutions could identify. Also, as newdatabase technologies <strong>and</strong> applications are <strong>in</strong>vented <strong>and</strong>older ones are obsoleted, it is pivotal that automaticdiagnostic <strong>and</strong> tun<strong>in</strong>g solutions can easily be adapted toaccommodate such changes.The objectives of an automatic performance diagnosis<strong>and</strong> tun<strong>in</strong>g solution can be summarized as follows:• Should posses a holistic view of the database <strong>and</strong>underst<strong>and</strong> the <strong>in</strong>teractions between variousdatabase components.• Should be capable of dist<strong>in</strong>guish<strong>in</strong>g symptomsfrom the actual root-cause of performancebottlenecks.• Should provide mechanisms to diagnoseperformance issues on their first occurrence.• Should easily keep up with chang<strong>in</strong>gtechnologies.The rema<strong>in</strong>der of the paper is organized as follows:We discuss related work <strong>in</strong> both academic research <strong>and</strong>commercially available databases <strong>in</strong> Section 2. We def<strong>in</strong>ea new measure, Database Time, <strong>and</strong> describe <strong>in</strong> detail ourmethodology to solve this problem <strong>in</strong> Section 3. Wediscuss the various measurements that were required toimplement our solution <strong>in</strong> Section 4. We extend ourdef<strong>in</strong>ition of Database Time to other models <strong>in</strong> Section 5<strong>and</strong> expla<strong>in</strong> how ADDM plays a central role <strong>in</strong> <strong>Oracle</strong>10g’s self-manag<strong>in</strong>g framework <strong>in</strong> Section 6. We presentthe experiments we used to validate our implementation<strong>and</strong> their results <strong>in</strong> Section 7. F<strong>in</strong>ally, we summarize ourconclusions <strong>in</strong> Section 8.2. Related WorkThe COMFORT project used an onl<strong>in</strong>e feedback controlloop to solve <strong>in</strong>dividual tun<strong>in</strong>g issues like load control forlock<strong>in</strong>g, dynamic data placement among others [WE02,WE94]. Automated tun<strong>in</strong>g systems have been proposed[HE97] that employ a feedback control mechanismlayered on top of a target system. A different school ofthought suggests that current database systems have toomany features, unpredictable performance <strong>and</strong> very low“ga<strong>in</strong>/pa<strong>in</strong> ratio”, <strong>and</strong> RISC-type simplification ofdatabase functionality is crucial to achieve automatictun<strong>in</strong>g [WE02, CH00].<strong>Oracle</strong>’s previous solution for performance tun<strong>in</strong>g wasStatspack [ORP8, ORP9, ORSP]. Statspack is a tool thattakes snapshots of database performance statistics <strong>and</strong>generates reports across a pair of snapshots. ThoughStatspack reports reduced the time it took for DBAs todiagnose performance issues [ORSP2], it still left the<strong>in</strong>terpretation of the report <strong>and</strong> the actual root-causeidentification to the DBAs. <strong>Oracle</strong> 9i has other selfoptimiz<strong>in</strong>gfeatures like dynamic runtime queryoptimization [ORQ9], self-configur<strong>in</strong>g features for space<strong>and</strong> memory management [DA02, ORM9, EL03]. Referto Section 6 for a description of various <strong>Oracle</strong> 10g’smanageability features like “SQL <strong>Tun<strong>in</strong>g</strong> Advisor” <strong>and</strong>“Segment Advisor”. IBM DB2 version 8.1 has featureslike “Health Center” for database monitor<strong>in</strong>g <strong>and</strong>“Configuration Assistant” to assist DBAs <strong>in</strong> databaseconfiguration [IBP8, IBG8]. Similarly, SQL Server 2000provides performance tools like “Index <strong>Tun<strong>in</strong>g</strong> Wizard”<strong>and</strong> “SQL Query Analyzer” to help the DBA achieve<strong>in</strong>dividual performance goals <strong>and</strong> has monitor<strong>in</strong>g toolslike “System Monitor objects” [CH97, MSPD].Commercially available databases have features tomanage some of their sub-components automatically,mechanisms to actively monitor database performance,<strong>and</strong> tools that make it easier for the DBA to achieve somespecific performance goals. However, none of them (until<strong>Oracle</strong> 10g) have a performance diagnosis <strong>and</strong> tun<strong>in</strong>gsolution that automatically identifies the root-causesaffect<strong>in</strong>g total database throughput.3. <strong>Automatic</strong> <strong>Performance</strong> <strong>Diagnosis</strong><strong>Performance</strong> of various components of the database aremeasured us<strong>in</strong>g different metrics. For example, theefficiency of the data-block buffer cache is expressed as apercentage <strong>in</strong> buffer hit-ratio; the I/O subsystem ismeasured us<strong>in</strong>g average read <strong>and</strong> write latencies; thedatabase throughput is measured us<strong>in</strong>g transactions-persecond.However, us<strong>in</strong>g these metrics, f<strong>in</strong>d<strong>in</strong>g theperformance impact of a particular component over thetotal database throughput is extremely hard, if not<strong>in</strong>feasible. For example, determ<strong>in</strong><strong>in</strong>g by how much wouldtransactions-per-second decrease if the average I/Olatency becomes twice as long is not trivial.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!