让HTAP更简单:谬误与陷阱_第1页
让HTAP更简单:谬误与陷阱_第2页
让HTAP更简单:谬误与陷阱_第3页
让HTAP更简单:谬误与陷阱_第4页
让HTAP更简单:谬误与陷阱_第5页
已阅读5页,还剩61页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

HTAPMadeSimple

FallaciesandPitfalls

RossiSun

AboutMe

●RossiSun(孙若曦)

●Techlead,ComputeArch.&Engineteam@PingCAP

●Was

○Techlead,SQLonHadoopteam@Transwarp

○Techlead,GPUArchInfrateam@NVIDIA

●Over10-yearexperienceoninfra

○System-levelsoftware

○Databasekernel&big-data

○GPUtechniques

HTAP

●HTAP:HybridTransactional/AnalyticalProcessing

●CoinedbyGartnerin2014

○ReatimeAnalytics

○Analyticsseetheexactoperationaldata

○Simplifydatainfrastructure(nodatamovement)

●Goingmainstream

○20%databasebuyerscitedHTAPcapabilities

○40%markedHTAPasTop3factor

TiDBArchitecture1.0

Pitfall:Non-ScalableAP

●Auto-sharding

●Distributedtransaction

●TPscaleswell

●AP:wecandojoinandaggregation,onlythatonasinglenode

SELECTCOUNT(*)FROM

t0JOINt1

ONt0.c1=t1.c1

WHERE

t0.c2

t1.c2

=xxxand

=yyy

IntroducingTiSpark(Since2.0)

IntroducingTiSpark(Cont.)

id

0962

7658

3589

5523

name

Jane

John

Jim

Susan

age

30

45

20

52

Fallacy:OneSizeFitsAll

●The“Hybrid”…what?

●RowstoreperformspoorforAP

id

name

age

0962

Jane

30

7658

John

45

3589

Jim

20

5523

Susan

52

OLAP

OLTP

Fallacy:OneSizeFitsAll(Cont.)

●TPisseverelyinterfered

IntroducingColumnarStore(POC)

Pitfall:UnboundedStaleness

Pitfall:Complexity

EmbracingRaft(Since4.0)

IntroducingMPP(Since5.0)

IntroducingMPP(Cont.)

Fallacy:Consistency&Freshness

●UseMVCC+learnerread(raft)toguaranteedataconsistencyandfreshness

●Justlikeserializableisolationlevel

○Ideal,butatthecostofperformance

Timestamp:11balance=?

RaftLeader

Fallacy:Consistency&Freshness(Cont.)

MVCC

...

TS:10

$100

RaftLearner

4

2

MVCC

Timestamp:11balance=$200

RaftLeader

...

TS:10

$100

TS:11

$200

TS:12

$150

Fallacy:Consistency&Freshness(Cont.)

RaftLearner

4

4

MVCC

.

..

TS:10

$100

TS:11

?

Timestamp:11

Staleness:-5

balance=?

RaftLearner

4

StaleRead(Since6.6)

●Boundedstaleness

●Dataintegrity

●Gets30%moreQPSinourinternalPOC

X

balance=$100

RaftLeader

2

Fallacy:SharedNothing

Fallacy:SharedNothing(Cont.)

DisaggregatedCompute/Storage

●AvailableonTiDBCloudServerlessTier

DisaggregatedCompute/Storage(Cont.)

●Comingin7.0

Fallacy:HTAP=TP+AP

●ThesubtleboundarybetweenTPandAP

Fallacy:HTAP=TP+AP

●ThesubtleboundarybetweenTPandAP

Windowfunctionon

16mrows

80kqps

5mslatency

Heavyaggregationon

6brows

50qps

10slatency

OneOptimizorToRuleThemAll(Since6.5)

●Casestudy:Topreposongithuboveraspecifiedperiod

320mrows

5brows

<10rows

OneOptimizorToRuleThemAll(Cont.)

<10rows

320mrows

5brows

OneOptimizorToRuleThemAll(Cont.)

<10rows

320mrows

1mrows

OneOptimizorToRuleThemAll(Cont.)

320mrows

14mrows

<10rows

ComputeEngineEvolvement

●Casestudy:CPUunderutilization

ComputeEngineEvolvement(Cont.)

●Thedevilinstd::thread:

○lll_lock

○stack_cache

○deallocate_stack

○munmap

○TLBshootdown

○IPI

●Mitigation:Dynamicthreadpool(since5.4)

ComputeEngineEvolvement(Cont.)

●Moderateconcurrencybringsnewchallengestocomputeengine:

○Out-Of-Memory

○Out-Of-Thread(exceedsthemaxmmapulimit)

○Lackoffine-grainedschedulingandtaskprioritization

●Mitigation:

○Memorytracker(since6.1)andspilldisk(comingin7.0)

○Min-TSOscheduling(since6.0)

○Push-modelandpipelineexecution(comingin7.0)

Fallacy:TheCostofHTAP

HTAPServerless&Elasticity

●CominginTiDBCloudServerlessTier

●Pay-As-You-Go,costmetricsre-designed

○Datastored

○Read/write/computation

●Extremeelasticity

○Poolinginstancestoreducecoldstarttimetosecond-level

○Scale-intozero

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论