-
Notifications
You must be signed in to change notification settings - Fork 5
/
slides.tex
997 lines (685 loc) · 17.3 KB
/
slides.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
\startmode[presentation]
\setuppapersize[SW][SW]
\setuplayout[
topspace=5pt,
backspace=20pt,
width=middle,
height=middle,
header=140pt,
footer=14pt,
footerdistance=3pt,
bottomspace=1pt
]
\setupcolors[state=start]
\setuppagenumber[state=stop]
\setupbackgrounds[page][background=color, backgroundcolor=white]
\usemodule[simplefonts]
\setmainfont[Source Sans Pro]
\define[1]\SlideTitle{
\midaligned{ \tfb #1 }
}
% Slide macros
\def\startSlide{\directsetup{slide:start}}
\def\stopSlide{\directsetup{slide:stop}}
\startsetups slide:start
\start
\switchtobodyfont[24pt]
\stopsetups
\startsetups slide:stop
\page
\stop
\stopsetups
\setupfootertexts[][@AllanEspinosa]
\defineparagraphs[TwoColumns][n=2,before=\blank]
\stopmode
\startmode[manuscript]
\setupframedtexts[location=middle, before={\blank[line]},
after={\blank[line]}]
\let\startSlide\startframedtext
\let\stopSlide\stopframedtext
\define[1]\SlideTitle{\midaligned{\bf #1}\blank[small]}
\stopmode
\def\startNote{\startmode[manuscript]}
\starttext
\startmode[presentation]
\defineoverlay[titlePage][{\externalfigure[kubecon-template.pdf][page=1,width=\pagewidth]}]
\setupbackgrounds[page][background=titlePage]
\stopmode
\startSlide
\setupfooter[state=stop]
\dontleavehmode
\startcolor[white]
\vfill
\SlideTitle{Autoscaling Containers\ldots with Math}
\midaligned{ @AllanEspinosa }
\stopcolor
\vfill
\stopSlide
\startmode[presentation]
\defineoverlay[template][{\externalfigure[kubecon-template.pdf][page=2,width=\pagewidth]}]
\setupbackgrounds[page][background=template]
\stopmode
\startSlide
\startTwoColumns
\externalfigure[https://images-na.ssl-images-amazon.com/images/I/51xkdqGcykL.jpg][height=\textheight]
\TwoColumns
\SlideTitle{@AllanEspinosa}
{\tfx
\useURL[mybook][https://amzn.com/1785886800]
\from[mybook]
}
\externalfigure[book-qrcode.png]
\stopTwoColumns
\stopSlide
\startSlide
\midaligned{
\externalfigure[kube-cookbook.png][height=\textheight]
}
\stopSlide
\startSlide
\SlideTitle{Your Distributed System}
\tfx
\startMPcode
.PS
arrowht = 0.2
arrowwid = 0.1
linethick = 2
linewid = 1.5
"Goal" at Here rjust
line right ->
ellipse "OPS Person" wid 1.5 ht 0.9
line right -> "Twiddle" above
box "Server Farm" wid 1.5 ht 0.9
line right 2 ->; "CPU Utilization" ljust
line from last line.c down 1.5 then left ->
box "Monitoring" wid 1.5 ht 0.9
line from Here to (1st ellipse.s.x, Here.y) then up to 1st ellipse.s -> "Page" ljust
line from 1st box.n up <-
"Traffic" at Here above
.PE
\stopMPcode
\stopSlide
\startNote
Receive load,
monitoring system receives performance metrics. Depending on the thresholds you
set in Nagios, you get paged.
You wake up at 2am. SSH to instances (*gasp!*) or update your Chef environment
attributes. Converge chef. Check if alerts clear.
Then finally go to sleep.
Dynamics where in the state of our system evolves and changes over time due to
several factors.
\stopmode
\startSlide
\SlideTitle{Your Aircon}
\tfx
\startMPcode
.PS
arrowht = 0.2
arrowwid = 0.1
linethick = 2
linewid = 1.5
line right "Set Temperature" above rjust ->
ellipse "Thermostat" wid 1.5 ht 0.9
line right -> "Valve" above
box "Coolant" wid 1.5 ht 0.9
line right 2 "Actual Temperature" above ljust ->
line from last line.c down 1.5 then left ->
box "Sensor" wid 1.5 ht 0.9
line from Here to (1st ellipse.s.x, Here.y) then up to 1st ellipse.s ->
line from 1st box.n up <-
"The Weather" at Here above
.PE
\stopMPcode
\stopSlide
\startNote
Notice how everything look the same. Except for an Ops person being woken up to
adjust the thermostat.
You may have to wake up if you didn't set the thermostat properly. But that's a
different problem for now.
{ \em detect } changes in the environment and { \em respond } to them.
\stopmode
\startSlide
\SlideTitle{Autoscaling}
{\tfx
\startMPcode
.PS
arrowht = 0.2
arrowwid = 0.1
linethick = 2
linewid = 1.0
"Target" at Here rjust
line right 1.0 ->
ellipse "HPA" wid 1.5 ht 0.7
line right 2.5 -> "Number of Pods" above
box "RC" wid 1.5 ht 0.7
line right 2 ->; "Utilization" ljust
line from last line.c down 1.2 then left ->
box "Heapster" wid 1.5 ht 0.7
line from Here to (1st ellipse.s.x, Here.y) then up to 1st ellipse.s -> "Utilization" ljust
line from 1st box.n up <-
"Traffic" at Here above
.PE
\stopMPcode
}
\vfill
{\tfxx
\useURL[kube-docs][http://kubernetes.io/docs/user-guide/horizontal-pod-autoscaling/]
\from[kube-docs]
}
\stopSlide
\startSlide
\vfill
\SlideTitle{Control Theory}
\startitemize
\item influencing dynamical systems
\item corrections based on feedback loops
\item math describes effectiveness
\stopitemize
\vfill
\stopSlide
\startSlide
\startTwoColumns
\externalfigure[https://upload.wikimedia.org/wikipedia/commons/1/1e/Centrifugal_governor.png][height=\textheight]
\TwoColumns
\SlideTitle{Centrifugal Governor}
R. Routledge, {\em Discoveries \& Inventions of the Nineteenth Century}, 13th
edition, 1901.
\stopTwoColumns
\stopSlide
\startSlide
\midaligned{ \externalfigure[maxwell-paper.pdf][page=1,height=\textheight] }
\stopSlide
\startSlide
\startitemize[columns]
\item Target Output
\item Input
\item Output
\item Disturbance
\stopitemize
\tfx
\startMPcode
.PS
arrowht = 0.2
arrowwid = 0.1
linethick = 2
linewid = 2.0
boxwid = 2
boxht = 1.5
"$r(k)$" at Here rjust
line right -> "$+$" above ljust
circle rad 0.18
line right -> "$e(k)$" above
box "$K(z)$"
line right -> "$u(k)$" above
box "$G(z)$"
line right 3.0 ->
"$y(k)$" at Here ljust
move to last line.c
line down boxht then left (Here.x - 1st circle.s.x)
line -> to 1st circle.s "$-$" above ljust
line from last box.n up 1.0 <-
"$d(k)$" above
.PE
\stopMPcode
\vfill
\stopSlide
\startNote
Feedback control or control theory changes the approach in that the output is
the observed behavior. In this case, CPU utilization. The actual workload of
traffic affects the utilization but we can't do that much about it. You can't
stop people from buying thing in your shopping side.
Feedback in a more general term is using what we learned so far and apply it to
the next iteration of our planning. The same goes with the discipline in control
theory.
We have a system where we control the input. Results in certain output. We then
compare it to our desired output and then adjust the input we give to the
system.
In the example in OPS, we have an objective for our system like let's say
maintain 60\% CPU utilization. Our system receives traffic and registers a
corresponding status of its current CPU utilization. When some thresholds are
reached in our alerting system like Nagios or PagerDuty, we wake up at 2am.
We look at what's happening and then decide. Do we continue to sleep or do
something about it? We can add instances. Next we observe and wait for a while
before we finally go back to bed... And finally take the morning off at work.
Similar to our Thermostat controller as well.
In the next few slides, I will talk about several concepts in control theory
on what makes a good automation system. We will look at the basic concept of
autoscaling in Kuberenetes.
Control theory has some math behind it to decide what makes a good feedback
loop.
\stopmode
\startSlide
\externalfigure[controller-code.png][width=\textwidth]
\stopSlide
\startSlide
\externalfigure[autoscaling-demo.png][width=\textwidth]
\stopSlide
\startNote
Kubernetes has a basic facility for autoscaling Replicaton controller based on
CPU utilization. It basically updates the number of instances of your container
based on the rules you set in the HPA API object.
\stopmode
\startSlide
\vfill
\SlideTitle{Linear-Time Invariant Systems}
$$ a \frac{\partial}{\partial t} y(t) + b y(t) = u(t) $$
$$ y(k + 1) = a y(k) + b u(k) $$
\vfill
\stopSlide
\startSlide
\vfill
\SlideTitle{Desired Properties}
\startframedtext[width=0.5\textwidth,location=middle,frame=off]
\startitemize
\item Stability
\item Accuracy
\item Settling time
\item Overshoot
\stopitemize
\stopframedtext
\vfill
\stopSlide
\startSlide
\SlideTitle{Stability}
\startMPcode
u := 800bp / 25;
v := 550bp / 25;
pickup pencircle scaled 1bp;
drawarrow (0,-5v) -- (20u, -5v);
drawarrow (0,-5v) -- (0, 5v);
pickup pencircle scaled 2bp;
draw (0, 0v) -- (20u, 0v) dashed dashpattern(on 0.5u off 0.6u);
for k=0 upto 18:
pickup pencircle scaled 8bp;
y := (-1.08)**(k);
draw (k*u, y*v);
endfor
pickup pencircle scaled 3bp;
draw ( (0, v)
for k=0 upto 18:
-- (k*u, ((-1.08)**k)*v)
endfor );
\stopMPcode
\vfill
\stopSlide
\startSlide
\vfill
\startMPcode
u := 800bp / 25;
v := 600bp / 25;
pickup pencircle scaled 1bp;
drawarrow (0,-v) -- (20u, -v);
drawarrow (0,-v) -- (0, 10v);
pickup pencircle scaled 2bp;
draw (0, 3v) -- (20u, 3v) dashed dashpattern(on 0.5u off 0.6u);
for k=0 upto 18:
pickup pencircle scaled 8bp;
y := (1.12)**(k);
draw (k*u, y*v);
endfor
pickup pencircle scaled 3bp;
draw ( (0, u)
for k=0 upto 18:
-- (k*u, ((1.12)**k)*v)
endfor );
\stopMPcode
\vfill
\stopSlide
\startSlide
\vfill
\startMPcode
u := 800bp / 25;
v := 600bp / 25;
pickup pencircle scaled 1bp;
drawarrow (0,-5v) -- (20u, -5v);
drawarrow (0,-5v) -- (0, 5v);
pickup pencircle scaled 2bp;
draw (0, 0v) -- (20u, 0v) dashed dashpattern(on 0.5u off 0.6u);
for k=0 upto 19:
pickup pencircle scaled 8bp;
y := (-1.0)**(k);
draw (k*u, 3.5y*v);
endfor
pickup pencircle scaled 3bp;
draw ( (0, 3.5v)
for k=0 upto 19:
-- (k*u, 3.5*((-1.0)**k)*v)
endfor );
\stopMPcode
\vfill
\stopSlide
\startSlide
\vfill
\startMPcode
u := 800bp / 25;
v := 600bp / 25;
pickup pencircle scaled 1bp;
drawarrow (0,-5v) -- (20u, -5v);
drawarrow (0,-5v) -- (0, 5v);
pickup pencircle scaled 2bp;
draw (0, 0v) -- (20u, 0v) dashed dashpattern(on 0.5u off 0.6u);
for k=0 upto 19:
pickup pencircle scaled 8bp;
y := (-0.9)**(k);
draw (k*u, 3.5y*v);
endfor
pickup pencircle scaled 3bp;
draw ( (0, 3.5v)
for k=0 upto 19:
-- (k*u, 3.5*((-0.9)**k)*v)
endfor );
\stopMPcode
\vfill
\stopSlide
\startSlide
\vfill
\startuseMPgraphic{stable-error}
u := 800bp / 25;
pickup pencircle scaled 1bp;
drawarrow (0,-5u) -- (20u, -5u);
drawarrow (0,-5u) -- (0, 2u);
pickup pencircle scaled 2bp;
draw (0, -0.5u) -- (20u, -0.5u) dashed dashpattern(on 0.5u off 0.6u);
for k=0 upto 19:
pickup pencircle scaled 8bp;
y := (0.6)**(k);
draw (k*u, -4.5y*u);
endfor
pickup pencircle scaled 3bp;
draw ( (0, -4.5u)
for k=0 upto 19:
-- (k*u, -4.5*((0.6)**k)*u)
endfor );
\stopuseMPgraphic
\useMPgraphic{stable-error}
\vfill
\stopSlide
\startSlide
\vfill
\SlideTitle{Accuracy}
\useMPgraphic{stable-error}
\vfill
\stopSlide
\startmode[manuscript]
Accuracy - did we reach our desired CPU utilization? How much are we off? Since
the workload is not fixed, we need a bit of wiggle room to consider our
autoscaling as good enough. Otherwise we will see oscillations of adding and
subtracting instances all the time.
\stopmode
\startSlide
\SlideTitle{Settling time}
\startMPcode
u := 800bp / 25;
v := 520bp / 25;
pickup pencircle scaled 1bp;
drawarrow (0,-3.3v) -- (20u, -3.3v);
drawarrow (0,-3.3v) -- (0, 2v);
pickup pencircle scaled 2bp;
draw (0, 0.5v) -- (20u, 0.5v) dashed dashpattern(on 0.5u off 0.6u);
for k=0 upto 19:
pickup pencircle scaled 8bp;
y := (0.6)**(k);
draw (k*u, -3.0y*v);
endfor
pickup pencircle scaled 3bp;
draw ( (0, -3.0v)
for k=0 upto 19:
-- (k*u, -3.0*((0.6)**k)*v)
endfor );
\stopMPcode
\vfill
\startMPcode
u := 800bp / 25;
v := 520bp / 25;
pickup pencircle scaled 1bp;
drawarrow (0,-3.3v) -- (20u, -3.3v);
drawarrow (0,-3.3v) -- (0, 2v);
pickup pencircle scaled 2bp;
draw (0, 0.5v) -- (20u, 0.5v) dashed dashpattern(on 0.5u off 0.6u);
for k=0 upto 19:
pickup pencircle scaled 8bp;
y := (0.8)**(k);
draw (k*u, -3.0y*v);
endfor
pickup pencircle scaled 3bp;
draw ( (0, -3.0v)
for k=0 upto 19:
-- (k*u, -3.0*((0.80)**k)*v)
endfor );
\stopMPcode
\stopSlide
\startSlide
\vfill
\SlideTitle{Overshoot}
\startMPcode
u := 800bp / 25;
pickup pencircle scaled 1bp;
drawarrow (0,-5u) -- (20u, -5u);
drawarrow (0,-5u) -- (0, 2u);
pickup pencircle scaled 2bp;
draw (0, -0.5u) -- (20u, -0.5u) dashed dashpattern(on 0.5u off 0.6u);
pair peak;
peak := (5u, 2u);
pickup pencircle scaled 8bp;
draw (0, -4.5u);
draw (u, -3.7u);
draw (2u, -2.5u);
draw (3u, -1.7u);
draw (4u, 0.5u);
draw peak;
draw (6u, 1u);
draw (7u, 0.3u);
draw (8u, 0.1u);
draw (9u, 0);
draw (10u, 0);
draw (11u, 0);
draw (12u, 0);
draw (13u, 0);
draw (14u, 0);
draw (15u, 0);
draw (16u, 0);
draw (17u, 0);
draw (18u, 0);
draw (19u, 0);
pickup pencircle scaled 3bp;
draw (0, -4.5u)
..(u, -3.7u)
.. (2u, -2.5u)
.. (3u, -1.7u)
..(4u, 0.5u)
.. peak
..(6u, 1u)
..(7u, 0.3u)
..(8u, 0.1u)
..(9u, 0)
..(10u, 0)
..(11u, 0)
..(19u, 0);
pickup pencircle scaled 1bp;
drawdblarrow peak - dir(0)*2u -- (5u, -0.5u) - dir(0)*2u;
draw peak-- peak - dir(0)*2.5u;
draw (5u,-0.5u)-- (5u, -0.5u) - dir(0)*2.5u;
label(btex $y$ etex, 1/2 * (peak - dir(0)*2.5u + (5u, -0.5u) - dir(0)*2.5u) );
\stopMPcode
\vfill
\stopSlide
\startSlide
\SlideTitle{Controllers}
\tfxx
\startMPcode
.PS
arrowht = 0.2
arrowwid = 0.1
linethick = 2
linewid = 2.0
boxwid = 2.4
boxht = 1.5
"$r(k)$" at Here rjust
line right 1.5 -> "$+$" above ljust
circle rad 0.18
line right -> "$e(k)$" above
box "$C(z)$"
line right -> "$u(k)$" above
box "$G(z)$"
line right 3 ->
"$y(k)$" at Here ljust
move to last line.c
line down boxht then left (Here.x - 1st circle.s.x)
line -> to 1st circle.s "$-$" above ljust
.PE
\stopMPcode
\startTwoColumns
$$ e(k) = r(k) - y(k)$$
\TwoColumns
$$ u(k) = \sum_{m=-\infty}^\infty c(k-m) e(m) $$
\stopTwoColumns
\stopSlide
\startSlide
\SlideTitle{Proportional Control}
$ u_P(k) = K_P e(k) $
%\externalfigure[proportional.pdf][width=0.8\textwidth]
\startMPcode
u := 800bp / 25;
v := 600bp / 15;
pickup pencircle scaled 1bp;
drawarrow (0,-5v) -- (20u, -5v);
drawarrow (0,-5v) -- (0, 2v);
pickup pencircle scaled 2bp;
reference := -0.5v;
draw (0, reference) -- (20u, reference) dashed dashpattern(on 0.5u off 0.6u);
pair peak;
peak := (5u, 2v);
yk := -1.6v;
yk1 := 1.3v;
pickup pencircle scaled 8bp;
draw (0, -4.5v);
draw (u, -3.8v);
draw (2u, -2.8v);
draw (3u, yk);
draw (4u, yk1);
pickup pencircle scaled 3bp;
draw (0, -4.5v)
.. (u, -3.8v)
.. (2u, -2.8v)
.. (3u, yk)
.. (4u, yk1)
.. (5u, 0.6v)
.. (6u, -1.0v)
.. (7u, -1.2v)
.. (8u, -1.4v)
.. (9u, -1.4v)
.. (10u, -1.2v)
.. (11u, -1.2v)
.. (12u, -1.0v)
.. (13u, -1.0v)
.. (14u, -1.0v)
.. (15u, -1.0v)
.. (16u, -1.0v)
.. (17u, -1v)
.. (18u, -1v)
.. (19u, -1v);
pickup pencircle scaled 3bp;
pickup pencircle scaled 1bp;
drawdblarrow (3u, reference) - dir(0)*u -- (3u, yk) - dir(0)*u;
draw (3u, reference)-- (3u, reference) - dir(0)*1.5u;
draw (3u, yk)-- (3u, yk) - dir(0)*1.5u;
label.lft(btex {\smaller $e(k)$} etex, 1/2 * ((3u, reference) + (3u, yk) ) - dir(0)*1.2u );
drawdblarrow (4u, yk1) + dir(0)*u -- (4u, yk) + dir(0)*u;
draw (4u, yk1)-- (4u, yk1) + dir(0)*1.5u;
draw (3u, yk)-- (4u, yk) + dir(0)*1.5u;
label.rt(btex {\smaller $K_pe(k)$} etex, 1/2 * ((4u, yk1) + (4u, yk) ) + dir(0)*2.0u + dir(90)*u);
\stopMPcode
\stopSlide
\startNote
Assuming $y(k + 1) = y(k) + u(k)$.
\stopmode
\startSlide
\SlideTitle{Proportional Control}
\startitemize
\item inherently inaccurate
\item $K_P$ increases overshoot and settling time
\stopitemize
\stopSlide
\startSlide
\SlideTitle{Integral Control}
$$ u_I(k) = u_I(k-1) + K_I e(k) $$
\startitemize
\item reduce steady-state error
\item increase settling times
\stopitemize
\stopSlide
\startSlide
\SlideTitle{Derivative Control}
$$ u_D(k) = K_D \[ e(k) - e(k-1) \] $$
\startitemize
\item decrease settling times
\item sensitive to noise
\stopitemize
\stopSlide
\startSlide
\SlideTitle{Non-linearity}
\midaligned{ \externalfigure[nonlinearity.pdf][height=0.85\textheight] }
\stopSlide
\startSlide
\SlideTitle{Other Applications}
\startitemize
\item response time vs keepalive timeout
\item memory vs worker connections
\item multiple input-multiple output
\stopitemize
\midaligned{Autotuning, Autoconfiguration}
\stopSlide
\startSlide
\SlideTitle{Summary}
\startitemize
\item iterate on feedback
\item effectiveness of feedback
\item linear models go a long way
\item re-evaluate your models!
\stopitemize
\stopSlide
\startNote
effectiveness - stability, steady state error, settling time, overshoots
\stopmode
\startSlide
\startTwoColumns
\dontleavehmode
\externalfigure[https://images-na.ssl-images-amazon.com/images/I/41iAmXZ8zbL.jpg][height=\textheight]
\externalfigure[https://images-na.ssl-images-amazon.com/images/I/41Lg4IZz+nL.jpg][height=\textheight]
\TwoColumns
\SlideTitle{References}
{ \tfx
P. Janert, {\em Feedback Control for Computer Systems}, Sebastapol, CA:
O'Reilly Media, 2014.
J. Hellerstein, et. al., {\em Feedback Control of Computing Systems},
Hoboken, NJ: John Wiley \& Sons, 2004.
}
\stopTwoColumns
\stopSlide
\startSlide
\startTwoColumns
\externalfigure[kelseyhightower.jpeg][height=0.8\textheight]
\TwoColumns
\SlideTitle{Acknowledgements}
Autoscaling experiments were run on Google Container Engine with GCP \mbox{credits}
c/o Kelsey Hightower.
\stopTwoColumns
\stopSlide
\startSlide
\dontleavehmode
\vfill
\SlideTitle{Demo}
\vfill
\stopSlide
\startSlide
\dontleavehmode
\vfill
\SlideTitle{Thank You!}
\midaligned{@AllanEspinosa}
\vfill
{\tfx
\useURL[lab-notes][https://github.com/aespinosa/control-theory]
\from[lab-notes]
}
\stopSlide
\stoptext