the LIGHT behind the illumination the LIGHT behind the illumination
The maths behind microscaling
-
Upload
liz-rice -
Category
Technology
-
view
161 -
download
0
Transcript of The maths behind microscaling
![Page 1: The maths behind microscaling](https://reader031.fdocuments.us/reader031/viewer/2022030318/5a6479ba7f8b9a2c568b4853/html5/thumbnails/1.jpg)
The Maths behind Microscaling
Liz Rice@lizrice | @microscaling
![Page 2: The maths behind microscaling](https://reader031.fdocuments.us/reader031/viewer/2022030318/5a6479ba7f8b9a2c568b4853/html5/thumbnails/2.jpg)
What is Microscaling?AssumptionsSome theory
Some experiments
![Page 3: The maths behind microscaling](https://reader031.fdocuments.us/reader031/viewer/2022030318/5a6479ba7f8b9a2c568b4853/html5/thumbnails/3.jpg)
What is Microscaling?
![Page 4: The maths behind microscaling](https://reader031.fdocuments.us/reader031/viewer/2022030318/5a6479ba7f8b9a2c568b4853/html5/thumbnails/4.jpg)
Traffic spike
![Page 5: The maths behind microscaling](https://reader031.fdocuments.us/reader031/viewer/2022030318/5a6479ba7f8b9a2c568b4853/html5/thumbnails/5.jpg)
Too much work
Spare capacity
![Page 6: The maths behind microscaling](https://reader031.fdocuments.us/reader031/viewer/2022030318/5a6479ba7f8b9a2c568b4853/html5/thumbnails/6.jpg)
container scaling
work
performance metrics
![Page 7: The maths behind microscaling](https://reader031.fdocuments.us/reader031/viewer/2022030318/5a6479ba7f8b9a2c568b4853/html5/thumbnails/7.jpg)
work
performance metrics
container scaling
VM autoscaling
![Page 8: The maths behind microscaling](https://reader031.fdocuments.us/reader031/viewer/2022030318/5a6479ba7f8b9a2c568b4853/html5/thumbnails/8.jpg)
OrchestrationCattle not pets
Heterogenous services
![Page 9: The maths behind microscaling](https://reader031.fdocuments.us/reader031/viewer/2022030318/5a6479ba7f8b9a2c568b4853/html5/thumbnails/9.jpg)
True for regular autoscaling tooVMs take much longer to scale
![Page 10: The maths behind microscaling](https://reader031.fdocuments.us/reader031/viewer/2022030318/5a6479ba7f8b9a2c568b4853/html5/thumbnails/10.jpg)
Performance targets
![Page 11: The maths behind microscaling](https://reader031.fdocuments.us/reader031/viewer/2022030318/5a6479ba7f8b9a2c568b4853/html5/thumbnails/11.jpg)
How many containers?
Request processing time
Rate of requestsknown?
predictable?
![Page 12: The maths behind microscaling](https://reader031.fdocuments.us/reader031/viewer/2022030318/5a6479ba7f8b9a2c568b4853/html5/thumbnails/12.jpg)
performance target
actual performance
error
time t
![Page 13: The maths behind microscaling](https://reader031.fdocuments.us/reader031/viewer/2022030318/5a6479ba7f8b9a2c568b4853/html5/thumbnails/13.jpg)
performance target ptime t
actual performance x
e(t) = x(t) - p(t)
e(t) → 0
error e
![Page 14: The maths behind microscaling](https://reader031.fdocuments.us/reader031/viewer/2022030318/5a6479ba7f8b9a2c568b4853/html5/thumbnails/14.jpg)
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](https://reader031.fdocuments.us/reader031/viewer/2022030318/5a6479ba7f8b9a2c568b4853/html5/thumbnails/15.jpg)
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](https://reader031.fdocuments.us/reader031/viewer/2022030318/5a6479ba7f8b9a2c568b4853/html5/thumbnails/16.jpg)
Time delaysIt’s a dynamical system
![Page 17: The maths behind microscaling](https://reader031.fdocuments.us/reader031/viewer/2022030318/5a6479ba7f8b9a2c568b4853/html5/thumbnails/17.jpg)
Woah, the future!
error e
time t
d(t) is proportional to e(t + T)
T
d
![Page 18: The maths behind microscaling](https://reader031.fdocuments.us/reader031/viewer/2022030318/5a6479ba7f8b9a2c568b4853/html5/thumbnails/18.jpg)
![Page 19: The maths behind microscaling](https://reader031.fdocuments.us/reader031/viewer/2022030318/5a6479ba7f8b9a2c568b4853/html5/thumbnails/19.jpg)
Control theory!
![Page 20: The maths behind microscaling](https://reader031.fdocuments.us/reader031/viewer/2022030318/5a6479ba7f8b9a2c568b4853/html5/thumbnails/20.jpg)
![Page 21: The maths behind microscaling](https://reader031.fdocuments.us/reader031/viewer/2022030318/5a6479ba7f8b9a2c568b4853/html5/thumbnails/21.jpg)
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](https://reader031.fdocuments.us/reader031/viewer/2022030318/5a6479ba7f8b9a2c568b4853/html5/thumbnails/22.jpg)
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](https://reader031.fdocuments.us/reader031/viewer/2022030318/5a6479ba7f8b9a2c568b4853/html5/thumbnails/23.jpg)
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](https://reader031.fdocuments.us/reader031/viewer/2022030318/5a6479ba7f8b9a2c568b4853/html5/thumbnails/24.jpg)
Which values for K?Discrete containers?
![Page 25: The maths behind microscaling](https://reader031.fdocuments.us/reader031/viewer/2022030318/5a6479ba7f8b9a2c568b4853/html5/thumbnails/25.jpg)
Simulator
![Page 26: The maths behind microscaling](https://reader031.fdocuments.us/reader031/viewer/2022030318/5a6479ba7f8b9a2c568b4853/html5/thumbnails/26.jpg)
It works!But it’s non-trivial to tune
![Page 27: The maths behind microscaling](https://reader031.fdocuments.us/reader031/viewer/2022030318/5a6479ba7f8b9a2c568b4853/html5/thumbnails/27.jpg)
Known behaviours
Machine learning
![Page 28: The maths behind microscaling](https://reader031.fdocuments.us/reader031/viewer/2022030318/5a6479ba7f8b9a2c568b4853/html5/thumbnails/28.jpg)
Container parameters =
metadata
Talk to us about advantages of container labelling
![Page 29: The maths behind microscaling](https://reader031.fdocuments.us/reader031/viewer/2022030318/5a6479ba7f8b9a2c568b4853/html5/thumbnails/29.jpg)
github.com/microscalingapp.microscaling.com
Liz Rice@lizrice | @microscaling