Designing and Developing for Performance.docx

上传人:b****6 文档编号:8176097 上传时间:2023-01-29 格式:DOCX 页数:21 大小:36.40KB
下载 相关 举报
Designing and Developing for Performance.docx_第1页
第1页 / 共21页
Designing and Developing for Performance.docx_第2页
第2页 / 共21页
Designing and Developing for Performance.docx_第3页
第3页 / 共21页
Designing and Developing for Performance.docx_第4页
第4页 / 共21页
Designing and Developing for Performance.docx_第5页
第5页 / 共21页
点击查看更多>>
下载资源
资源描述

Designing and Developing for Performance.docx

《Designing and Developing for Performance.docx》由会员分享,可在线阅读,更多相关《Designing and Developing for Performance.docx(21页珍藏版)》请在冰豆网上搜索。

Designing and Developing for Performance.docx

DesigningandDevelopingforPerformance

DesigningandDevelopingforPerformance

Goodsystemperformancebeginswithdesignandcontinuesthroughoutthelifeofyoursystem.Carefullyconsiderperformanceissuesduringtheinitialdesignphase,anditwillbeeasiertotuneyoursystemduringproduction.

Thischaptercontainsthefollowingsections:

∙OracleMethodology

∙UnderstandingInvestmentOptions

∙UnderstandingScalability

∙SystemArchitecture

∙ApplicationDesignPrinciples

∙WorkloadTesting,Modeling,andImplementation

∙DeployingNewApplications

OracleMethodology

SystemperformancehasbecomeincreasinglyimportantascomputersystemsgetlargerandmorecomplexandastheInternetplaysabiggerroleinbusinessapplications.Inordertoaccommodatethis,Oraclehasproducedaperformancemethodologybasedonyearsofdesigningandperformanceexperience.Thismethodologyexplainsclearandsimpleactivitiesthatcandramaticallyimprovesystemperformance.

Performancestrategiesvaryintheireffectiveness,andsystemswithdifferentpurposes,suchasoperationalsystemsanddecisionsupportsystems,requiredifferentperformanceskills.Thisbookexaminestheconsiderationsthatanydatabasedesigner,administrator,orperformanceexpertshouldfocustheireffortson.

Systemperformanceisdesignedandbuiltintoasystem.Itdoesnotjusthappen.Performanceproblemsareusuallytheresultofcontentionfor,orexhaustionof,somesystemresource.Whenasystemresourceisexhausted,thesystemisunabletoscaletohigherlevelsofperformance.Thisnewperformancemethodologyisbasedoncarefulplanninganddesignofthedatabase,topreventsystemresourcesfrombecomingexhaustedandcausingdown-time.Byeliminatingresourceconflicts,systemscanbemadescalabletothelevelsrequiredbythebusiness.

UnderstandingInvestmentOptions

Withtheavailabilityofrelativelyinexpensive,high-poweredprocessors,memory,anddiskdrives,thereisatemptationtobuymoresystemresourcestoimproveperformance.Inmanysituations,newCPUs,memory,ormorediskdrivescanindeedprovideanimmediateperformanceimprovement.However,anyperformanceincreasesachievedbyaddinghardwareshouldbeconsideredashort-termrelieftoanimmediateproblem.Ifthedemandandloadratesontheapplicationcontinuetogrow,thenthechancethatyouwillfacethesameprobleminthenearfutureisverylikely.

Inothersituations,additionalhardwaredoesnotimprovethesystem'sperformanceatall.Poorlydesignedsystemsperformpoorlynomatterhowmuchextrahardwareisallocated.Beforepurchasingadditionalhardware,makesurethatthereisnoserializationorsinglethreadinggoingonwithintheapplication.Long-term,itisgenerallymorevaluabletoincreasetheefficiencyofyourapplicationintermsofthenumberofphysicalresourcesusedforeachbusinesstransaction.

UnderstandingScalability

Thewordscalabilityisusedinmanycontextsindevelopmentenvironments.Thefollowingsectionprovidesanexplanationofscalabilitythatisaimedatapplicationdesignersandperformancespecialists.

WhatisScalability?

Scalabilityisasystem'sabilitytoprocessmoreworkload,withaproportionalincreaseinsystemresourceusage.Inotherwords,inascalablesystem,ifyoudoubletheworkload,thenthesystemwouldusetwiceasmanysystemresources.Thissoundsobvious,butduetoconflictswithinthesystem,theresourceusagemightexceedtwicetheoriginalworkload.

Examplesofbadscalabilityduetoresourceconflictsincludethefollowing:

∙Applicationsrequiringsignificantconcurrencymanagementasuserpopulationsincrease

∙Increasedlockingactivities

∙Increaseddataconsistencyworkload

∙Increasedoperatingsystemworkload

∙Transactionsrequiringincreasesindataaccessasdatavolumesincrease

∙PoorSQLandindexdesignresultinginahighernumberoflogicalI/Osforthesamenumberofrowsreturned

∙Reducedavailability,becausedatabaseobjectstakelongertomaintain

Anapplicationissaidtobeunscalableifitexhaustsasystemresourcetothepointwherenomorethroughputispossiblewhenit'sworkloadisincreased.Suchapplicationsresultinfixedthroughputsandpoorresponsetimes.

Examplesofresourceexhaustionincludethefollowing:

∙Hardwareexhaustion

∙Tablescansinhigh-volumetransactionscausinginevitablediskI/Oshortages

∙Excessivenetworkrequests,resultinginnetworkandschedulingbottlenecks

∙Memoryallocationcausingpagingandswapping

∙Excessiveprocessandthreadallocationcausingoperatingsystemthrashing

Thismeansthatapplicationdesignersmustcreateadesignthatusesthesameresources,regardlessofuserpopulationsanddatavolumes,anddoesnotputloadsonthesystemresourcesbeyondtheirlimits.

SystemScalability

ApplicationsthatareaccessiblethroughtheInternethavemorecomplexperformanceandavailabilityrequirements.SomeapplicationsaredesignedandwrittenonlyforInternetuse,buteventypicalback-officeapplications,suchasageneralledgerapplication,mightrequiresomeoralldatatobeavailableonline.

CharacteristicsofInternetageapplicationsincludethefollowing:

∙Availability24hoursaday,365daysayear

∙Unpredictableandimprecisenumberofconcurrentusers

∙Difficultyincapacityplanning

∙Availabilityforanytypeofquery

∙Multitierarchitectures

∙Statelessmiddleware

∙Rapiddevelopmenttimescale

∙Minimaltimefortesting

Figure 2-1illustratestheclassicworkloadgrowthcurve,withdemandgrowingatanincreasingrate.Applicationsmustscalewiththeincreaseofworkloadandalsowhenadditionalhardwareisaddedtosupportincreasingdemand.Designerrorscancausetheimplementationtoreachitsmaximum,regardlessofadditionalhardwareresourcesorre-designefforts.

Figure2-1WorkloadGrowthCurve

Textdescriptionoftheillustrationpfgrf213.gif

Applicationsarechallengedbyveryshortdevelopmenttimeframeswithlimitedtimefortestingandevaluation.However,baddesigngenerallymeansthatatsomepointinthefuture,thesystemwillneedtobere-architectedorre-implemented.IfanapplicationwithknownarchitecturalandimplementationlimitationsisdeployedontheInternet,andiftheworkloadexceedstheanticipateddemand,thenthereisrealchanceoffailureinthefuture.Fromabusinessperspective,poorperformancecanmeanalossofcustomers.IfWebusersdonotgetaresponseinsevenseconds,thentheuser'sattentioncouldbelostforever.

Inmanycases,thecostofre-designingasystemwiththeassociateddowntimecostsinmigratingtonewimplementationsexceedsthecostsofproperlybuildingtheoriginalsystem.Themoralofthestoryissimple:

designandimplementwithscalabilityinmindfromthestart.

FactorsPreventingScalability

Whenbuildingapplications,designersandarchitectsshouldaimforasclosetoperfectscalabilityaspossible.Thisissometimescalledlinearscalability,wheresystemthroughputisdirectlyproportionaltothenumberofCPUs.

Inreallife,linearscalabilityisimpossibleforreasonsbeyondadesigner'scontrol.However,makingtheapplicationdesignandimplementationasscalableaspossibleshouldensurethatcurrentandfutureperformanceobjectivescanbeachievedthroughexpansionofhardwarecomponentsandtheevolutionofCPUtechnology.

FactorsPreventingLinearScalability

1.PoorApplicationDesign,Implementation,andConfiguration

Theapplicationhasthebiggestimpactonscalability.Forexample:

∙PoorschemadesigncancauseexpensiveSQLthatdoesnotscale.

∙Poortransactiondesigncancauselockingandserializationproblems.

∙Poorconnectionmanagementcancausepoorresponsetimesandunreliablesystems.

However,thedesignisnottheonlyproblem.Thephysicalimplementationoftheapplicationcanbetheweaklink.Forexample:

∙SystemscanmovetoproductionenvironmentswithbadI/Ostrategies.

∙Theproductionenvironmentcouldusedifferentexecutionplansthanthosegeneratedintesting.

∙Memory-intensiveapplicationsthatallocatealargeamountofmemorywithoutmuchthoughtforfreeingthememoryatruntimecancauseexcessivememoryusage.

∙Inefficientmemoryusageandmemoryleaksputahighstressontheoperatingvirtualmemorysubsystem.Thisimpactsperformanceandavailability.

IncorrectSizingofHardwareComponents

Badcapacityplanningofallhardwarecomponentsisbecominglessofaproblemasrelativehardwarepricesdecrease.However,toomuchcapacitycanmaskscalabilityproblemsastheworkloadisincreasedonasystem.

LimitationsofSoftwareComponents

Allsoftwarecomponentshavescalabilityandresourceusagelimitations.Thisappliestoapplicationservers,databaseservers,andoperatingsystems.Applicationdesignshouldnotplacedemandsonthesoftwarebeyondwhatitcanhandle.

LimitationsofHardwareComponents

Hardwareisnotperfectlyscalable.MostmultiprocessormachinescangetclosetolinearscalingwithafinitenumberofCPUs,butafteracertainpointeachadditionalCPUcanincreaseperformanceoverall,butnotproportionately.TheremightcomeatimewhenanadditionalCPUoffersnoincreaseinperformance,orevendegradesperformance.Thisbehaviorisverycloselylinkedtotheworkloadandtheoperatingsystemsetup.

Note:

ThesefactorsarebasedonOracleServerPerformancegroup'sexperienceoftuningunscalablesystems.

SystemArchitecture

Therearetwomainpartstoasystem'sarchitecture:

∙HardwareandSoftwareComponents

∙ConfiguringtheRightSystemArchitectureforYourRequirements

HardwareandSoftwareComponents

Thissectiondiscusseshardwareandsoftwarecomponents.

HardwareComponents

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 总结汇报 > 工作总结汇报

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1