Shanjiang Tang1,Qifei Chai1,CeYu1,YusenLi2,ChaoSun1
1CollegeofIntelligenceandComputing,TianjinUniversity2SchoolofComputerScience,NankaiUniversity
BalancingFairnessandEfficiencyforCacheSharinginSemi-externalMemorySystem
Outline
• Motivation• ElasticSemi-ExternalMemoryAllocation• Evaluation• ConclusionandFutureWork
2
DataCachingisImportant
• Therearevariedaccessesfrequenciesforapplicationsdata.– Manyrealapplicationsfollowpower-law distributionfortheirdataaccesses.
– Puthotdataincachecanspeeduptheperformance.
3Cha et al. Analyzing the Video Popularity Characteristics of Large-Scale User Generated Content Systems, TON’09.
CacheSharingisaTrend
• Cachesharingcanimprovethecacheefficiency.– Allowoverloaduserstousetheidlecacheresourcesfromunderloadedusersformaximumcacheutilization.
– Keeponlyonecopyofshareddataformultipleusers.– Enableglobalefficiencyoptimizationacrossmultipleusers.
– SupportedbymanyexistingcachesystemsforcachingdatainDRAM forfastdataaccess.
4The capacity of DRAM is limited for big data caching!
Semi-ExternalMemory (SEM)CacheModel• Overcome thecapacitylimitationofDRAMsbyaddingSSDs.– DatacanbecachedeitherinDRAMsorSSDs.– ThelatencyofDRAMsismuchsmallerthanSSDs.– CacheHit:anaccesstoDRAMsorSSDs– CacheMiss:anaccesstoHDDs.
5
CacheResourceAllocation
• IntegrateDRAMsandSSDsofSEMwiththeawarenessoftheirdifferentdataaccesslatencies.– IflatencyratioofDRAMtoSSDsis1:6,then1GBDRAMcantradefor6GBSSD.
– UserscareaboutthetotalallocatedcacheresourcesofallstoragedevicesinSEM,ratherthanseparately.
• DifferentallocationpoliciescanhavedifferentallocationresultsonFairness andEfficiency.– GlobalSharingPolicy(e.g.,LFU)– SeparateMax-minFairnessPolicy– GlobalMax-minFairnessPolicy
6
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>
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 .
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.
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
FairnessVSEfficiency
• Tendtobeatradeoffbetweenfairnessandefficiency.– Pursuing100%fairnessoftenresultsinpoor efficiency,andviceversa.
– Needsanallocationpolicythatcanbalancethetwometricsflexiblyasuserswant.
11
Outline
• Motivation• ElasticSemi-ExternalMemoryAllocation• Evaluation• ConclusionandFutureWork
12
ElasticSemi-ExternalMemoryAllocation
13
ElasticSemi-ExternalMemoryAllocation
14
Detailed Description is given in the paper.
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).
ElasticSEMwithCheatingDetectionandPunishmentMechanism
16
Detailed Description is given in the paper.
Outline
• Motivation• ElasticSemi-ExternalMemoryAllocation• Evaluation• ConclusionandFutureWork
17
Evaluation
• Alluxio Cluster– 11nodes,eachwith8CPUcoresand16GBmemory.– Weconfigure4GBmemoryasDRAMcacheanduse8GBmemorytoemulateSSDcache.
• Macro-Benchmarks– ThreedifferentworkloadsincludingsyntheticFacebookworkload,Purdueworkload,TPC-Hworkload.
• Micro-Benchmarks– Twouserseachwith40filesandequallysharetheSEMcacheresources.
18
Detailed setups are in the paper.
CheatingandPunishment
19
FairnessandEfficiencyunderDifferentknobs• ThesystemefficiencyforUser1andUser2underdifferentknobsconfigurations.ThecachevolumeofSEMsystemissetto10GBforDRAMand30GBforSSD,respectively.Weparticularlyshowthatthesensitivityofknobconfigurationonthetradeoffbetweenfairnessandefficiencyisrelatedtothecacheddatadistributionandtheirsizes.
20
PerformanceComparison
21
Outline
• Motivation• ElasticMulti-ResourceFairness• Evaluation• ConclusionandFutureWork
22
Conclusions
• ThereisatradeoffbetweenfairnessandefficiencyforresourceallocationinSEMcachesystem.
• WearguethatitshouldintegrateDRAMsandSSDsofSEMasawholewhenconsideringfairness/efficiencyoptimizationinresourceallocation.
• Weproposeaknob-basedfairness-efficiencycacheallocationpolicycalledElasticSEMforSEM.
• WeexperimentallyshowthatElasticSEMcanallowuserstobalancethetradeoffbetweenfairnessandefficiencywhileaddressingthecheatingproblem.
23
Thanks!Question?
24