资源描述:
《数据库系统概念全套配套课件PPT ch24.ppt》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、Chapter24:AdvancedApplicationDevelopmentChapter24:AdvancedApplicationDevelopmentPerformanceTuningPerformanceBenchmarksStandardizationE-CommerceLegacySystemsPerformanceTuningAdjustingvariousparametersanddesignchoicestoimprovesystemperformanceforaspecificapplication.Tuningisbestdonebyide
2、ntifyingbottlenecks,andeliminatingthem.Cantuneadatabasesystemat3levels:Hardware--e.g.,adddiskstospeedupI/O,addmemorytoincreasebufferhits,movetoafasterprocessor.Databasesystemparameters--e.g.,setbuffersizetoavoidpagingofbuffer,setcheckpointingintervalstolimitlogsize.Systemmayhaveautomat
3、ictuning.Higherleveldatabasedesign,suchastheschema,indicesandtransactions(morelater)BottlenecksPerformanceofmostsystems(atleastbeforetheyaretuned)usuallylimitedbyperformanceofoneorafewcomponents:thesearecalledbottlenecksE.g.,80%ofthecodemaytakeup20%oftimeand20%ofcodetakesup80%oftimeWor
4、thspendingmosttimeon20%ofcodethattake80%oftimeBottlenecksmaybeinhardware(e.g.,disksareverybusy,CPUisidle),orinsoftwareRemovingonebottleneckoftenexposesanotherDe-bottleneckingconsistsofrepeatedlyfindingbottlenecks,andremovingthemThisisaheuristicIdentifyingBottlenecksTransactionsrequesta
5、sequenceofservicesE.g.,CPU,DiskI/O,locksWithconcurrenttransactions,transactionsmayhavetowaitforarequestedservicewhileothertransactionsarebeingservedCanmodeldatabaseasaqueueingsystemwithaqueueforeachserviceTransactionsrepeatedlydothefollowingrequestaservice,waitinqueuefortheservice,andg
6、etservicedBottlenecksinadatabasesystemtypicallyshowupasveryhighutilizations(andcorrespondingly,verylongqueues)ofaparticularserviceE.g.,diskvs.CPUutilization100%utilizationleadstoverylongwaitingtime:Ruleofthumb:designsystemforabout70%utilizationatpeakloadutilizationover90%shouldbeavoide
7、dQueuesInADatabaseSystemTunableParametersTuningofhardwareTuningofschemaTuningofindicesTuningofmaterializedviewsTuningoftransactionsTuningofHardwareEvenwell-tunedtransactionstypicallyrequireafewI/OoperationsTypicaldisksupportsabout100randomI/OoperationspersecondSupposeeachtransactionr