Stout
An Adaptive Interface to Scalable Cloud Storage
John C. McCullough John Dunagan† Alec Wolman† Alex C. Snoeren
UC San Diego Microsoft Research†
June 23, 2010
Stout An Adaptive Interface to Scalable Cloud Storage John Dunagan - - PowerPoint PPT Presentation
Stout An Adaptive Interface to Scalable Cloud Storage John Dunagan John C. McCullough Alec Wolman Alex C. Snoeren UC San Diego Microsoft Research June 23, 2010 Scalable Multi-tiered Services 2 Scalable Multi-tiered Services app
John C. McCullough John Dunagan† Alec Wolman† Alex C. Snoeren
UC San Diego Microsoft Research†
June 23, 2010
2
www app store www www app app store store
2
www app store www www app app store store Spreadsheet
2
www app store www www app app store store Spreadsheet
2
www app store www www app app store store client Spreadsheet
2
www app store www www app app store store client Spreadsheet
2
www app store www www app app store store client Spreadsheet
2
www app store www www app app store store client Spreadsheet
2
www app store www www app app store store client Spreadsheet
2
www app store www www app app store store Spreadsheet
2
www app store www www app app store store Spreadsheet www app app store
2
www app store www www app app store store Spreadsheet store
2
www app store www www app app store store Spreadsheet store . . . . . . store app www Other App
2
www app store www www app app store store Spreadsheet store . . . . . . store app www Other App
2
app store
◮ Simple interface
◮ read(key) → value ◮ write(key, value)
◮ Natural to send requests right away
3
app store
◮ Simple interface
◮ read(key) → value ◮ write(key, value)
◮ Natural to send requests right away ◮ Block for response to survive failures
3
app store
◮ Simple interface
◮ read(key) → value ◮ write(key, value)
◮ Natural to send requests right away ◮ Block for response to survive failures ◮ Performance characteristics:
Load (requests/s) Latency Saturation
3
app store
◮ Simple interface
◮ read(key) → value ◮ write(key, value)
◮ Natural to send requests right away ◮ Block for response to survive failures ◮ Performance characteristics:
Load (requests/s) Latency Saturation
3
app store
◮ Application server handles requests for many
clients
◮ Storage request overheads
◮ Networking delay ◮ Protocol-processing ◮ Disk seeks ◮ etc. 4
app store
◮ Application server handles requests for many
clients
◮ Storage request overheads
◮ Networking delay ◮ Protocol-processing ◮ Disk seeks ◮ etc. 4
app store
◮ Application server handles requests for many
clients
◮ Storage request overheads
◮ Networking delay ◮ Protocol-processing ◮ Disk seeks ◮ etc. 4
app store
◮ Application server handles requests for many
clients
◮ Storage request overheads
◮ Networking delay ◮ Protocol-processing ◮ Disk seeks ◮ etc. 4
app store
◮ Application server handles requests for many
clients
◮ Storage request overheads
◮ Networking delay ◮ Protocol-processing ◮ Disk seeks ◮ etc. 4
app store
◮ Application server handles requests for many
clients
◮ Storage request overheads
◮ Networking delay ◮ Protocol-processing ◮ Disk seeks ◮ etc. 4
app store
◮ Application server handles requests for many
clients
◮ Storage request overheads
◮ Networking delay ◮ Protocol-processing ◮ Disk seeks ◮ etc.
◮ Batch to amortize overheads
4
app store
◮ Application server handles requests for many
clients
◮ Storage request overheads
◮ Networking delay ◮ Protocol-processing ◮ Disk seeks ◮ etc.
◮ Batch to amortize overheads
4
◮ Most apps use a fixed batching interval
5
◮ Most apps use a fixed batching interval
short interval long
5
◮ Most apps use a fixed batching interval ◮ Latency/throughput tradeoff
short interval long better latency better throughput
5
◮ Most apps use a fixed batching interval ◮ Latency/throughput tradeoff
short interval long better latency better throughput
Load (requests/s) Latency
5
◮ Most apps use a fixed batching interval ◮ Latency/throughput tradeoff
short interval long better latency better throughput
Load (requests/s) Latency
5
◮ Most apps use a fixed batching interval ◮ Latency/throughput tradeoff
short interval long better latency better throughput
Load (requests/s) Latency
5
◮ Most apps use a fixed batching interval ◮ Latency/throughput tradeoff ◮ Want flexible batching interval
◮ Short when lightly loaded ◮ Long when heavily loaded
short interval long better latency better throughput
Load (requests/s) Latency
5
www app1 Stout www app2 Stout store store store
◮ Stout is a storage interposition library ◮ Our contribution is a technique for
independently adjusting the batching interval
6
7
www app store
8
www app store
8
www app store ProcessRequest(req):
8
www app store ProcessRequest(req): key = Parse(req)
8
www app store ProcessRequest(req): key = Parse(req) Process(key,req)
8
www app store ProcessRequest(req): key = Parse(req) Process(key,req) PersistState(key)
8
www app store ProcessRequest(req): key = Parse(req) Process(key,req) PersistState(key)
8
www app store ProcessRequest(req): key = Parse(req) Process(key,req) PersistState(key) reply = MakeReply(req)
8
www app store ProcessRequest(req): key = Parse(req) Process(key,req) PersistState(key) reply = MakeReply(req) SendReply(reply)
8
www app store ProcessRequest(req): key = Parse(req) Process(key,req) PersistState(key) reply = MakeReply(req) SendReply(reply)
8
www app store ProcessRequest(req): key = Parse(req) Process(key,req) PersistState(key) reply = MakeReply(req) SendReply(reply)
8
www app store Stout ProcessRequest(req): key = Parse(req) Process(key,req) PersistState(key) reply = MakeReply(req) SendReply(reply)
8
www app store Stout ProcessRequest(req): key = Parse(req) Process(key,req) MarkDirty(key) reply = MakeReply(req) SendReply(reply)
8
www app store Stout ProcessRequest(req): key = Parse(req) Process(key,req) MarkDirty(key) reply = MakeReply(req) SafeReply(key,reply)
8
www app store Stout ProcessRequest(req): key = Parse(req) Process(key,req) MarkDirty(key) reply = MakeReply(req) SafeReply(key,reply) BatchingLoop: keys = DirtyKeys() replies = Depends(keys) AsyncWrite(keys, replies) Sleep(interval)
8
www app store Stout ProcessRequest(req): key = Parse(req) Process(key,req) MarkDirty(key) reply = MakeReply(req) SafeReply(key,reply) BatchingLoop: keys = DirtyKeys() replies = Depends(keys) AsyncWrite(keys, replies) Sleep(interval)
8
◮ Don’t reveal uncomitted state
Synchronous app store x=5 Potential Async app store x=5
9
◮ Don’t reveal uncomitted state ◮ Potential async: Inconsistency on failure
Synchronous app store x=5 Potential Async app store x=5
9
◮ Don’t reveal uncomitted state ◮ Potential async: Inconsistency on failure
Synchronous app store x=5 Potential Async app store x=5
9
◮ Don’t reveal uncomitted state ◮ Potential async: Inconsistency on failure
Synchronous app store x=5 Potential Async app store x=5
9
◮ Don’t reveal uncomitted state ◮ Potential async: Inconsistency on failure
Synchronous app store x=5 Potential Async app store x=5 interval
9
◮ Don’t reveal uncomitted state ◮ Potential async: Inconsistency on failure
Synchronous app store x=5 Potential Async app store x=5 interval
9
◮ Don’t reveal uncomitted state ◮ Potential async: Inconsistency on failure
Synchronous app store x=5 Potential Async app store x=5
9
◮ Don’t reveal uncomitted state ◮ Potential async: Inconsistency on failure
Synchronous app store x=5 Potential Async app store x=5
9
◮ Don’t reveal uncomitted state ◮ Potential async: Inconsistency on failure
Synchronous app store x=5 Potential Async app store x=5 Failure
9
◮ Don’t reveal uncomitted state ◮ Potential async: Inconsistency on failure ◮ Stout provides serialized update semantics
Synchronous app store x=5 Stout Async app store x=5
9
◮ Don’t reveal uncomitted state ◮ Potential async: Inconsistency on failure ◮ Stout provides serialized update semantics
Synchronous app store x=5 Stout Async app store x=5 interval
9
◮ Don’t reveal uncomitted state ◮ Potential async: Inconsistency on failure ◮ Stout provides serialized update semantics
Synchronous app store x=5 Stout Async app store x=5 interval
9
◮ Don’t reveal uncomitted state ◮ Potential async: Inconsistency on failure ◮ Stout provides serialized update semantics
Synchronous app store x=5 Stout Async app store x=5 interval
9
◮ Batched commits enable further optimization ◮ Can write most recent version only ◮ Reduces load at the store
10
◮ Batched commits enable further optimization ◮ Can write most recent version only ◮ Reduces load at the store
x=5
10
◮ Batched commits enable further optimization ◮ Can write most recent version only ◮ Reduces load at the store
x=5 x=6
10
◮ Batched commits enable further optimization ◮ Can write most recent version only ◮ Reduces load at the store
x=5 x=6 x=7
10
◮ Batched commits enable further optimization ◮ Can write most recent version only ◮ Reduces load at the store
x=5 x=6 x=7
10
◮ Batched commits enable further optimization ◮ Can write most recent version only ◮ Reduces load at the store
x=5 x=6 x=7 x=7
10
11
◮ Storage system is a shared medium ◮ Independently reach efficient fair share ◮ Delay as congestion indicator
◮ Rather than modifying storage for explicit
notification
app store store store app app Stout Stout Stout Queue
12
◮ Unknown bottleneck capacity ◮ Traditional TCP signaled via packet loss ◮ Delay-based congestion control triggered by
latency changes Router Queue
13
Networking Storage Mechanism Change Rate Change Size ACCELERATE Send Faster Batch Less BACK-OFF Send Slower Batch More
14
if perf < recent perf BACK-OFF else ACCELERATE
15
if perf < recent perf BACK-OFF else ACCELERATE batch size latency + interval
16
if perf < recent perf BACK-OFF else ACCELERATE if backed-off EWMA(batch sizei) EWMA(lati) + EWMA(intervali) else // accelerated MAXi( batch sizei lati + intervali )
17
if perf < recent perf BACK-OFF else ACCELERATE
18
if perf < recent perf BACK-OFF else ACCELERATE (1 + α) ∗ intervali
18
if perf < recent perf BACK-OFF else ACCELERATE (1 + α) ∗ intervali (1 − β) ∗ intervali + β ∗
18
if perf < recent perf BACK-OFF else ACCELERATE (1 + α) ∗ intervali (1 − β) ∗ intervali + β ∗
Time (s) interval
18
19
◮ Baseline Storage System Performance
◮ Benefits of batching ◮ Benefits of write-collapsing
◮ Stout
◮ Versus fixed batching intervals ◮ Workload variation 20
!"#$%&$'(%
21
!"#$%&$'(%
Sectioned Document Store
21
!"#$%&$'(%
Sectioned Document Store Our Workload
◮ 256-byte documents: IOPS dominated ◮ 50% read, 50% write
21
Evaluation Platform
◮ 50 machines
◮ 1 Experiment Controller ◮ 1 Lease Manager ◮ 12 Frontends ◮ 32 Middle Tiers ◮ 4 Storage (Partitioned Key-Value w/MSSQL as
storage)
www app store 12× 32× 4×
22
2k 4k 6k 8k 10k 12k 14k 16k 18k Load (requests/s) 50 100 150 200 250 300 End-to-end Latency (ms) no-batching
23
2k 4k 6k 8k 10k 12k 14k 16k 18k Load (requests/s) 50 100 150 200 250 300 End-to-end Latency (ms) no-batching 10ms
23
2k 4k 6k 8k 10k 12k 14k 16k 18k Load (requests/s) 50 100 150 200 250 300 End-to-end Latency (ms) no-batching 10ms 20ms
◮ Batching improves performance
23
4k 6k 8k 10k 12k 14k 16k 18k 20k Load (requests/s) 50 100 150 200 250 300 End-to-end Latency (ms) 10ms low collapsing
Low collapsing 10k Documents High collapsing 100 Documents
24
4k 6k 8k 10k 12k 14k 16k 18k 20k Load (requests/s) 50 100 150 200 250 300 End-to-end Latency (ms) 10ms low collapsing 20ms low collapsing
Low collapsing 10k Documents High collapsing 100 Documents
24
4k 6k 8k 10k 12k 14k 16k 18k 20k Load (requests/s) 50 100 150 200 250 300 End-to-end Latency (ms) 10ms low collapsing 20ms low collapsing 10ms high collapsing
Low collapsing 10k Documents High collapsing 100 Documents
24
4k 6k 8k 10k 12k 14k 16k 18k 20k Load (requests/s) 50 100 150 200 250 300 End-to-end Latency (ms) 10ms low collapsing 20ms low collapsing 10ms high collapsing 20ms high collapsing
Low collapsing 10k Documents High collapsing 100 Documents
◮ Improvement dependent on workload
24
5k 10k 15k 20k 25k 30k 35k 40k 45k Load (requests/s) 100 200 300 400 500 600 700 800 End-to-end Latency (ms) 20ms
25
5k 10k 15k 20k 25k 30k 35k 40k 45k Load (requests/s) 100 200 300 400 500 600 700 800 End-to-end Latency (ms) 20ms 40ms
25
5k 10k 15k 20k 25k 30k 35k 40k 45k Load (requests/s) 100 200 300 400 500 600 700 800 End-to-end Latency (ms) 20ms 40ms 80ms
25
5k 10k 15k 20k 25k 30k 35k 40k 45k Load (requests/s) 100 200 300 400 500 600 700 800 End-to-end Latency (ms) 20ms 40ms 80ms 160ms
25
5k 10k 15k 20k 25k 30k 35k 40k 45k Load (requests/s) 100 200 300 400 500 600 700 800 End-to-end Latency (ms) 20ms 40ms 80ms 160ms Stout
◮ Stout better than any fixed interval across
wide range of workloads
25
60 70 80 90 100 110 120 Time (s) 50 100 150 200 250 End-to-end Latency (ms) 20ms decrease
Decrease 12k requests/s → 8k requests/s Increase 12k requests/s → 18k requests/s
26
60 70 80 90 100 110 120 Time (s) 50 100 150 200 250 End-to-end Latency (ms) 20ms decrease Stout decrease
Decrease 12k requests/s → 8k requests/s Increase 12k requests/s → 18k requests/s
26
60 70 80 90 100 110 120 Time (s) 50 100 150 200 250 End-to-end Latency (ms) 20ms decrease Stout decrease 20ms increase
Decrease 12k requests/s → 8k requests/s Increase 12k requests/s → 18k requests/s
26
60 70 80 90 100 110 120 Time (s) 50 100 150 200 250 End-to-end Latency (ms) 20ms decrease Stout decrease 20ms increase Stout increase
Decrease 12k requests/s → 8k requests/s Increase 12k requests/s → 18k requests/s
26
◮ Fairness (Jain’s Fairness index of 0.96) ◮ Stout achieves similar performance with:
◮ PacificA ◮ SQL Data Services 27
◮ Batching improves storage performance ◮ Current practice is fixed latency/throughput
tradeoff
◮ Stout introduces distributed adaptation
technique
◮ Achieve 3× higher throughput over
low-latency fixed interval for modified Live Mesh service
28
29