- ds
- Operations
- Resources and quotas
Resources and quotas
CPU, memory and disk against requests and limits.
Show code
<div class="res">
<div class="res-row">
<span class="res-name">CPU</span>
<div class="res-bar" style="--use:.496" role="img" aria-label="CPU 2.48 vCPU used, request 2, limit 4">
<i></i><b class="req" style="--at:.4"></b><b class="lim" style="--at:.8"></b>
</div>
<span class="res-v"><b>2.48</b> / 4 vCPU</span>
</div>
<div class="res-row">
<span class="res-name">Memory</span>
<div class="res-bar warn" style="--use:.684" role="img" aria-label="Memory 1.71 GiB used, request 1 GiB, limit 2 GiB, 86% of limit">
<i></i><b class="req" style="--at:.4"></b><b class="lim" style="--at:.8"></b>
</div>
<span class="res-v"><b>1.71</b> / 2 GiB</span>
</div>
<div class="res-row">
<span class="res-name">Disk</span>
<div class="res-bar" style="--use:.032" role="img" aria-label="Ephemeral storage 0.4 GiB used, limit 10 GiB">
<i></i><b class="lim" style="--at:.8"></b>
</div>
<span class="res-v"><b>0.4</b> / 10 GiB</span>
</div>
</div>
<div class="res-key"><span><i></i>used</span><span><i class="req"></i>request</span><span><i class="lim"></i>limit</span></div>One container, three resources. The fill is what it uses now, the short tick is what it asked the scheduler for, the red bar is where it gets throttled (CPU) or killed (memory). The bar runs past the limit so the limit has somewhere to sit. Memory is amber because it is at 86% of its limit; memory over its limit is an OOM kill, so it turns amber well before. CPU over its request is normal, it is only borrowing idle cores.
Over the limit
OOMKilled 3 times in the last hour. The request is half the limit, so the scheduler packs it next to neighbours that need the same memory.
Code
<div class="res">
<div class="res-row">
<span class="res-name">Memory</span>
<div class="res-bar down" style="--use:.8" role="img" aria-label="Memory at its 2 GiB limit, killed 3 times in the last hour">
<i></i><b class="req" style="--at:.4"></b><b class="lim" style="--at:.8"></b>
</div>
<span class="res-v"><b>2.00</b> / 2 GiB</span>
</div>
<p class="hint">OOMKilled 3 times in the last hour. The request is half the limit, so the scheduler packs it next to neighbours that need the same memory.</p>
</div>Node allocation
- checkout-api 2
- event-relay 1.5
- ledger-writer 1
- system 0.6
Code
<div class="alloc-head"><b>ip-10-4-17-82</b><span class="res-v"><b>5.1</b> of 7.6 vCPU requested</span></div>
<div class="alloc" role="img" aria-label="CPU requests on ip-10-4-17-82: checkout-api 2, event-relay 1.5, ledger-writer 1, system 0.6, 2.5 vCPU free"><i class="s1" style="--w:0.263" title="checkout-api: 2 vCPU"></i><i class="s3" style="--w:0.197" title="event-relay: 1.5 vCPU"></i><i class="s2" style="--w:0.132" title="ledger-writer: 1 vCPU"></i><i class="s6" style="--w:0.079" title="system: 0.6 vCPU"></i><i class="free"></i></div>
<ul class="ch-legend"><li class="s1">checkout-api <b>2</b></li><li class="s3">event-relay <b>1.5</b></li><li class="s2">ledger-writer <b>1</b></li><li class="s6">system <b>0.6</b></li></ul>What each workload has reserved on a node, stacked, with the free capacity hatched. This is what the scheduler sees, which is why a node at 30% CPU use can refuse new pods: requests are full even when usage is not.
| Class | On | What it does |
|---|---|---|
.res | div | A stack of rows. |
.res-row | div | Name, bar, value. On phones the bar moves under the name. |
.res-bar | div | --use from 0 to 1 of the bar. .warn and .down recolour the fill. |
.req / .lim | b | Markers at --at: a short ink tick for the request, a tall red bar for the limit. |
.res-key | div | The legend for the three marks. |
.alloc-head | div | Node name in mono and the total, above the stack. |
.alloc | div | Stacked segments with --w (share of capacity) and a series class; .free takes the rest. |
- Show request and limit, not only usage. Most capacity problems are a bad request, not a busy container.
- Amber for memory near its limit, since the next step is a kill. Leave CPU over request alone.
- Units people type: vCPU or millicores, GiB.
- A percentage without the absolute numbers next to it.
- Scaling every bar to 100% of its limit: you lose the room past it.
- Red for a container that is merely busy.
Accessibility
- Each bar is an image with all three numbers in its label; the values are also printed next to it.
- The request and limit marks differ in height and colour, not only colour.