版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
InfoQInfoQTheHTAParchitecturedesignofTiDB,andtheimprovementinv6.2WeiWan@PingCAPArchSummit全球架構(gòu)師峰會
AboutMeWeiWan,workatPingCAP,astheleaderofOLAPStorageteam.Over11yearsofexperienceingame,e-commerce,mobileapps,anddatabasedevelopment.ArchSummit構(gòu)師峰會InfoQArchSummit構(gòu)師峰會InfoQTiDBIntroductionTiDBisanopen-sourceNewSQLdatabasethatsupportsHTAPworkloads.ItisMySQLcompatibleandfeatureshorizontalscalability,strongconsistency,andhighavailability.ThegoalofTiDBistoprovideuserswithaone-stopdatabasesolutionthatcoversOLTP(OnlineTransactionalProcessing),OLAP(OnlineAnalyticalProcessing),andHTAPservices.ArchSummit全球架構(gòu)師峰會ArchSummit ArchSummit InfoQArchSummit ArchSummit InfoQInfoQInfoQAgendaAtypicalusercaseThechallengestostoragemoduleonHTAPscenarioTheimprovementsinTiDBv6.2TiDB'sfuturearchitecturalevolutiondirectionArchSummit全球架構(gòu)師峰會
TiDBCoreArchitectureAtypicalusercaseofHTAPworkloadsZTO-運單系統(tǒng)(ExadatatoTiDB)ExadataTOTiDB消息中間件,PingCAP應(yīng)用ZTO-運單系統(tǒng)(ExadatatoTiDB) 丿Spo^fTiDB■ 丿Spo^fTiDB■ADistributedSQLDatabaseStreaming10Billions+Records丿multipledatasourcesArchSummit全力。而峰會InfoQZTO-運單系統(tǒng)(ExadatatoTiDB)UnlimitedScalabilityNotmoresharding“分庫分表達到16000張表,業(yè)務(wù)上已經(jīng)無法再繼續(xù)擴展下去”GreatlyreducedtheworkloadofbusinessdevelopmentThelatencyofreportreducedfrom30mto2mReducedthecostofdatabaseservers.BigdatainfrastructureadaptionInfoQArchSummitInfoQArchSummitThechallengestostoragemoduleonHTAPscenarioIsolationbetweenOLTPandOLAPworkloadsIsolationbetweenOLTPandOLAPworkloadsArchSummit ArchSummit InfoQIsolationbetweenOLTPandOLAPworkloadsIsolationbetweenOLTPandOLAPworkloadsArchSummit ArchSummit InfoQIsolationisdifficultifwemixtheminthesamenodeTPandAPscaleseparatelyDifferenthardwarerequirementsDifferentbestdatastructures.RowbasedvscolumnbasedIndexIsolationbetweenOLTPandOLAPworkloadsIsolationbetweenOLTPandOLAPworkloadsIsolationbetweenOLTPandOLAPworkloadsIsolationbetweenOLTPandOLAPworkloadsPlacementDriverSQLLayerTiDB/TiSparkPD1PD1PD1Key-valuestoragelayerTiKVnode1Store1Region1Region3Region4???RegionnTiKVnode21TiKVnode311Row-basedstorageforOLTPworkloadTiKVnode4TiFlashnode2Store4Region1Region2Region4RegionnTiFlashnode1Colunmn-basedstorageForOLAPworkloadInfoQInfoQInfoQInfoQIsolationbetweenOLTPandOLAPworkloads(HATtrickBench)(sdb)Andll6no」llJ_Fixed-Tlines.4.3.2,100 1 2 3 4 5Fixed-Alines0 1 2 3 4 5Frontier0 12 3 4(sdb)Andll6no」llJ_Fixed-Tlines.4.3.2,100 1 2 3 4 5Fixed-Alines0 1 2 3 4 5Frontier0 12 3 4AC=amaxXILSocnCILL50TC=0―8—TC=0.1*Tmax—TC=0.2^TmaxTC=0.5*Tmax—TC=0.8*Tmax°TC=Tmax—AC=011厶C=0.1*Qmax—AC=0.2^amax''厶。=°.5*(XmaxT—AC=0.8*amaxTransactinalThroughput(103tps)ArchSummit全球架構(gòu)師峰會
RealtimesynchronizationandstrongconsistencyRaftLearnerReadArchSummit全球架構(gòu)師峰會RealtimeupdateofcolumnarstoreRealtimeupdateofcolumnarstoreInfoQInfoQRealtimeupdateofcolumnarstoreRealtimeupdateofcolumnarstoreInfoQInfoQRealtimeupdateofcolumnarstoreRealtimeupdateofcolumnarstoreArchSummit ArchSummit ThebigissueisthebalancebetweenREADandWRITE.HighfrequencyupdatebringsfragmentationToomanyfilesslowsdownwritespeedColumnarstoreneedstosplitcolumnsintodifferentfilesToomanyIOPSTransactionsupportneedstostoremultipleversionsSortMergeisslowThesolutionofDeltaTree,thestorageengineofTiFlashIntroducesrowversionsTransformupdatesanddeletesintoappendoperationUseWALandMem-table,tobatchupdatesintosmallgroupsToavoidtoomanyIOPSandfilesAdoptsDelta+StableLayerarchitectureEachlayersusingdifferentstoragestrategiesAcceleratesSortMergebyDeltaindexArchSummitInfoQInfoQInfoQInfoQThewritepathofDeltaTreeBlockwrite()ColumnFilelnMemoryMemTableSetDeltaLayerMemTable(InMemory)FlushColumnFile
FlushTaskArchSummit]□PageStoragesegmentMergeDeltaDeltaLayer(InDisk)OrderedMergeDeltaBlockwrite()ColumnFilelnMemoryMemTableSetDeltaLayerMemTable(InMemory)FlushColumnFile
FlushTaskArchSummit]□PageStoragesegmentMergeDeltaDeltaLayer(InDisk)OrderedMergeDeltaStableLayer(InDisk)AdoptingDeltalndextoacceleratescanspeedThescanspeedofDeltaTreeis3xofClickHouseinSELECT…FINALArchSummit0址W ilcfi4ArchSummit ArchSummit InfoQArchSummit ArchSummit InfoQTheimprovementsinTiDBv6.2InfoQInfoQInfoQInfoQPageStoragebefore6.2V1ArchSummitV2構(gòu)師峰zxPageStoragein6.2Instance1:50320-FitExact?2022-04-1105:38:06to2022-04-1111:15:39vondiskinmemorywritereada)createJtsnap少/ Xreturn Awriteflow >readflowOB/sWriteflow95.4MIB/s71.5MiB/s47.7MiB/s23.8MiB/s06:00 06:3007:00 07:3008:00 08:3009:00 09:30 10:0010:30 11:00—FileDescriptor■Page■AIOWriteflowmaxavgcurrent▼63.7MiB/s23.0MiB/s42.9M舊/s99.1MiB/s8.5MiB/sInstance1:50320-FitExact?2022-04-1105:38:06to2022-04-1111:15:39vondiskinmemorywritereada)createJtsnap少/ Xreturn Awriteflow >readflowOB/sWriteflow95.4MIB/s71.5MiB/s47.7MiB/s23.8MiB/s06:00 06:3007:00 07:3008:00 08:3009:00 09:30 10:0010:30 11:00—FileDescriptor■Page■AIOWriteflowmaxavgcurrent▼63.7MiB/s23.0MiB/s42.9M舊/s99.1MiB/s8.5MiB/s3.9M舊/sOB/sOB/sOB/sPageBackGround94.7MiB/s4.8MiB/sOB/sAIOOB/sOB/sPageBackGround93.4MiB/sOB/s2:501225.8MiB/sOB/s1:5032097.8MiB/sOB/sFileDescriptor97.5MiB/sOB/smaxcurrent▼V3WriteThroughputByInstance▼maxcurrent▼throughput_ingest-2:50122OB/sOB/sthroughput_ingest-1:50320OB/sOB/sthroughput_write-2:501229.0MiB/sOB/sthroughput_write-1:503207.9MiB/sOB/sArchSummitCPUUsage4000.0%3000.0%2000.0%1000.0%1:2129316:50 17:00 17:10 17:20 17:30 17:40 17:50 18:00 18:10 18:20 18:30 18:40 18:50 19:00 19:10 19:20 19:30 19:402:21293CPUUsage4000.0%3000.0%2000.0%1000.0%1:2129316:50 17:00 17:10 17:20 17:30 17:40 17:50 18:00 18:10 18:20 18:30 18:40 18:50 19:00 19:10 19:20 19:30 19:402:21293PageStoragein6.2InatypicalHTAPworkload,?APQPSimproves30%?PeakCPUusagedecreasesfrom3000%to2500%?PeakMemoryusagedecreasesfrom28GBto18GB?Peakwritethroughputdeceasesover30%DataSharingReadThreadandCache▼30.0%cache_hit_ratio15.0%2022-08-0915:44:30he_no_slot—get_cache_hit■get_cache_total74.1Kops/s\89.0Kops/s\\447ops/s4.25Kops/s442ops/s9.76ops/s50.3Kops/s183Kops/s15:46:0015:42:3015:43:0015:43:3015:44:00—add_cache_stale:—add_cache_succ:—sche_from_cache:—sche_new_task:—sche_no_pool:—sche_no_slot:—get_cache_hit:—aet_cache_total:—cache_hit_ratio: 27.5%.InfoQInfoQInfoQInfoQTPCHperformanceimprovementTPCH性能提升24%25 20 ■ I10 IIXjuilkjdiL^jL^jilLJLQ01Q02Q03Q04Q05Q06Q07Q08Q09Q10Q11Q12Q13Q14Q15Q16Q17Q18Q19Q20Q21Q22v5.4v6.2v5.4ArchSummit全球架構(gòu)師峰會ArchSummit ArchSummit InfoQArchSummit ArchSummit InfoQTiDB'sfuturearchitecturalevolutiondirectionArchSummit ArchSummit InfoQArchSummit ArchSummit InfoQTiDBCoreArchitectureArchSummit ArchSummit InfoQArchSummit ArchSummit InfoQEvolutiontowardscloudnativeGoal:Bettercostefficienc
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- (立項說明)工業(yè)合成油項目投資計劃書
- 石河子大學《儀器分析實驗》2022-2023學年第一學期期末試卷
- 石河子大學《書寫技能訓(xùn)練一》2021-2022學年第一學期期末試卷
- 石河子大學《經(jīng)典音樂歌舞電影賞析》2022-2023學年期末試卷
- 沈陽理工大學《數(shù)》2022-2023學年第一學期期末試卷
- 沈陽理工大學《科技文獻檢索》2022-2023學年第一學期期末試卷
- 2018年四川內(nèi)江中考滿分作文《我心中的英雄》21
- 沈陽理工大學《Matab原理與應(yīng)用》2023-2024學年第一學期期末試卷
- 貴州新概念新型材料合同套路
- 合肥市場監(jiān)管局股權(quán)質(zhì)押合同模板
- 電子商務(wù)師職業(yè)技能等級證書培訓(xùn)方案
- JBT 14615-2024 內(nèi)燃機 活塞運動組件 清潔度限值及測定方法(正式版)
- DL5009.2-2013電力建設(shè)安全工作規(guī)程第2部分:電力線路
- 八年級下冊 第六單元 23《馬說》公開課一等獎創(chuàng)新教學設(shè)計
- 理智與情感:愛情的心理文化之旅智慧樹知到期末考試答案章節(jié)答案2024年昆明理工大學
- GA/T 2097-2023執(zhí)法辦案管理場所信息應(yīng)用技術(shù)要求
- GB 20052-2024電力變壓器能效限定值及能效等級
- 陶行知與鄉(xiāng)村教育智慧樹知到期末考試答案章節(jié)答案2024年麗水學院
- 手術(shù)切口感染PDCA案例
- 依托國家中小學智慧教育平臺開展有效教學的研究課題申報評審書
- 小學大思政課實施方案設(shè)計
評論
0/150
提交評論