the maths behind microscaling

29
The Maths behind Microscaling Liz Rice @lizrice | @microscaling

Upload: liz-rice

Post on 21-Jan-2018

160 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: The maths behind microscaling

The Maths behind Microscaling

Liz Rice@lizrice | @microscaling

Page 2: The maths behind microscaling

What is Microscaling?AssumptionsSome theory

Some experiments

Page 3: The maths behind microscaling

What is Microscaling?

Page 4: The maths behind microscaling

Traffic spike

Page 5: The maths behind microscaling

Too much work

Spare capacity

Page 6: The maths behind microscaling

container scaling

work

performance metrics

Page 7: The maths behind microscaling

work

performance metrics

container scaling

VM autoscaling

Page 8: The maths behind microscaling

OrchestrationCattle not pets

Heterogenous services

Page 9: The maths behind microscaling

True for regular autoscaling tooVMs take much longer to scale

Page 10: The maths behind microscaling

Performance targets

Page 11: The maths behind microscaling

How many containers?

Request processing time

Rate of requestsknown?

predictable?

Page 12: The maths behind microscaling

performance target

actual performance

error

time t

Page 13: The maths behind microscaling

performance target ptime t

actual performance x

e(t) = x(t) - p(t)

e(t) → 0

error e

Page 14: The maths behind microscaling

x(t) is proportional to n(t)

n(t) = k x(t)

error e

time t

num

ber o

f con

tain

ers

n

Page 15: The maths behind microscaling

x(t) is proportional to n(t)

nope!

error e

time t

num

ber o

f con

tain

ers

n

d(t) is proportional to e(t)

d

Page 16: The maths behind microscaling

Time delaysIt’s a dynamical system

Page 17: The maths behind microscaling

Woah, the future!

error e

time t

d(t) is proportional to e(t + T)

T

d

Page 18: The maths behind microscaling
Page 19: The maths behind microscaling

Control theory!

Page 20: The maths behind microscaling
Page 21: The maths behind microscaling

error e

time t

Proportional term

d(t) = Kp e(t)

The further we are from targetthe more containers we need

Page 22: The maths behind microscaling

error e

time t

Derivative term

The faster we approach targetthe fewer containers we need

d(t) = Kp e(t) + Kd ė(t)

Page 23: The maths behind microscaling

error e

time t

Integral term

d(t) = Kp e(t) + Kd ė(t) + Ki e(t)

Offset errors accumulated over time

Page 24: The maths behind microscaling

Which values for K?Discrete containers?

Page 25: The maths behind microscaling

Simulator

Page 26: The maths behind microscaling

It works!But it’s non-trivial to tune

Page 27: The maths behind microscaling

Known behaviours

Machine learning

Page 28: The maths behind microscaling

Container parameters =

metadata

Talk to us about advantages of container labelling

Page 29: The maths behind microscaling

github.com/microscalingapp.microscaling.com

Liz Rice@lizrice | @microscaling