Chapter 1 REAL-TIME COMMIT PROCESSING

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

Chapter1REAL-TIMECOMMITPROCESSINGJayantR.HaritsaDatabaseSystemsLab,SuperomputerEduationandResearhCentreIndianInstituteofSiene,Bangalore560012,INDIA.haritsadsl.ser.iis.ernet.inKrithiRamamrithamDept.ofComputerSieneandEngineering,IndianInstituteofTehnology,Mumbai400076,INDIA.krithise.iitb.ernet.inRameshGuptaGoldenomTehnologies,In.392AomaWay,Fremont,CA94539,USA.rameshgoldenom.om1.INTRODUCTIONManyreal-timedatabaseappliationsareinherentlydistributedinna-ture[24,28℄.Theseinludetheintelligentnetworkserviesdatabasedesribedin[5℄andthemobileteleommuniationsystemdisussedin[29℄.Morereentappliationsinludethemultitudeofdiretory,data-feedandeletroniommereserviesthathavebeomeavailableontheWorldWideWeb.Anessentialrequirementformostdistributedreal-timedatabasesys-tem(DRTDBS)appliationsistransationatomiity{thisissatisedbyimplementingatransationommitprotool.Commitprotoolstypi-allyrequireexhangeofmultiplemessages,inmultiplephases,betweenthepartiipatingsiteswherethedistributedtransationexeuted.Inaddition,severallogreordsaregenerated,someofwhihhavetobe\fored,thatis,ushedtodiskimmediatelyinasynhronousman-ner.Duetothisseriesofsynhronousmessageandloggingosts,om-12mitproessingansigniantlyinreasetheexeutiontimesoftransa-tions[17,7,25℄.Thisisespeiallyproblematiinthereal-timeontextsineithasadiretadverseeetonthesystem’sabilitytomeettrans-ationtimingonstraints.Therefore,thehoieofommitprotoolisanimportantdesigndeisionforDRTDBS.Unfortunately,thereislittlere-searhliteratureonthistopi,makingitdiÆultforDRTDBSdesignerstomakeinformedhoies.Weaddressthislaunaherewithadetailedquantitativeevaluationwhoseresultsrepresenttherstsuhworkinthearea.Ourstudyisarriedoutintheontextofreal-timeappliationswith\rm-deadlines[15℄{forsuhappliations,ompletingatransationafteritshasexpiredisofnoutilityandmayevenbeharmful.Therefore,transationsthatmisstheirdeadlinesareonsideredtobeworthlessandareimmediately\killed{thatis,abortedandpermanentlydisardedfromtheRTDBSwithoutbeingexeutedtoompletion.Aordingly,theperformanemetriisKillPerent,thesteady-stateperentageofkilledtransations.12.PERFORMANCEFRAMEWORKFromaperformaneperspetive,ommitprotoolsanbeomparedwithrespettothefollowingissues:1.EetonNormalProessing:Thisreferstotheextenttowhihtheommitprotoolaetsthenormal(no-failure)dis-tributedtransationproessingperformane.Thatis,howexpen-siveisittoprovideatomiityusingthisprotool?2.ResilienetoFailures:Whenafailureoursinadistributedsystem,ideally,transationproessingintherestofthesystemshouldnotbeaetedduringthereoveryofthefailedomponent.With\blokingommitprotools,failuresanleadtotransationproessinggrindingtoahalt(asexplainedinSetion3.),whereas\non-blokingprotoolspreventsuhdisruptionsbyinurringad-ditionalmessagesandfored-log-writes.3.SpeedofReovery:Thisreferstothetimerequiredforthedatabasetobereoveredtoaonsistentstatewhenthefailedsiteomesbakupafterarash.Thatis,howlongdoesittakebeforetransationproessinganommeneagaininareoveringsite?Ofthethreeissueshighlightedabove,thedesignemphasisofmostom-mitprotoolshasbeenonthersttwo(eetonnormalproessingandresilienetofailures)sinetheydiretlyaetongoingtransation3proessing.Inomparison,thelastissue(speedofreovery)appearslessritialfortworeasons:First,failuredurationsareusuallyordersofmagnitudelargerthanreoverytimes.Seond,failuresareusuallyrareenoughthatwedonotexpettoseeadiereneinaverageper-formaneamongtheprotoolsbeauseofoneommitprotoolhavingafasterreoverytimethantheother.Basedonthisviewpoint,ourfoushereisonthemehanismsrequiredduringnormal(no-failure)opera-tiontoprovideforreoverabilityandresilienetofailures,andnotonthepost-failurereoveryproess.3.TRADITIONALDISTRIBUTEDCOMMITPROTOCOLSWeadopttheommon\subtransationmodel[3℄ofdistributedtrans-ationexeutioninourstudy.Inthismodel,thereisoneproess,alledthemaster,whihisexeutedatthesitewherethetransationissub-mitted,andasetofotherproesses,alledohorts,whihexeuteonbehalfofthetransationatthevarioussitesthatareaessedbythetransation.Cohortsarereatedbythemastersendingastartworkmessagetotheloaltransationmanageratthatsite.Thismessageinludestheworktobedoneatthatsiteandispassedontotheohort.Eahohortsendsaworkdonemessagetothemasterafterithasom-pleteditsassigneddataproessingwork,andthemasterinitiatestheommitprotool(only)afterithasreeivedthismessagefromallitsohorts.Fortheabovetransationexeutionmodel,avarietyofommitpro-toolshavebeendevised,mostofwhiharebasedonthelassialtwo-phaseommit(2PC)protool[10℄.Inthissetion,webrieydesribethe2PCprotoolandafewofitspopularvariants{ompletedesrip-tionsareavailablein[20,7,23℄.Foreaseofexposition,thefollow-ingnotationisusedinthesequel{\smallapsfontformessages,\typewriterfontforlogreords,and\sansseriffontfortransationstates.3.1TWOPHASECOMMITInthe2PCprotool,themasterinitiatestherstphaseoftheommitprotoolbysendingprepare(toommit)messagesinparalleltoallitsohorts.Eahohortthatisreadytoommitrstfore-writesapreparelogreordtoitsloalstablestorageandthensendsayesvotetothemaster.Atthisstage,theohorthasenteredapreparedstatewhereinitannotunilaterallyommitorabortthetransationbuthastowaitforthenaldeisionf

1 / 18
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功