Skip to content

Measure per-verb CLI cost and timer-triggered verb frequency on the bench #4216

Open

Description

@pithead-developer

What's the problem

Only help, version and bare status have timings, on a frozen commit with offline fixtures; the script has since grown to about 100 slices. No doctor, render, apply or timer-verb timing exists, the real firing frequency and CPU of timer and path units is unknown, and the cheap alternative (a Bash entry that sources only the needed slices) is unmeasured.

What it impacts

Whether any CLI piece beyond startup verbs is speed-driven, and the decision threshold for the timer-verbs piece.

How I found it

go-port/3811-bench has a completed CLI report: Go/Bash wall ratios help warm 0.083 and 0.077, version warm 0.078 and 0.078, status warm 0.677 and 0.677, reproduced on a second guest. Unit files show lan-guard and tor-egress checks on 2-minute timers and a path unit running control-run-pending (frequency inferred). Benchmark notes record that hashrate impact is unmeasured.

How important is it

Medium: cheap, and it prevents porting by guess. Needed before the timer-verbs piece; not a dependency of the help/version piece, whose evidence exists.

Acceptance criteria

  • Arms: current Bash re-baselined on current develop, a slice-trimmed Bash entry for the timer verbs, and the Go launcher for those verbs; A/A noise floor recorded.
  • Wall time, CPU time and peak RSS for the non-destructive verbs only (status, doctor, render --check, timer verbs); destructive verbs (apply, upgrade, restore, reset) are listed as excluded.
  • Timer and path firings per hour over a stated window on an appliance-like bench, with their CPU share, on a miner-loaded guest, reporting hashrate or CPU steal with timers on versus off.
  • Results committed as data plus a short docs page; unmeasured verbs listed as unmeasured.
  • The report gives the numbers with a recommended threshold; the owner sets the threshold from it before the timer-verbs piece starts.

Possible solutions

Reuse bench-collect, bench-orchestrate and bench-analyze from the benchmark track; add systemd accounting (cgroup v2 cpu.stat, memory.peak) for timer units. Unknown: whether fixture figures transfer to a real appliance with Docker latency.

Release: date 2026-12-04
Who: operator

Activity

  1. added
    testing
    performance
    size:M
    on Nov 17, 2026
  2. pithead-developer commented on Nov 24, 2026

    @pithead-developer
    ContributorAuthor

    Data points for this measurement, from a read-only audit of develop at f6ddd449.

    DIY test server (12 threads, remote-node mode, no rigs connected). Cost of the last run of each unit, from systemd accounting:

    Unit Wall CPU
    pithead-lan-check.service (timer) 0.24 s 0.25 s
    pithead-egress-check.service (timer) 0.62 s 0.69 s
    pithead-lan-guard.service 0.01 s 0.11 s
    pithead-egress.service 0.01 s 0.10 s

    On the same server version took 95 to 184 ms and status 5.1 s, of which 3 s is a fixed sleep.
    On a laptop (macOS, so an upper bound): 61 ms to parse the generated script and 422 ms for version, of which about 280 ms is four git calls made before dispatch.

    Cheap-fix candidates for a control arm are filed separately: #4456 (build provenance computed on every verb), #4457 (one jq per config key in apply and render), #4458 (engine calls in status and the compose-project check).

    Not measured: doctor and render timings, peak RSS, firings per hour over a full day, and an A/A noise floor. One machine each, so treat these as a first data point, not the baseline.

  3. added
    operator-hold
    on Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    operator-holdperformancesize:Mtesting

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions