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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

We used various scenarios to gauge the effectiveness ofADDM.Bl<strong>in</strong>d tests were performed <strong>in</strong> the <strong>in</strong>itial test<strong>in</strong>g phase;performance tun<strong>in</strong>g experts were asked to analyse <strong>and</strong>make recommendations on runn<strong>in</strong>g systems. In a majorityof cases ADDM produced comparable results <strong>and</strong> <strong>in</strong> somecases ADDM’s recommendations produced greaterbenefit than the experts’ recommendations.As part of the test<strong>in</strong>g performed <strong>in</strong>ternal to <strong>Oracle</strong>Server Technologies group we have a number of tests <strong>in</strong>which we <strong>in</strong>troduced known ‘common faults’ <strong>and</strong>application <strong>in</strong>efficiencies. When ADDM analysis wasperformed on the data captured dur<strong>in</strong>g these tests ADDMcorrectly identified the fault <strong>in</strong> all cases.High load stress test<strong>in</strong>g is an <strong>in</strong>tegral part of thetest<strong>in</strong>g of the database product at <strong>Oracle</strong> <strong>and</strong> the effect ofrunn<strong>in</strong>g all of the <strong>Oracle</strong> 10g manageability features wasmeasured. With both typical customer workloads <strong>and</strong>highly tuned <strong>in</strong>dustry st<strong>and</strong>ard benchmarks the reduction<strong>in</strong> throughput from enabl<strong>in</strong>g all of the manageabilityfeatures was approximately 3%. AWR <strong>and</strong> ADDM weretwo of the features enabled. ADDM runs performed aftereach AWR snapshot were available <strong>in</strong> a timely manner,typically under ten seconds.Although <strong>Oracle</strong> 10g was declared production <strong>in</strong>January 2004 a number of <strong>in</strong>ternal production systemswere runn<strong>in</strong>g the software for several months before thisdate. ADDM has identified <strong>and</strong> correctly diagnosed anumber of performance issues <strong>in</strong> this time on thesesystems.7.1 Experience of QualcommQualcomm Centauri Application was upgraded from<strong>Oracle</strong> version 8.1.7.4 to 10g RAC. While test<strong>in</strong>g theupgrade they found significant performance problems <strong>and</strong>testers reported poor response times. The DBA looked atthe ADDM recommendations which highlighted a SQL(update statement) that was caus<strong>in</strong>g over 90% of thesystem load. They then ran SQL <strong>Tun<strong>in</strong>g</strong> Advisor on thestatement <strong>and</strong> it recommended the creation of an <strong>in</strong>dex. Itwas later found that the recommended <strong>in</strong>dex should havebeen <strong>in</strong> place. The <strong>in</strong>dex was miss<strong>in</strong>g because a patch tothe application was applied to the production system butnot to the upgraded test system. Identify<strong>in</strong>g the <strong>in</strong>dexmade problem diagnosis easy.7.2 Experience <strong>in</strong> <strong>Oracle</strong>’s Bug DatabaseThe <strong>Oracle</strong> Bug database is used daily by many thous<strong>and</strong>sof users <strong>and</strong> was one of the first production systems tomove to <strong>Oracle</strong> 10g. The system runs on an 8 CPU PA-RISC HP mach<strong>in</strong>e. After upgrad<strong>in</strong>g to <strong>Oracle</strong> 10g usersexperienced poor performance. ADDM reported that userswere spend<strong>in</strong>g a large proportion of their time wait<strong>in</strong>g forfree buffer waits <strong>and</strong> recommended exam<strong>in</strong><strong>in</strong>g the I/Osubsystem for write performance (this type of problemhappens when the buffer cache is filled with dirty buffers<strong>and</strong> faster I/O should solve the problem). When theSystem Adm<strong>in</strong>istrator looked at the I/O subsystem hefound that the asynchronous I/O was <strong>in</strong>correctlyconfigured caus<strong>in</strong>g asynchronous I/O requests to fail <strong>and</strong>then be performed synchronously lead<strong>in</strong>g to extremelyslow IO times.7.3 Experience of <strong>Oracle</strong> Applications QA Test<strong>in</strong>gAn Applications Development DBA reported that a usersaid that the system was slow. Unfortunately there was notimescale or details given. Investigation was made harderby the fact that the users of the system <strong>and</strong> the DBAs<strong>in</strong>vestigat<strong>in</strong>g the slowdown where on opposite sides of theworld, 12 time zones apart.Look<strong>in</strong>g at ADDM reports there were a couple of onehour periods <strong>in</strong> which the time spent <strong>in</strong> the database wassignificantly higher. Both of these ADDM reports showedthat most of the time was spent <strong>in</strong> pars<strong>in</strong>g <strong>and</strong> that thepars<strong>in</strong>g was caused by the application generat<strong>in</strong>g largenumbers of SQL statements conta<strong>in</strong><strong>in</strong>g literal str<strong>in</strong>gvalues. (This problem is <strong>Oracle</strong>’s equivalent of us<strong>in</strong>gmany similar SQL statements <strong>in</strong>stead of a storedprocedure. The cost of such configurations is time spent<strong>in</strong> pars<strong>in</strong>g, optimiz<strong>in</strong>g <strong>and</strong> compil<strong>in</strong>g the SQL statements<strong>in</strong><strong>Oracle</strong>’s term<strong>in</strong>ology it is called “hard parse”). Therecommendation from ADDM was to modify theapplication to use b<strong>in</strong>d variables rather than literals or tochange a database configuration parameter toautomatically convert the literals <strong>in</strong>to b<strong>in</strong>ds. Whenapplication development was approached about the literalusage it was discovered that this QA system was runn<strong>in</strong>ga 'known bad' <strong>in</strong>ternal build of the application <strong>and</strong>upgrad<strong>in</strong>g to the correct build removed the issue.8. ConclusionIn this paper we described how <strong>Oracle</strong> 10g offers acomprehensive tun<strong>in</strong>g solution by provid<strong>in</strong>g automaticperformance diagnosis <strong>and</strong> tun<strong>in</strong>g via ADDM. Thisaddresses the ever-<strong>in</strong>creas<strong>in</strong>g performance tun<strong>in</strong>gchallenges currently faced by database adm<strong>in</strong>istrators.We def<strong>in</strong>ed a new measure called Database Time thatallows for comparison of the performance impact ofvarious database components with each other. We alsodescribed what types of performance measurements areneeded for accurate performance diagnosis, as well ashow we obta<strong>in</strong> them <strong>in</strong> a manner that has marg<strong>in</strong>al impacton the system. This solution also obviates the need toreproduce a problem <strong>in</strong> order to diagnose it.ADDM <strong>in</strong>corporates a holistic view of the system, <strong>and</strong>by us<strong>in</strong>g database time <strong>in</strong> conjunction with the twodimensionalDBTime-graph it is able to quickly isolatethe root causes of performance bottlenecks affect<strong>in</strong>g thethroughput of the system. ADDM provides specificactionable recommendations with an estimate of thebenefit for alleviat<strong>in</strong>g performance problems.

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

Saved successfully!

Ooh no, something went wrong!