Skip to content

Commit 3e8b4ec

Browse files
committed
Remove dead link and fix typos
Remove a dead hyperlink for fair-queuing paper and fix some typos in KEP-1040
1 parent 27fc35e commit 3e8b4ec

File tree

1 file changed

+14
-15
lines changed
  • keps/sig-api-machinery/1040-priority-and-fairness

1 file changed

+14
-15
lines changed

keps/sig-api-machinery/1040-priority-and-fairness/README.md

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -735,8 +735,7 @@ next section.
735735
This is based on fair queuing but is modified to deal with serving
736736
requests in an apiserver instead of transmitting packets in a router.
737737
You can find the original fair queuing paper at
738-
[ACM](https://dl.acm.org/citation.cfm?doid=75247.75248) or
739-
[MIT](http://people.csail.mit.edu/imcgraw/links/research/pubs/networks/WFQ.pdf),
738+
[ACM](https://dl.acm.org/citation.cfm?doid=75247.75248),
740739
and an
741740
[implementation outline at Wikipedia](https://en.wikipedia.org/wiki/Fair_queuing).
742741
Our problem differs from the normal fair queuing problem in three
@@ -1133,7 +1132,7 @@ arrive to that queue and crowd out other queues for an arbitrarily
11331132
long time. To mitigate this problem, the implementation has a special
11341133
step that effectively prevents `t_dispatch_virtual` of the next
11351134
request to dispatch from dropping below the current time. But that
1136-
solves only half of the problem. Other queueus may accumulate a
1135+
solves only half of the problem. Other queues may accumulate a
11371136
corresponding deficit (inappropriately large values for
11381137
`t_dispatch_virtual` and `t_finish_virtual`). Such a queue can have
11391138
an arbitrarily long burst of inappropriate lossage to other queues.
@@ -1201,7 +1200,7 @@ of available resources), a single request should consume no more than A
12011200
concurrency units. Fortunately that all compiles together because the
12021201
`processing latency` of the LIST request is actually proportional to the
12031202
number of processed objects, so the cost of the request (defined above as
1204-
`<width> x <processing latency>` really is proportaional to the number of
1203+
`<width> x <processing latency>` really is proportional to the number of
12051204
processed objects as expected.
12061205

12071206
For RAM the situation is actually different. In order to process a LIST
@@ -1220,7 +1219,7 @@ where N is the number of items a given LIST request is processing.
12201219

12211220
The question is how to combine them to a single number. While the main goal
12221221
is to stay on the safe side and protect from the overload, we also want to
1223-
maxiumize the utilization of the available concurrency units.
1222+
maximize the utilization of the available concurrency units.
12241223
Fortunately, when we normalize CPU and RAM to percentage of available capacity,
12251224
it appears that almost all requests are much more cpu-intensive. Assuming
12261225
4GB:1CPU ratio and 10kB average object and the fact that processing larger
@@ -1234,7 +1233,7 @@ independently, which translates to the following function:
12341233
```
12351234
We're going to better tune the function based on experiments, but based on the
12361235
above back-of-envelope calculations showing that memory should almost never be
1237-
a limiting factor we will apprximate the width simply with:
1236+
a limiting factor we will approximate the width simply with:
12381237
```
12391238
width_approx(n) = min(A, ceil(N / E)), where E = 1 / B
12401239
```
@@ -1267,7 +1266,7 @@ the virtual world for `additional latency`.
12671266
Adjusting virtual time of a queue to do that is trivial. The other thing
12681267
to tweak is to ensure that the concurrency units will not get available
12691268
for other requests for that time (because currently all actions are
1270-
triggerred by starting or finishing some request). We will maintain that
1269+
triggered by starting or finishing some request). We will maintain that
12711270
possibility by wrapping the handler into another one that will be sleeping
12721271
for `additional latence` after the request is processed.
12731272

@@ -1284,7 +1283,7 @@ requests. Now in order to start processing a request, it has to accumulate
12841283
The important requirement to recast now is fairness. As soon a single
12851284
request can consume more units of concurrency, the fairness is
12861285
no longer about the number of requests from a given queue, but rather
1287-
about number of consumed concurrency units. This justifes the above
1286+
about number of consumed concurrency units. This justifies the above
12881287
definition of adjusting the cost of the request to now be equal to
12891288
`<width> x <processing latency>` (instead of just `<processing latency>`).
12901289

@@ -1310,7 +1309,7 @@ modification to the current dispatching algorithm:
13101309
semantics of virtual time tracked by the queues to correspond to work,
13111310
instead of just wall time. That means when we estimate a request's
13121311
virtual duration, we will use `estimated width x estimated latency` instead
1313-
of just estimated latecy. And when a request finishes, we will update
1312+
of just estimated latency. And when a request finishes, we will update
13141313
the virtual time for it with `seats x actual latency` (note that seats
13151314
will always equal the estimated width, since we have no way to figure out
13161315
if a request used less concurrency than we granted it).
@@ -1348,7 +1347,7 @@ We will solve this problem by also handling watch requests by our priority
13481347
and fairness kube-apiserver filter. The queueing and admitting of watch
13491348
requests will be happening exactly the same as for all non-longrunning
13501349
requests. However, as soon as watch is initialized, it will be sending
1351-
an articial `finished` signal to the APF dispatcher - after receiving this
1350+
an artificial `finished` signal to the APF dispatcher - after receiving this
13521351
signal dispatcher will be treating the request as already finished (i.e.
13531352
the concurrency units it was occupying will be released and new requests
13541353
may potentially be immediately admitted), even though the request itself
@@ -1362,7 +1361,7 @@ The first question to answer is how we will know that watch initialization
13621361
has actually been done. However, the answer for this question is different
13631362
depending on whether the watchcache is on or off.
13641363

1365-
In watchcache, the initialization phase is clearly separated - we explicily
1364+
In watchcache, the initialization phase is clearly separated - we explicitly
13661365
compute `init events` and process them. What we don't control at this level
13671366
is the process of serialization and sending out the events.
13681367
In the initial version we will ignore this and simply send the `initialization
@@ -1395,7 +1394,7 @@ LIST requests) adjust the `width` of the request. However, in the initial
13951394
version, we will just use `width=1` for all watch requests. In the future,
13961395
we are going to evolve it towards a function that will be better estimating
13971396
the actual cost (potentially somewhat similarly to how LIST requests are done)
1398-
but we first need to a machanism to allow us experiment and tune it better.
1397+
but we first need to a mechanism to allow us experiment and tune it better.
13991398

14001399
#### Keeping the watch up-to-date
14011400

@@ -1425,7 +1424,7 @@ Let's start with an assumption that sending every watch event is equally
14251424
expensive. We will discuss how to generalize it below.
14261425

14271426
With the above assumption, a cost of a mutating request associated with
1428-
sending watch events triggerred by it is proportional to the number of
1427+
sending watch events triggered by it is proportional to the number of
14291428
watchers that has to process that event. So let's describe how we can
14301429
estimate this number.
14311430

@@ -1468,7 +1467,7 @@ structure to avoid loosing too much information.
14681467
If we would have a hashing function that can combine only a similar buckets
14691468
(e.g. it won't combine "all Endpoints" bucket with "pods from node X") then
14701469
we can simply write maximum from all entries that are hashed to the same value.
1471-
This means that some costs may be overestimated, but if we resaonably hash
1470+
This means that some costs may be overestimated, but if we reasonably hash
14721471
requests originating by system components, that seems acceptable.
14731472
The above can be achieved by hashing each resource type to a separate set of
14741473
buckets, and within a resource type hashing (namespace, name) as simple as:
@@ -1489,7 +1488,7 @@ as whenever something quickly grows we report it, but we don't immediately
14891488
downscale which is a way to somehow incorporate a history.
14901489

14911490
However, we will treat the above as a feasibility proof. We will just start
1492-
with the simplest apprach of treating each kube-apiserver independently.
1491+
with the simplest approach of treating each kube-apiserver independently.
14931492
We will implement the above (i.e. knowledge sharing between kube-apiserver),
14941493
if the independence assumption will not work good enough.
14951494
The above description shows that it won't result in almost any wasted work

0 commit comments

Comments
 (0)