Commit d627a86
committed
admission: move yielding into ElasticCPUWorkHandle
ElasticCPUWorkHandle.Overlimit is expected to be called in a tight loop,
so yielding there is conceptually the right place. More importantly,
this will allow in the future for KV work that is not holding latches
to also yield.
As part of this change, elastic work that does not wish to wait in
admission control queues (due to cluster settings), is now accounted for
in the elastic tokens, and in the admission.elastic_cpu_bypassed.utilization
metric. One side-effect of this accounting is that work that needs to
wait in admission queues may have fewer tokens available to it, and may
wait longer. This is considered acceptable since:
- Elastic work that bypasses queueing is still elastic work, and our
overarching goal is to reduce impact to foreground work.
- Due to the default on use of runtime.Yield, all elastic work yields,
which allows the system to run at higher elastic CPU utilization without
impacting the latency of foreground work.
Epic: none
Release note: None1 parent 0331673 commit d627a86
File tree
21 files changed
+193
-164
lines changed- docs/generated/metrics
- pkg
- backup
- kv
- bulk
- kvserver/kvadmission
- roachprod/agents/opentelemetry/files
- server
- sql/opt/exec/execbuilder/testdata
- storage
- testutils/serverutils
- util/admission
21 files changed
+193
-164
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10841 | 10841 | | |
10842 | 10842 | | |
10843 | 10843 | | |
| 10844 | + | |
| 10845 | + | |
| 10846 | + | |
| 10847 | + | |
| 10848 | + | |
| 10849 | + | |
| 10850 | + | |
| 10851 | + | |
10844 | 10852 | | |
10845 | 10853 | | |
10846 | 10854 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | 30 | | |
32 | 31 | | |
33 | 32 | | |
| |||
200 | 199 | | |
201 | 200 | | |
202 | 201 | | |
203 | | - | |
204 | | - | |
| 202 | + | |
205 | 203 | | |
206 | 204 | | |
207 | 205 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
38 | 34 | | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
| 35 | + | |
| 36 | + | |
46 | 37 | | |
47 | 38 | | |
| 39 | + | |
48 | 40 | | |
49 | 41 | | |
50 | 42 | | |
| |||
55 | 47 | | |
56 | 48 | | |
57 | 49 | | |
58 | | - | |
| 50 | + | |
59 | 51 | | |
60 | 52 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
396 | 396 | | |
397 | 397 | | |
398 | 398 | | |
399 | | - | |
| 399 | + | |
400 | 400 | | |
401 | 401 | | |
402 | 402 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
| |||
1486 | 1485 | | |
1487 | 1486 | | |
1488 | 1487 | | |
1489 | | - | |
1490 | | - | |
| 1488 | + | |
1491 | 1489 | | |
1492 | 1490 | | |
1493 | 1491 | | |
| |||
1879 | 1877 | | |
1880 | 1878 | | |
1881 | 1879 | | |
1882 | | - | |
1883 | | - | |
| 1880 | + | |
1884 | 1881 | | |
1885 | 1882 | | |
1886 | 1883 | | |
| |||
0 commit comments