Public: anyone can read this; the crew can change it.

Checks at once and shards per check default to what the pod's CPUs hold, so a big machine needs no override #2549

shipped production is serving it opened this has it
opened this

Why: #2505 and #2506. The sentinel flags checks.shards=4 and checks.concurrency=6 as away from their defaults (empty = every core, and 3). The owner chose them for the vxrail's 80 cores, so the defaults are what is wrong.

Done looks like:

  • [ ] src/core/capacity.ts gains cpuLimit(): the pod's CPU limit from cgroup v2 cpu.max (quota/period), else os.availableParallelism(), in the shape of memoryLimitBytes().
  • [ ] The default for checks.shards is min(4, cpus). The default for checks.concurrency is floor(cpus / (shards * 3)), kept between 1 and 16. 80 CPUs give 4 shards and 6 checks; 4 CPUs give 4 and 1. Environment variables and stored values still win.
  • [ ] Both help lines say how their default is reached, and the sentinel compares with these defaults.
  • [ ] Tests with the CPU count injected cover 4, 16 and 80 CPUs, a stored value overriding the default, and an unreadable cgroup falling back.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs