The maths behind microscaling

Preview:

Citation preview

The Maths behind Microscaling

Liz Rice@lizrice | @microscaling

What is Microscaling?AssumptionsSome theory

Some experiments

What is Microscaling?

Traffic spike

Too much work

Spare capacity

container scaling

work

performance metrics

work

performance metrics

container scaling

VM autoscaling

OrchestrationCattle not pets

Heterogenous services

True for regular autoscaling tooVMs take much longer to scale

Performance targets

How many containers?

Request processing time

Rate of requestsknown?

predictable?

performance target

actual performance

error

time t

performance target ptime t

actual performance x

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

e(t) → 0

error e

x(t) is proportional to n(t)

n(t) = k x(t)

error e

time t

num

ber o

f con

tain

ers

n

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

Time delaysIt’s a dynamical system

Woah, the future!

error e

time t

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

T

d

Control theory!

error e

time t

Proportional term

d(t) = Kp e(t)

The further we are from targetthe more containers we need

error e

time t

Derivative term

The faster we approach targetthe fewer containers we need

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

error e

time t

Integral term

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

Offset errors accumulated over time

Which values for K?Discrete containers?

Simulator

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

Known behaviours

Machine learning

Container parameters =

metadata

Talk to us about advantages of container labelling

github.com/microscalingapp.microscaling.com

Liz Rice@lizrice | @microscaling

Recommended