balancing fairness and efficiency for cache sharing in

24
Shanjiang Tang 1 , Qifei Chai 1 , Ce Yu 1 , Yusen Li 2 , Chao Sun 1 1 College of Intelligence and Computing, Tianjin University 2 School of Computer Science, Nankai University Balancing Fairness and Efficiency for Cache Sharing in Semi-external Memory System

Upload: others

Post on 19-Apr-2022

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Balancing Fairness and Efficiency for Cache Sharing in

Shanjiang Tang1,Qifei Chai1,CeYu1,YusenLi2,ChaoSun1

1CollegeofIntelligenceandComputing,TianjinUniversity2SchoolofComputerScience,NankaiUniversity

BalancingFairnessandEfficiencyforCacheSharinginSemi-externalMemorySystem

Page 2: Balancing Fairness and Efficiency for Cache Sharing in

Outline

• Motivation• ElasticSemi-ExternalMemoryAllocation• Evaluation• ConclusionandFutureWork

2

Page 3: Balancing Fairness and Efficiency for Cache Sharing in

DataCachingisImportant

• Therearevariedaccessesfrequenciesforapplicationsdata.– Manyrealapplicationsfollowpower-law distributionfortheirdataaccesses.

– Puthotdataincachecanspeeduptheperformance.

3Cha et al. Analyzing the Video Popularity Characteristics of Large-Scale User Generated Content Systems, TON’09.

Page 4: Balancing Fairness and Efficiency for Cache Sharing in

CacheSharingisaTrend

• Cachesharingcanimprovethecacheefficiency.– Allowoverloaduserstousetheidlecacheresourcesfromunderloadedusersformaximumcacheutilization.

– Keeponlyonecopyofshareddataformultipleusers.– Enableglobalefficiencyoptimizationacrossmultipleusers.

– SupportedbymanyexistingcachesystemsforcachingdatainDRAM forfastdataaccess.

4The capacity of DRAM is limited for big data caching!

Page 5: Balancing Fairness and Efficiency for Cache Sharing in

Semi-ExternalMemory (SEM)CacheModel• Overcome thecapacitylimitationofDRAMsbyaddingSSDs.– DatacanbecachedeitherinDRAMsorSSDs.– ThelatencyofDRAMsismuchsmallerthanSSDs.– CacheHit:anaccesstoDRAMsorSSDs– CacheMiss:anaccesstoHDDs.

5

Page 6: Balancing Fairness and Efficiency for Cache Sharing in

CacheResourceAllocation

• IntegrateDRAMsandSSDsofSEMwiththeawarenessoftheirdifferentdataaccesslatencies.– IflatencyratioofDRAMtoSSDsis1:6,then1GBDRAMcantradefor6GBSSD.

– UserscareaboutthetotalallocatedcacheresourcesofallstoragedevicesinSEM,ratherthanseparately.

• DifferentallocationpoliciescanhavedifferentallocationresultsonFairness andEfficiency.– GlobalSharingPolicy(e.g.,LFU)– SeparateMax-minFairnessPolicy– GlobalMax-minFairnessPolicy

6

Page 7: Balancing Fairness and Efficiency for Cache Sharing in

MotivatingExample

• ConsideraSEMconsistingof100GBDRAMand300GBSSD,wherethelatencyratioofDRAMtoSSDis1/6.Itissharedbytwousers1and2equally.User1containstwodatad1,1 (size:300GB,accessfrequency:60times/sec)andd1,2 (size:100GB,accessfrequency:100times/sec).User2hastwodatad2,1 (size:100GB,accessfrequency:15times/sec)andd2,2(size:200GB,accessfrequency:18times/sec).

7

DRAM SSD

300

Capacity (GB)

100

Devices

User1’s d1,1 :

User1’s d1,2 :

User2’s d2,1 :

<100GB, 100 times/sec>

<100GB, 15 times/sec>

<300GB, 60 times/sec>

User2’s d2,2 :<200GB, 18 times/sec>

Page 8: Balancing Fairness and Efficiency for Cache Sharing in

GlobalSharingPolicy(e.g.,LFU)

• ConsideraSEMconsistingof100GBDRAMand300GBSSD,wherethelatencyratioofDRAMtoSSDis1/6.Itissharedbytwousers1and2equally.User1containstwodatad1,1 (size:300GB,accessfrequency:60times/sec)andd1,2 (size:100GB,accessfrequency:100times/sec).User2hastwodatad2,1 (size:100GB,accessfrequency:15times/sec)andd2,2(size:200GB,accessfrequency:18times/sec).

• Allocationresults– User1’sAllocation:150=100/1+300/6– User1’sEfficiency: 13000=100*100/1

+60*300/6– User2’sAllocation:0– User2’sEfficiency:0– Totalefficiency:13000

8

DRAM SSD

300

Capacity (GB)

100

Devices

User1’s d1,1 :

User1’s d1,2 :

User2’s d2,1 :

<100GB, 100 times/sec>

<100GB, 15 times/sec>

<300GB, 60 times/sec>

100

300

User2’s d2,2 :<200GB, 18 times/sec> 100

300

Unfairness Degree: |150/75 – 0/75| = 2, SEM efficiency:13000 .

Page 9: Balancing Fairness and Efficiency for Cache Sharing in

SeparateMax-minFairnessPolicy

• ConsideraSEMconsistingof100GBDRAMand300GBSSD,wherethelatencyratioofDRAMtoSSDis1/6.Itissharedbytwousers1and2equally.User1containstwodatad1,1 (size:300GB,accessfrequency:60times/sec)andd1,2 (size:100GB,accessfrequency:100times/sec).User2hastwodatad2,1 (size:100GB,accessfrequency:15times/sec)andd2,2(size:200GB,accessfrequency:18times/sec).

• Allocationresults– User1’sAllocation:75=50/1+150/6– User1’sEfficiency: 6833=50*100/1

+(50*100+100*60)/6– User2’sAllocation:75=50/1+150/6– User2’sEfficiency:1350=50*18/1

+150*18/6– Totalefficiency:8183=6833+1350

9

DRAM SSD

300

Capacity (GB)

100

Devices

User1’s d1,1 :

User1’s d1,2 :

User2’s d2,1 :

<100GB, 100 times/sec>

<100GB, 15 times/sec>

<300GB, 60 times/sec>

User2’s d2,2 :<200GB, 18 times/sec>

50

50

50

100

150

Unfairness Degree: |75/75 – 75/75| = 0, SEM efficiency:8183.

Page 10: Balancing Fairness and Efficiency for Cache Sharing in

GlobalMax-minFairnessPolicy

• ConsideraSEMconsistingof100GBDRAMand300GBSSD,wherethelatencyratioofDRAMtoSSDis1/6.Itissharedbytwousers1and2equally.User1containstwodatad1,1 (size:300GB,accessfrequency:60times/sec)andd1,2 (size:100GB,accessfrequency:100times/sec).User2hastwodatad2,1 (size:100GB,accessfrequency:15times/sec)andd2,2(size:200GB,accessfrequency:18times/sec).

• Allocationresults– User1’sAllocation:75=70/1+30/6– User1’sEfficiency: 7500=70*100/1

+30*100/6– User2’sAllocation:75=30/1+270/6– User2’sEfficiency:1300=30*18/1

+(170*18+100*15)/6– Totalefficiency:8800=7500+1300

10

DRAM SSD

300

Capacity (GB)

100

Devices

User1’s d1,1 :

User1’s d1,2 :

User2’s d2,1 :

<100GB, 100 times/sec>

<100GB, 15 times/sec>

<300GB, 60 times/sec>

User2’s d2,2 :<200GB, 18 times/sec>

Unfairness Degree: |75/75 – 75/75| = 0, SEM efficiency:8800.

70

30

30

100

170

Page 11: Balancing Fairness and Efficiency for Cache Sharing in

FairnessVSEfficiency

• Tendtobeatradeoffbetweenfairnessandefficiency.– Pursuing100%fairnessoftenresultsinpoor efficiency,andviceversa.

– Needsanallocationpolicythatcanbalancethetwometricsflexiblyasuserswant.

11

Page 12: Balancing Fairness and Efficiency for Cache Sharing in

Outline

• Motivation• ElasticSemi-ExternalMemoryAllocation• Evaluation• ConclusionandFutureWork

12

Page 13: Balancing Fairness and Efficiency for Cache Sharing in

ElasticSemi-ExternalMemoryAllocation

13

Page 14: Balancing Fairness and Efficiency for Cache Sharing in

ElasticSemi-ExternalMemoryAllocation

14

Detailed Description is given in the paper.

Page 15: Balancing Fairness and Efficiency for Cache Sharing in

CheatingProblemforElasticSEM

15

• ConsideraSEMconsistingof100GBDRAMand300GBSSD,wherethelatencyratioofDRAMtoSSDis1/6.Itissharedbytwousers1and2equally.User1containstwodatad1,1 (size:300GB,accessfrequency:60times/sec)andd1,2 (size:100GB,accessfrequency:100times/sec).User2hastwodatad2,1 (size:100GB,accessfrequency:15times/sec)andd2,2(size:200GB,accessfrequency:18times/sec).

Page 16: Balancing Fairness and Efficiency for Cache Sharing in

ElasticSEMwithCheatingDetectionandPunishmentMechanism

16

Detailed Description is given in the paper.

Page 17: Balancing Fairness and Efficiency for Cache Sharing in

Outline

• Motivation• ElasticSemi-ExternalMemoryAllocation• Evaluation• ConclusionandFutureWork

17

Page 18: Balancing Fairness and Efficiency for Cache Sharing in

Evaluation

• Alluxio Cluster– 11nodes,eachwith8CPUcoresand16GBmemory.– Weconfigure4GBmemoryasDRAMcacheanduse8GBmemorytoemulateSSDcache.

• Macro-Benchmarks– ThreedifferentworkloadsincludingsyntheticFacebookworkload,Purdueworkload,TPC-Hworkload.

• Micro-Benchmarks– Twouserseachwith40filesandequallysharetheSEMcacheresources.

18

Detailed setups are in the paper.

Page 19: Balancing Fairness and Efficiency for Cache Sharing in

CheatingandPunishment

19

Page 20: Balancing Fairness and Efficiency for Cache Sharing in

FairnessandEfficiencyunderDifferentknobs• ThesystemefficiencyforUser1andUser2underdifferentknobsconfigurations.ThecachevolumeofSEMsystemissetto10GBforDRAMand30GBforSSD,respectively.Weparticularlyshowthatthesensitivityofknobconfigurationonthetradeoffbetweenfairnessandefficiencyisrelatedtothecacheddatadistributionandtheirsizes.

20

Page 21: Balancing Fairness and Efficiency for Cache Sharing in

PerformanceComparison

21

Page 22: Balancing Fairness and Efficiency for Cache Sharing in

Outline

• Motivation• ElasticMulti-ResourceFairness• Evaluation• ConclusionandFutureWork

22

Page 23: Balancing Fairness and Efficiency for Cache Sharing in

Conclusions

• ThereisatradeoffbetweenfairnessandefficiencyforresourceallocationinSEMcachesystem.

• WearguethatitshouldintegrateDRAMsandSSDsofSEMasawholewhenconsideringfairness/efficiencyoptimizationinresourceallocation.

• Weproposeaknob-basedfairness-efficiencycacheallocationpolicycalledElasticSEMforSEM.

• WeexperimentallyshowthatElasticSEMcanallowuserstobalancethetradeoffbetweenfairnessandefficiencywhileaddressingthecheatingproblem.

23

Page 24: Balancing Fairness and Efficiency for Cache Sharing in

Thanks!Question?

24