Performance Improvement Methods.docx
《Performance Improvement Methods.docx》由会员分享,可在线阅读,更多相关《Performance Improvement Methods.docx(8页珍藏版)》请在冰豆网上搜索。
PerformanceImprovementMethods
PerformanceImprovementMethods
ThischapterdiscussesOracleimprovementmethods.
Thischaptercontainsthefollowingsections:
∙TheOraclePerformanceImprovementMethod
∙EmergencyPerformanceMethods
TheOraclePerformanceImprovementMethod
OracleperformancemethodologyhelpsyoutopinpointperformanceproblemsinyourOraclesystem.Thisinvolvesidentifyingbottlenecksandfixingthem.Itisrecommendedthatchangesbemadetoasystemonlyafteryouhaveconfirmedthatthereisabottleneck.
Performanceimprovement,byitsnature,isiterative.Forthisreason,removingthefirstbottleneckmightnotleadtoperformanceimprovementimmediately,becauseanotherbottleneckmightberevealed.Also,insomecases,ifserializationpointsmovetoamoreinefficientsharingmechanism,thenperformancecoulddegrade.Withexperience,andbyfollowingarigorousmethodofbottleneckelimination,applicationscanbedebuggedandmadescalable.
Performanceproblemsgenerallyresultfromeitheralackofthroughput,unacceptableuser/jobresponsetime,orboth.Theproblemmightbelocalizedbetweenapplicationmodules,oritmightbefortheentiresystem.
Beforelookingatanydatabaseoroperatingsystemstatistics,itiscrucialtogetfeedbackfromthemostimportantcomponentsofthesystem:
theusersofthesystemandthepeopleultimatelypayingfortheapplication.Typicaluserfeedbackincludesstatementslikethefollowing:
∙"Theonlineperformanceissobadthatitpreventsmystafffromdoingtheirjobs."
∙"Thebillingruntakestoolong."
∙"WhenIexperiencehighamountsofWebtraffic,theresponsetimebecomesunacceptable,andIamlosingcustomers."
∙"Iamcurrentlyperforming5000tradesaday,andthesystemismaxedout.Nextmonth,werollouttoallourusers,andthenumberoftradesisexpectedtoquadruple."
Fromcandidfeedback,itiseasytosetcriticalsuccessfactorsforanyperformancework.Determiningtheperformancetargetsandtheperformanceengineer'sexitcriteriamakemanagingtheperformanceprocessmuchsimplerandmoresuccessfulatalllevels.Thesecriticalsuccessfactorsarebetterdefinedintermsofrealbusinessgoalsratherthansystemstatistics.
Somerealbusinessgoalsforthesetypicaluserstatementsmightbe:
∙"Thebillingrunmustprocess1,000,000accountsinathree-hourwindow."
∙"AtapeakperiodonaWebsite,theresponsetimewillnotexceedfivesecondsforapagerefresh."
∙"Thesystemmustbeabletoprocess25,000tradesinaneight-hourwindow."
Theultimatemeasureofsuccessistheuser'sperceptionofsystemperformance.Theperformanceengineer'sroleistoeliminateanybottlenecksthatdegradeperformance.Thesebottleneckscouldbecausedbyinefficientuseoflimitedsharedresourcesorbyabuseofsharedresources,causingserialization.Becauseallsharedresourcesarelimited,thegoalofaperformanceengineeristomaximizethenumberofbusinessoperationswithefficientuseofsharedresources.Ataveryhighlevel,theentiredatabaseservercanbeseenasasharedresource.Conversely,atalowlevel,asingleCPUordiskcanbeseenassharedresources.
TheOracleperformanceimprovementmethodcanbeapplieduntilperformancegoalsaremetordeemedimpossible.Thisprocessishighlyiterative,anditisinevitablethatsomeinvestigationswillbemadethathavelittleimpactontheperformanceofthesystem.Ittakestimeandexperiencetodevelopthenecessaryskillstoaccuratelypinpointcriticalbottlenecksinatimelymanner.However,priorexperiencecansometimesworkagainsttheexperiencedengineerwhoneglectstousethedataandstatisticsavailabletohim.Itisthistypeofbehaviorthatencouragesdatabasetuningbymythandfolklore.Thisisaveryrisky,expensive,andunlikelytosucceedmethodofdatabasetuning.
TheAutomaticDatabaseDiagnosticMonitor(ADDM)implementspartsoftheperformanceimprovementmethodandanalyzesstatisticstoprovideautomaticdiagnosisofmajorperformanceissues.UsingADDMcansignificantlyshortenthetimerequiredtoimprovetheperformanceofasystem.SeeChapter 6,"AutomaticPerformanceDiagnostics"foradescriptionofADDM.
Today'ssystemsaresodifferentandcomplexthathardandfastrulesforperformanceanalysiscannotbemade.Inessence,theOracleperformanceimprovementmethoddefinesawayofworking,butnotadefinitivesetofrules.Withbottleneckdetection,theonlyruleisthattherearenorules!
Thebestperformanceengineersusethedataprovidedandthinklaterallytodetermineperformanceproblems.
StepsinTheOraclePerformanceImprovementMethod
1.Performthefollowinginitialstandardchecks:
a.Getcandidfeedbackfromusers.Determinetheperformanceproject'sscopeandsubsequentperformancegoals,aswellasperformancegoalsforthefuture.Thisprocessis