Skip to content

Commit afd1749

Browse files
authored
Merge pull request kubernetes#3227 from cyang49/master
KEP-1040: Remove dead link and fix typos in README
2 parents 8c1a7ac + 3d1282f commit afd1749

File tree

1 file changed

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

1 file changed

+13
-13
lines changed

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

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1133,7 +1133,7 @@ arrive to that queue and crowd out other queues for an arbitrarily
11331133
long time. To mitigate this problem, the implementation has a special
11341134
step that effectively prevents `t_dispatch_virtual` of the next
11351135
request to dispatch from dropping below the current time. But that
1136-
solves only half of the problem. Other queueus may accumulate a
1136+
solves only half of the problem. Other queues may accumulate a
11371137
corresponding deficit (inappropriately large values for
11381138
`t_dispatch_virtual` and `t_finish_virtual`). Such a queue can have
11391139
an arbitrarily long burst of inappropriate lossage to other queues.
@@ -1201,7 +1201,7 @@ of available resources), a single request should consume no more than A
12011201
concurrency units. Fortunately that all compiles together because the
12021202
`processing latency` of the LIST request is actually proportional to the
12031203
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
1204+
`<width> x <processing latency>` really is proportional to the number of
12051205
processed objects as expected.
12061206

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

12211221
The question is how to combine them to a single number. While the main goal
12221222
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.
1223+
maximize the utilization of the available concurrency units.
12241224
Fortunately, when we normalize CPU and RAM to percentage of available capacity,
12251225
it appears that almost all requests are much more cpu-intensive. Assuming
12261226
4GB:1CPU ratio and 10kB average object and the fact that processing larger
@@ -1234,7 +1234,7 @@ independently, which translates to the following function:
12341234
```
12351235
We're going to better tune the function based on experiments, but based on the
12361236
above back-of-envelope calculations showing that memory should almost never be
1237-
a limiting factor we will apprximate the width simply with:
1237+
a limiting factor we will approximate the width simply with:
12381238
```
12391239
width_approx(n) = min(A, ceil(N / E)), where E = 1 / B
12401240
```
@@ -1267,7 +1267,7 @@ the virtual world for `additional latency`.
12671267
Adjusting virtual time of a queue to do that is trivial. The other thing
12681268
to tweak is to ensure that the concurrency units will not get available
12691269
for other requests for that time (because currently all actions are
1270-
triggerred by starting or finishing some request). We will maintain that
1270+
triggered by starting or finishing some request). We will maintain that
12711271
possibility by wrapping the handler into another one that will be sleeping
12721272
for `additional latence` after the request is processed.
12731273

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

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

1365-
In watchcache, the initialization phase is clearly separated - we explicily
1365+
In watchcache, the initialization phase is clearly separated - we explicitly
13661366
compute `init events` and process them. What we don't control at this level
13671367
is the process of serialization and sending out the events.
13681368
In the initial version we will ignore this and simply send the `initialization
@@ -1395,7 +1395,7 @@ LIST requests) adjust the `width` of the request. However, in the initial
13951395
version, we will just use `width=1` for all watch requests. In the future,
13961396
we are going to evolve it towards a function that will be better estimating
13971397
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.
1398+
but we first need to a mechanism to allow us experiment and tune it better.
13991399

14001400
#### Keeping the watch up-to-date
14011401

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

14271427
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
1428+
sending watch events triggered by it is proportional to the number of
14291429
watchers that has to process that event. So let's describe how we can
14301430
estimate this number.
14311431

@@ -1468,7 +1468,7 @@ structure to avoid loosing too much information.
14681468
If we would have a hashing function that can combine only a similar buckets
14691469
(e.g. it won't combine "all Endpoints" bucket with "pods from node X") then
14701470
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
1471+
This means that some costs may be overestimated, but if we reasonably hash
14721472
requests originating by system components, that seems acceptable.
14731473
The above can be achieved by hashing each resource type to a separate set of
14741474
buckets, and within a resource type hashing (namespace, name) as simple as:
@@ -1489,7 +1489,7 @@ as whenever something quickly grows we report it, but we don't immediately
14891489
downscale which is a way to somehow incorporate a history.
14901490

14911491
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.
1492+
with the simplest approach of treating each kube-apiserver independently.
14931493
We will implement the above (i.e. knowledge sharing between kube-apiserver),
14941494
if the independence assumption will not work good enough.
14951495
The above description shows that it won't result in almost any wasted work

0 commit comments

Comments
 (0)