2DFQ: Two-Dimensional Fair Queuing for Multi-Tenant Cloud Services
Jona nathan an Ma Mace
Brown University
Peter Bodik
Microsoft
Madanlal Musuvathi
Microsoft
Rodrigo Fonseca
Brown University
Krishnan Varadarajan
Microsoft
2DFQ: Two-Dimensional Fair Queuing for Multi-Tenant Cloud Services - - PowerPoint PPT Presentation
2DFQ: Two-Dimensional Fair Queuing for Multi-Tenant Cloud Services Jona nathan an Ma Mace Peter Bodik Madanlal Musuvathi Brown University Microsoft Microsoft Rodrigo Fonseca Krishnan Varadarajan Brown University Microsoft Containers
Jona nathan an Ma Mace
Brown University
Peter Bodik
Microsoft
Madanlal Musuvathi
Microsoft
Rodrigo Fonseca
Brown University
Krishnan Varadarajan
Microsoft
2
Containers / VMs
2
Containers / VMs
Shared Systems: Storage, Database, Queueing, etc.
2
Containers / VMs
Shared Systems: Storage, Database, Queueing, etc.
Shared Process
3
Shared Process Tenants Request Queues
…
3
Shared Process Tenants Request Queues time Threads
…
3
Shared Process Tenants Request Queues time Threads
…
3
Shared Process Tenants Request Queues time Threads
…
FIFO or ad-hoc
3
Shared Process Tenants Request Queues time Threads
…
4
Shared Process Tenants Request Queues time Threads
…
Flows Packet
4
Shared Process Tenants Request Queues time Threads
…
Flows Packet Switch Link
4
Shared Process Tenants Request Queues time Threads
…
Flows Packet Switch Link Weighted Fair Queueing (WFQ)
4
Shared Process Tenants Request Queues time Threads
…
Weighted Fair Queueing (WFQ)
Multiple threads Multiple concurrent requests
4
…
5
…
5
… Two-Dimensional Fair Queueing (2DFQ)
5
6
A size =1
(fast database read)
6
D size =10 A size =1
(fast database read) (slow database scan)
6
D size =10 A size =1 One thread: time
(fast database read) (slow database scan)
6
D size =10 A size =1 One thread: time
(fast database read) (slow database scan)
6
D size =10 A size =1 One thread: time
(fast database read) (slow database scan)
6
D size =10 A size =1 … One thread: time
(fast database read) (slow database scan)
6
D size =10 A size =1 … One thread: time high-throughput burst zero-throughput lull throughput
(fast database read) (slow database scan)
6
D size =10 A size =1 … One thread: time high-throughput burst zero-throughput lull Ideal: throughput
(fast database read) (slow database scan)
6
D size =10 A size =1 … One thread: time high-throughput burst zero-throughput lull Ideal: throughput
(fast database read) (slow database scan)
6
D size =10 A size =1 … One thread: time high-throughput burst zero-throughput lull Ideal: throughput
(fast database read) (slow database scan)
6
D size =10 A size =1
7
D size =10 A size =1 C B
7
D size =10 A size =1 C B time
7
D size =10 A size =1 C B time
7
D size =10 A size =1 C B time
7
D size =10 A size =1 C B time time
7
D size =10 A size =1 C B time time
7
D size =10 A size =1 C B time time
7
D size =10 A size =1 C B time time
7
D size =10 A size =1 C B time time throughput throughput
7
D size =10 A size =1 C B time time throughput throughput
Weighted Fair Queuing Start-time Fair Queueing
7
D size =10 A size =1 C B time time throughput throughput
Worst-Case Fair Weighted Fair Queuing
Weighted Fair Queuing Start-time Fair Queueing
7
D size =10 A size =1 C B
8
D size =10 A size =1 C B time
8
D size =10 A size =1 C B time
8
D size =10 A size =1 C B time
8
D size =10 A size =1 C B time
8
D size =10 A size =1 C B time time
8
D size =10 A size =1 C B time time
8
D size =10 A size =1 C B time time
8
D size =10 A size =1 C B time time
8
D size =10 A size =1 C B time time Ideal:
8
D size =10 A size =1 C B time time
More threads → Opportunity to reduce burstiness
8
D size =10 A size =1 C B time time
More threads → Opportunity to reduce burstiness
WFQ, SFQ, WF²Q, …
Weighted Fair Queueing Start-time Fair Queueing Worst-case Fair Weighted Fair Queueing
8
D size =10 A size =1 C B time time
More threads → Opportunity to reduce burstiness
WFQ, SFQ, WF²Q, …
Weighted Fair Queueing Start-time Fair Queueing Worst-case Fair Weighted Fair Queueing
2DFQ
Two-dimensional Fair Queueing
8
9
A size =1 Tenants with small requests are affected
10
C size =10 A size =1 Tenants with small requests are affected Burstiness is proportional to size of large requests
10
C size =10 A size =1
Cloud services: 4+ orders of magnitude variation in cost
Tenants with small requests are affected Burstiness is proportional to size of large requests
10
C size =10 A size =1
Cloud services: 4+ orders of magnitude variation in cost
Tenants with small requests are affected Burstiness is proportional to size of large requests size =10 A size =1 Size is used by scheduler to make scheduling decisions C
10
C size =10 A size =1
Cloud services: 4+ orders of magnitude variation in cost
Tenants with small requests are affected Burstiness is proportional to size of large requests A size =? size =? Size is used by scheduler to make scheduling decisions C
10
C size =10 A size =1
Cloud services: 4+ orders of magnitude variation in cost
Tenants with small requests are affected Burstiness is proportional to size of large requests A
Cloud services: Estimation using model or moving averages
size =? size =? Size is used by scheduler to make scheduling decisions C
10
Key
11
1st quartile 3rd quartile distribution shape 1st percentile median 99th percentile
Key
11
1st quartile 3rd quartile distribution shape 1st percentile median 99th percentile
12
Unpredictability Cost Variation Quality Of Service
12
Unpredictability Cost Variation Quality Of Service
12
Unpredictability Cost Variation Quality Of Service
12
13
D size =10 A size =1 C B time
14
D size =10 A size =1 C B time
14
D size =10 A size =1 C B time
14
D size =10 A size =1 C B time
15
D size =10 A size =1 C B time
15
D size =10 A size =1 C B time
15
D size =10 A size =1 C B time
15
D size =10 A size =1 C B 1 time
16
D size =10 A size =1 C B 1 1 time
17
D size =10 A size =1 C B 1 1 time
18
D size =10 A size =1 C B 1 1 time
v(t)=½
18
D size =10 A size =1 C B 2 2 time
v(t)=1
19
D size =10 A size =1 C B 3 3 time
v(t)=1½
20
D size =10 A size =1 C B 4 4 time
v(t)=2
21
D size =10 A size =1 C B 5 5 time
v(t)=2½
22
D size =10 A size =1 C B 6 6 time
v(t)=3
23
D size =10 A size =1 C B 7 7 time
v(t)=3½
24
D size =10 A size =1 C B 8 8 time
v(t)=4
25
D size =10 A size =1 C B 9 9 time
v(t)=4½
26
D size =10 A size =1 C B 10 10 time
v(t)=5
27
D size =10 A size =1 C B 10 10 time
v(t)=5
27
D size =10 A size =1 C B 10 10 10 10 time
v(t)=10
28
D size =10 A size =1 C B time
v(t)=0
29
D size =10 A size =1 C B time
v(t)=0
29
D size =10 A size =1 C B 1 1 time
v(t)=½
30
D size =10 A size =1 C B 1 1 time
v(t)=½
30
D size =10 A size =1 C B 1 1 time
v(t)=½
30
D size =10 A size =1 C B 1 1 10 10 time
v(t)=5½
31
D size =10 A size =1 C B 2 2 10 10 time
v(t)=6
32
D size =10 A size =1 C B 3 3 10 10 time
v(t)=6 ½
33
D size =10 A size =1 C B 4 4 10 10 time
v(t)=7
34
D size =10 A size =1 C B 5 5 10 10 time
v(t)=7 ½
35
D size =10 A size =1 C B 6 6 10 10 time
v(t)=8
36
D size =10 A size =1 C B 7 7 10 10 time
v(t)=8½
37
D size =10 A size =1 C B 8 8 10 10 time
v(t)=9
38
D size =10 A size =1 C B 9 9 10 10 time
v(t)=9½
39
D size =10 A size =1 C B 10 10 10 10 time
v(t)=10
40
D size =10 A size =1 C B 11 11 10 10 time
v(t)=10½
41
D size =10 A size =1 C B 11 11 10 10 time
v(t)=10½
41
D size =10 A size =1 C B 11 11 10 10 time
v(t)=10½
41
D size =10 A size =1 C B time
v(t)=0
42
D size =10 A size =1 C B time
v(t)=0
42
D size =10 A size =1 C B 1 1 time
v(t)=½
43
D size =10 A size =1 C B 1 1 time
v(t)=½
43
D size =10 A size =1 C B 1 1 10 time
v(t)=½
44
D size =10 A size =1 C B 1 1 10 time
v(t)=½
44
D size =10 A size =1 C B 1 1 10 time
v(t)=½
1 1
44
D size =10 A size =1 C B 2 1 10 time
v(t)=1
45
D size =10 A size =1 C B 2 1 10 time
v(t)=1
Eligible 𝑠𝑘, 𝑗 = Start 𝑠𝑘 − 𝑗
𝑜 × size 𝑠𝑘
45
D size =10 A size =1 C B 2 2 10 time
v(t)=1½
Eligible 𝑠𝑘, 𝑗 = Start 𝑠𝑘 − 𝑗
𝑜 × size 𝑠𝑘
46
D size =10 A size =1 C B 3 2 10 time
v(t)=2
Eligible 𝑠𝑘, 𝑗 = Start 𝑠𝑘 − 𝑗
𝑜 × size 𝑠𝑘
47
D size =10 A size =1 C B 3 3 10 time
v(t)=2½
Eligible 𝑠𝑘, 𝑗 = Start 𝑠𝑘 − 𝑗
𝑜 × size 𝑠𝑘
48
D size =10 A size =1 C B 4 3 10 time
v(t)=3
Eligible 𝑠𝑘, 𝑗 = Start 𝑠𝑘 − 𝑗
𝑜 × size 𝑠𝑘
49
D size =10 A size =1 C B 4 4 10 time
v(t)=3½
Eligible 𝑠𝑘, 𝑗 = Start 𝑠𝑘 − 𝑗
𝑜 × size 𝑠𝑘
50
D size =10 A size =1 C B 5 4 10 time
v(t)=4
Eligible 𝑠𝑘, 𝑗 = Start 𝑠𝑘 − 𝑗
𝑜 × size 𝑠𝑘
51
D size =10 A size =1 C B 5 5 10 time
v(t)=4½
Eligible 𝑠𝑘, 𝑗 = Start 𝑠𝑘 − 𝑗
𝑜 × size 𝑠𝑘
52
D size =10 A size =1 C B 6 5 10 time
v(t)=5
Eligible 𝑠𝑘, 𝑗 = Start 𝑠𝑘 − 𝑗
𝑜 × size 𝑠𝑘
53
D size =10 A size =1 C B 6 6 10 time
v(t)=5½
Eligible 𝑠𝑘, 𝑗 = Start 𝑠𝑘 − 𝑗
𝑜 × size 𝑠𝑘
54
D size =10 A size =1 C B 6 6 10 time
v(t)=5½
Eligible 𝑠𝑘, 𝑗 = Start 𝑠𝑘 − 𝑗
𝑜 × size 𝑠𝑘
54
D size =10 A size =1 C B 6 6 10 time
v(t)=5½
Eligible 𝑠𝑘, 𝑗 = Start 𝑠𝑘 − 𝑗
𝑜 × size 𝑠𝑘
54
D size =10 A size =1 C B 6 6 10 time
v(t)=5½
Eligible 𝑠𝑘, 𝑗 = Start 𝑠𝑘 − 𝑗
𝑜 × size 𝑠𝑘
6 6
54
D size =10 A size =1 C B 7 6 10 10 time
v(t)=6
Eligible 𝑠𝑘, 𝑗 = Start 𝑠𝑘 − 𝑗
𝑜 × size 𝑠𝑘
55
D size =10 A size =1 C B 7 7 10 10 time
v(t)=6½
Eligible 𝑠𝑘, 𝑗 = Start 𝑠𝑘 − 𝑗
𝑜 × size 𝑠𝑘
56
57
57
57
57
57
58
58
Pessimistic cost estimation
58
Compare 2DFQ to WFQ and WF²Q Discrete event simulator with Azure Storage workloads More experiment results in the paper, evaluating:
59
60
50 tenants with size ≈ 1
60
50 tenants with size ≈ 1
50 tenants with size ≈ 1000
60
50 tenants with size ≈ 1
50 tenants with size ≈ 1000 16 threads 1000 units/second Costs known by scheduler
60
50 tenants with size ≈ 1 50 tenants with size ≈ 1000 16 threads 1000 units/second Costs known by scheduler
60
50 tenants with size ≈ 1 50 tenants with size ≈ 1000 16 threads 1000 units/second Costs known by scheduler
60
50 tenants with size ≈ 1 50 tenants with size ≈ 1000 16 threads 1000 units/second Costs known by scheduler
60
50 tenants with size ≈ 1 50 tenants with size ≈ 1000 16 threads 1000 units/second Costs known by scheduler
60
50 tenants with size ≈ 1 50 tenants with size ≈ 1000 16 threads 1000 units/second Costs known by scheduler
60
50 tenants with size ≈ 1 50 tenants with size ≈ 1000 16 threads 1000 units/second Costs known by scheduler
60
250 Azure Storage tenants 32 threads 1 million units/second Costs known by scheduler
61
250 Azure Storage tenants 32 threads 1 million units/second Costs known by scheduler
61
250 Azure Storage tenants 32 threads 1 million units/second Costs known by scheduler
T1
61
250 Azure Storage workloads 32 threads 1 million units/second Costs known by scheduler
T1
62
250 Azure Storage workloads 32 threads 1 million units/second Costs known by scheduler
T1
62
250 Azure Storage workloads 32 threads 1 million units/second Costs known by scheduler
T1
62
250 Azure Storage workloads 32 threads 1 million units/second Costs known by scheduler
T1
62
250 Azure Storage workloads 32 threads 1 million units/second Costs known by scheduler
T1
62
250 Azure Storage workloads 32 threads 1 million units/second Costs known by scheduler
T1
62
250 Azure Storage workloads 32 threads 1 million units/second Costs known by scheduler
T1
62
250 Azure Storage workloads 32 threads 1 million units/second Costs known by scheduler
T1
62
Unpredictable Workloads Widely Varying Costs Quality Of Service
63
Unpredictable Workloads Widely Varying Costs Quality Of Service
63
Unpredictable Workloads Widely Varying Costs Quality Of Service
63
Unpredictable Workloads Widely Varying Costs Quality Of Service
63
Predictable 2/3 predictable 1/3 unpredictable 1/3 predictable 2/3 unpredictable
T1 T1 T1
64
Predictable 2/3 predictable 1/3 unpredictable 1/3 predictable 2/3 unpredictable
T1 T1 T1
64
Predictable 2/3 predictable 1/3 unpredictable 1/3 predictable 2/3 unpredictable
T1 T1 T1
64
Predictable 2/3 predictable 1/3 unpredictable 1/3 predictable 2/3 unpredictable
T1 T1 T1
64
Predictable 2/3 predictable 1/3 unpredictable 1/3 predictable 2/3 unpredictable
T1 T1 T1
64
Predictable 2/3 predictable 1/3 unpredictable 1/3 predictable 2/3 unpredictable
65
Predictable 2/3 predictable 1/3 unpredictable 1/3 predictable 2/3 unpredictable
65
Predictable 2/3 predictable 1/3 unpredictable 1/3 predictable 2/3 unpredictable
65
Predictable 2/3 predictable 1/3 unpredictable 1/3 predictable 2/3 unpredictable
65
66
More threads → Opportunity to reduce burstiness
66
More threads → Opportunity to reduce burstiness
Partitions requests across threads by size
66
More threads → Opportunity to reduce burstiness
Partitions requests across threads by size Co-locates unpredictable and expensive workloads
66
More threads → Opportunity to reduce burstiness
Partitions requests across threads by size Co-locates unpredictable and expensive workloads
Unpredictable Workloads Widely Varying Costs Quality Of Service
66
More threads → Opportunity to reduce burstiness
Partitions requests across threads by size Co-locates unpredictable and expensive workloads Less burstiness Reduced tail latency
Unpredictable Workloads Widely Varying Costs Quality Of Service
66