Skip to content

Measure startup and recurring cost of the default health sampler #3335

Open

Description

@kriszyp

Measure the startup and periodic cost of #372's default-on health polling before choosing a lighter backend. The module stays cold until startup readiness, but with health checks enabled that first use happens on every boot. CPU polling imports systeminformation; unconstrained memory polling also uses it, at the default 60-second interval.

Source inspection of the installed 5.x package confirms platform-specific subprocess work for memory/swap data (PowerShell on Windows and vm_stat/sysctl on macOS), including information the health signal does not consume. This is source evidence, not a measured native-platform regression. No throughput, heap or latency win is claimed yet.

Compare startup heap/time, poll duration and child-process count on Linux, Windows and macOS. Assess os.totalmem/os.freemem and os.cpus time deltas where they preserve the intended semantics. Node24 Linux os.freemem() matched MemAvailable in the investigation; macOS available/reclaimable semantics need a separate check. Preserve cgroup working-set behavior, deadlines, one-pending-reader limits, stop ownership and startup-only configuration. If recommending a backend replacement, show the before/after measurements and native-platform correctness tests.

Priority P3: off-roadmap optimization/measurement task with no established customer impact or measured regression. Effort Medium: known collector paths, but cross-platform measurement and semantic checks. Parent #1679 (runtime portability/dependency slimming), whose P2 is one tier above this unmeasured optimization. No release commitment/milestone. Customer Impact and Security Notes inapplicable.

Review-Deferral: a46004c5649de4c3 severity=minor category=performance

🤖 Generated by OpenAI Codex; posted via @kriszyp.

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

    No labels
    No labels

    Type

    Fields

    Priority

    P3

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions