Nice to meet you! The Network Matters Cloud-based applications - - PowerPoint PPT Presentation

nice to meet you the network matters
SMART_READER_LITE
LIVE PREVIEW

Nice to meet you! The Network Matters Cloud-based applications - - PowerPoint PPT Presentation

Competitive Clustering of Stochastic Communication Patterns on the Ring Chen Avin Louis Cohen Stefan Schmid Nice to meet you! The Network Matters Cloud-based applications generate significant network traffic E.g., scale-out


slide-1
SLIDE 1

Competitive Clustering of Stochastic Communication Patterns on the Ring

Chen Avin Louis Cohen Stefan Schmid

Nice to meet you!

slide-2
SLIDE 2

The Network Matters

❏ Cloud-based applications generate significant network traffic

❏ E.g., scale-out databases, streaming, batch processing applications

❏ E.g., Hadoop Terrasort job:

Shuffle phase

slide-3
SLIDE 3

Example: VM Placememt

❏ Virtual machine placement affects bandwidth costs ❏ Example: map reduce in Clos datacenter

slide-4
SLIDE 4

❏ Virtual machine placement affects bandwidth costs ❏ Example: map reduce in Clos datacenter

Example: VM Placememt

mappers tenant 1 mappers tenant 2 reducers tenant 1 reducers tenant 2

slide-5
SLIDE 5

❏ Virtual machine placement affects bandwidth costs ❏ Example: map reduce in Clos datacenter

Example: VM Placememt

mappers tenant 1 mappers tenant 2 reducers tenant 1 reducers tenant 2

Distributed across pods: costly shuffling!

slide-6
SLIDE 6

❏ Virtual machine placement affects bandwidth costs ❏ Example: map reduce in Clos datacenter

Example: VM Placememt

mappers tenant 1 reducers tenant 1 mappers tenant 2 reducers tenant 2

Locally clustered within a rack or pod: efficient!

slide-7
SLIDE 7

❏ Virtual machine placement affects bandwidth costs ❏ Example: map reduce in Clos datacenter

Example: VM Placememt

mappers tenant 1 reducers tenant 1 mappers tenant 2 reducers tenant 2

Locally clustered within a rack or pod: efficient!

Communication patterns are

  • ften clustered (but can change
  • ver time).
slide-8
SLIDE 8

How to support local communication?

slide-9
SLIDE 9

Option 1: Change the topology (?!)

How to support local communication?

slide-10
SLIDE 10

Option 1: Change the topology (?!)

❏ Theory of demand-aware networks ❏ Prototypes emerging: e.g., ProjectToR (SIGCOMM 2016) ❏ Based on lasers and mirrors

How to support local communication?

slide-11
SLIDE 11

Option 1: Change the topology (?!)

❏ Theory of demand-aware networks ❏ Prototypes emerging: e.g., ProjectToR (SIGCOMM 2016) ❏ Based on lasers and mirrors

How to support local communication?

We are working on it! E.g., „SplayNets @ TON 2016“. But not today!

slide-12
SLIDE 12

Option 2: Cluster the nodes

❏ Migrate frequently communicating nodes closer together

Option 1: Change the topology (?!)

❏ Theory of demand-aware networks ❏ Prototypes emerging: e.g., ProjectToR (SIGCOMM 2016) ❏ Based on lasers and mirrors

How to support local communication?

slide-13
SLIDE 13

Option 2: Cluster the nodes

❏ Migrate frequently communicating nodes closer together

Option 1: Change the topology (?!)

❏ Theory of demand-aware networks ❏ Prototypes emerging: e.g., ProjectToR (SIGCOMM 2016) ❏ Based on lasers and mirrors

How to support local communication?

Today!

slide-14
SLIDE 14

Option 2: Cluster the nodes

❏ Migrate frequently communicating nodes closer together

Option 1: Change the topology (?!)

❏ Theory of demand-aware networks ❏ Prototypes emerging: e.g., ProjectToR (SIGCOMM 2016) ❏ Based on lasers and mirrors

❏ Challenges of communication pattern clustering: ❏ Communication patterns are not known ahead of time… ❏ … and may even change over time!

How to support local communication?

slide-15
SLIDE 15

Option 2: Cluster the nodes

❏ Migrate frequently communicating nodes closer together

Option 1: Change the topology (?!)

❏ Theory of demand-aware networks ❏ Prototypes emerging: e.g., ProjectToR (SIGCOMM 2016) ❏ Based on lasers and mirrors

❏ Challenges of communication pattern clustering: ❏ Communication patterns are not known ahead of time… ❏ … and may even change over time!

How to support local communication?

Thus: Need to repartition clusters in an online manner, depending on demand!

slide-16
SLIDE 16

❏ Example: 4 clusters of size 4

Example: A RePartitioning Problem

How to cluster?

slide-17
SLIDE 17

❏ Example: 4 clusters of size 4

Example: A RePartitioning Problem

Thickness of line = amount

  • f communication

How to cluster?

slide-18
SLIDE 18

❏ Example: 4 clusters of size 4

Example: A RePartitioning Problem

slide-19
SLIDE 19

❏ Example: 4 clusters of size 4

Example: A RePartitioning Problem

Most communication within cluster (intra-cluster)… … little inter-cluster communication.

slide-20
SLIDE 20

❏ Example: 4 clusters of size 4

Example: A RePartitioning Problem

3 1 5 2 6 4 ❏ Now assume: changes in communication pattern!

❏ E.g., more communication (1,3),(3,4),(2,5) but less (5,6)

slide-21
SLIDE 21

❏ Example: 4 clusters of size 4

Example: A RePartitioning Problem

3 1 5 2 6 4 ❏ Now assume: changes in communication pattern!

❏ E.g., more communication (1,3),(3,4),(2,5) but less (5,6)

1 5

slide-22
SLIDE 22

❏ Example: 4 clusters of size 4

Example: A RePartitioning Problem

3 1 5 2 6 4 ❏ Now assume: changes in communication pattern!

❏ E.g., more communication (1,3),(3,4),(2,5) but less (5,6) Nodes 1 and 5 change clusters!

1 5

slide-23
SLIDE 23

A simple and fundamental model (e.g., a rack):

Online RePartitioning

servers („clusters“) size k („# slots“)

slide-24
SLIDE 24

A simple and fundamental model (e.g., a rack):

Online RePartitioning

servers („clusters“) size k („# slots“)

Minimize inter-cluster communication… … maximize intra-cluster communication!

slide-25
SLIDE 25

A simple and fundamental model (e.g., a rack):

Online RePartitioning

servers („clusters“) size k („# slots“)

Minimize inter-cluster communication… … maximize intra-cluster communication! Also: minimize migrations (=swap)!

slide-26
SLIDE 26

A simple and fundamental model:

Online RePartitioning

servers („clusters“) size k („# slots“)

Minimize inter-cluster communication… … maximize intra-cluster communication! Also: minimize migrations (=swap)!

In practice: k << (many more servers than VM slots per server)!

slide-27
SLIDE 27

Problem inputs: k, ,

Online RePartitioning

Communication pattern over time

slide-28
SLIDE 28

Problem inputs: k, ,

Online RePartitioning

Objective:

1 α

Costs:

slide-29
SLIDE 29

Problem inputs: k, ,

Online RePartitioning

Objective:

1 α

Costs:

Two flavors: (1) online (worst-case) pattern (2) learning: from a fixed (unkown) distribution

slide-30
SLIDE 30

The Crux: Algorithmic Challenges

A) Serve remotely or migrate (“rent or buy”)? When to migrate? If a communication pattern is short-lived, it may not be worthwhile to collocate the nodes: the migration cost cannot be amortized.

slide-31
SLIDE 31

The Crux: Algorithmic Challenges

A) Serve remotely or migrate (“rent or buy”)? When to migrate? If a communication pattern is short-lived, it may not be worthwhile to collocate the nodes: the migration cost cannot be amortized. B) Where to migrate, and what? If nodes should be collocated, the question becomes where. Should the first node be migrated to the cluster of the second or vice versa? Or shall both be moved together to a new cluster? Moreover, an algorithm may be required to pro-actively migrate (resp. swap) additional nodes.

slide-32
SLIDE 32

The Crux: Algorithmic Challenges

A) Serve remotely or migrate (“rent or buy”)? When to migrate? If a communication pattern is short-lived, it may not be worthwhile to collocate the nodes: the migration cost cannot be amortized. B) Where to migrate, and what? If nodes should be collocated, the question becomes where. Should the first node be migrated to the cluster of the second or vice versa? Or shall both be moved together to a new cluster? Moreover, an algorithm may be required to pro-actively migrate (resp. swap) additional nodes. C) Which nodes to evict? There may not exist sufficient space in the desired destination cluster. In this case, the algorithm needs to decide which nodes to evict, to free up space.

slide-33
SLIDE 33

Online Variant: Competitive Ratio and Augmentation

❏ Goal: minimize competitive ratio

slide-34
SLIDE 34

❏ Goal: minimize competitive ratio ❏ Two flavors: without and with augmentation

Online Variant: Competitive Ratio and Augmentation

slide-35
SLIDE 35

Let’s first look at special case: k=2

slide-36
SLIDE 36

Let’s first look at special case: k=2

Need to find pairs!

slide-37
SLIDE 37

Let’s first look at special case: k=2

Clusters of size 2: A new type of online matching problem!

Need to find pairs!

slide-38
SLIDE 38

Special Cases: =2

slide-39
SLIDE 39

Special Cases: =2

2 Clusters: A generalization of online caching!

slide-40
SLIDE 40

Special Cases: =2 (“Online Caching”)

cache disk

❏ For 2 clusters: can emulate

  • nline caching!

❏ k items, cache size k-1

Models cache Models disk

slide-41
SLIDE 41

Special Cases: =2 (“Online Caching”)

cache disk

… plus some dummy item

k-1

Cache…

d ❏ For 2 clusters: can emulate

  • nline caching!

❏ k items, cache size k-1

slide-42
SLIDE 42

❏ For 2 clusters: can emulate

  • nline caching!

❏ k items, cache size k-1

❏ When item i is requested in

  • riginal caching problem:

❏ Introduce many requests between d and i: forces i to cache (if it is not yet)

cache disk

k-1 d i

Special Cases: =2 (“Online Caching”)

slide-43
SLIDE 43

❏ For 2 clusters: can emulate

  • nline caching!

❏ k items, cache size k-1

❏ When item i is requested in

  • riginal caching problem:

❏ Introduce many requests between d and i: forces i to cache (if it is not yet) ❏ Which one to evict? Caching problem!

cache disk

k-1 d i

Special Cases: =2 (“Online Caching”)

slide-44
SLIDE 44

❏ For 2 clusters: can emulate

  • nline caching!

❏ k items, cache size k-1

❏ When item i is requested in

  • riginal caching problem:

❏ Introduce many requests between d and i: forces i to cache (if it is not yet) ❏ Which one to evict? Caching problem! ❏ Note: add many requests between d and nodes currently in cache: d stays in cache

cache disk

k-1 d i

Special Cases: =2 (“Online Caching”)

slide-45
SLIDE 45

❏ For 2 clusters: can emulate

  • nline caching!

❏ k items, cache size k-1

❏ When item i is requested in

  • riginal caching problem:

❏ Introduce many requests between d and i: forces i to cache (if it is not yet) ❏ Which one to evict? Caching problem! ❏ Note: add many requests between d and nodes currently in cache: d stays in cache

cache disk

k-1 d i

Lower bound k follows from caching!

Special Cases: =2 (“Online Caching”)

slide-46
SLIDE 46

Intriguing: Lower bound even with augmentation!

slide-47
SLIDE 47

❏ Assume: requests only from a certain (ring) order

Intriguing: Lower bound even with augmentation!

slide-48
SLIDE 48

❏ Assume: requests only from a certain (ring) order ❏ Adversarial strategy: Whatever ON does, adversary will ask cut edge (exists even with augmentation): pays 1 each time!

Intriguing: Lower bound even with augmentation!

Ouch!

slide-49
SLIDE 49

❏ Assume: requests only from a certain (ring) order ❏ Adversarial strategy: Whatever ON does, adversary will ask cut edge (exists even with augmentation): pays 1 each time! ❏ Note: Adversarial request sequence only depends on ON! So online algo cannot learn anything about OFF.

Intriguing: Lower bound even with augmentation!

Ouch!

slide-50
SLIDE 50

❏ Assume: requests only from a certain (ring) order ❏ Adversarial strategy: Whatever ON does, adversary will ask cut edge (exists even with augmentation): pays 1 each time! ❏ Note: Adversarial request sequence only depends on ON! So online algo cannot learn anything about OFF. ❏ OFF can safely move to a partition which will be asked least frequently (once and forever)! Pigeon-hole principle: pays only every k-th time (i.e. k times less)

Intriguing: Lower bound even with augmentation!

Ouch!

slide-51
SLIDE 51

❏ k=2 (online matching)

❏ Greedy algorithm 7-competitive ❏ Lower bound: 3-competitive

  • competitive algorithm CREP for 4-augmentation

❏ based on on growing components

Online RePartitioning: Overview of Results

slide-52
SLIDE 52

❏ k=2 (online matching)

❏ Greedy algorithm 7-competitive ❏ Lower bound: 3-competitive

  • competitive algorithm CREP for 4-augmentation

❏ based on on growing components

Online RePartitioning: Overview of Results

Open question: what about less augmentation?

slide-53
SLIDE 53

Learning Variant

❏ Adversary cannot choose request sequence but only the distribution

❏ Adversary needs to sample i.i.d. from this distribution ❏ Moreover: Adversary knows (deterministic or randomized) «learning» algorithm

slide-54
SLIDE 54

w2 w3 w4 w5 w6 w7 w8 w9 w10 w11 w12

Learning Variant

❏ Adversary cannot choose request sequence but only the distribution

❏ Adversary needs to sample i.i.d. from this distribution ❏ Moreover: Adversary knows (deterministic or randomized) «learning» algorithm

❏ Let’s start simple: communication along ring only

❏ I.e., adversary picks distribution over ring

w1

slide-55
SLIDE 55

w2 w3 w4 w5 w6 w7 w8 w9 w10 w11 w12

Learning Variant

❏ Adversary cannot choose request sequence but only the distribution

❏ Adversary needs to sample i.i.d. from this distribution ❏ Moreover: Adversary knows (deterministic or randomized) «learning» algorithm

❏ Let’s start simple: communication along ring only

❏ I.e., adversary picks distribution over ring

w1

Avoid high-weight edges on the cut!

slide-56
SLIDE 56

The Crux: Joint Optimization of Efficient Learning and Searching

❏ Naive idea 1: Take it easy and first learn distribution

❏ Do not move but just sample requests in the beginning: until exact distribution has been learned whp ❏ Then move to the best location for good

slide-57
SLIDE 57

The Crux: Joint Optimization of Efficient Learning and Searching

❏ Naive idea 1: Take it easy and first learn distribution

❏ Do not move but just sample requests in the beginning: until exact distribution has been learned whp ❏ Then move to the best location for good

Waiting can be very costly: maybe start configuration is very bad and

  • thers similarly good! Not

competitive! Need to move early on, away from bad locations!

slide-58
SLIDE 58

The Crux: Joint Optimization of Efficient Learning and Searching

❏ Naive idea 1: Take it easy and first learn distribution

❏ Do not move but just sample requests in the beginning: until exact distribution has been learned whp ❏ Then move to the best location for good

❏ Naive idea 2: Pro-actively always move to the lowest cost configuration seen so far

slide-59
SLIDE 59

The Crux: Joint Optimization of Efficient Learning and Searching

❏ Naive idea 1: Take it easy and first learn distribution

❏ Do not move but just sample requests in the beginning: until exact distribution has been learned whp ❏ Then move to the best location for good

❏ Naive idea 2: Pro-actively always move to the lowest cost configuration seen so far

Bad: if requests are uniform at random, you should not move! Migration costs cannot be

  • amortized. Crucial difference to

classic distribution learning problems: guessing costs!

slide-60
SLIDE 60

The Crux: Joint Optimization of Efficient Learning and Searching

❏ Naive idea 1: Take it easy and first learn distribution

❏ Do not move but just sample requests in the beginning: until exact distribution has been learned whp ❏ Then move to the best location for good

❏ Naive idea 1: Pro-actively always move to the lowest cost configuration seen so far

❏ Bad, e.g., if requests are distributed uniformly at random: better not to move at all (moving costs cannot be amortized) Only move when it pays off! But e.g., how to differentiate between uniform and „almost uniform“ distribution?

slide-61
SLIDE 61

Learning Algorithm: Rotate Locally!

❏ Mantra of our algorithm: Rotate! ❏ Rotate early, but not too early! ❏ And: rotate locally

slide-62
SLIDE 62

Learning Algorithm: Rotate Locally!

❏ Mantra of our algorithm: Rotate! ❏ Rotate early, but not too early! ❏ And: rotate locally

Define conditions for configurations: if met, never go back to it (we can afford it w.h.p.: seen enough samples)

slide-63
SLIDE 63

Learning Algorithm: Rotate Locally!

❏ Mantra of our algorithm: Rotate! ❏ Rotate early, but not too early! ❏ And: rotate locally

If current configuration is eliminated, go to nearby configuration (in directed manner: no frequent back and forth)!

slide-64
SLIDE 64

Learning Algorithm: Rotate Locally!

❏ Mantra of our algorithm: Rotate! ❏ Rotate early, but not too early! ❏ And: rotate locally

If current configuration is eliminated, go to nearby configuration (in directed manner: no frequent back and forth)! Growing radius strategy: allow to move further only

  • nce amortized!
slide-65
SLIDE 65

Learning Algorithm: Rotate Locally!

❏ Mantra: Rotate! ❏ Rotate early, but not too early! ❏ And: rotate locally

If current configuration is eliminated, go to nearby configuration (in directed manner: no frequent back and forth)! Growing radius strategy: allow to move further only

  • nce amortized!

log(n)-competitive w.h.p.

slide-66
SLIDE 66

Conclusion

❏ Dynamic repartitioning: a natural new problem! ❏ Competitive ratio super-linear in k: ok in practice (independent of number of servers!) ❏ Open questions:

❏ Online variant: With less augmentation? Randomized? ❏ Learning variant: General communication pattern, beyond ring?