daemon-cost

command
v0.9.9-dev.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2026 License: Apache-2.0 Imports: 28 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Command daemon-cost measures what one process serving N clients costs against N processes serving one each.

It exists because the saving was never observed. `benchmarks/load-cost-resident` measured what a `serve` keeps -- `71,2 MB` of private dirty pages, flat in the number of clients -- and `kivgraph daemon` was written on the arithmetic that N of those become one. Arithmetic is not a measurement, and two things could make it wrong:

  • The snapshot is already shared. It is the same mapped file in every server and those pages are clean, so the bytes at stake are only the private ones. A reader who expects the file's size to disappear is measuring the wrong thing.
  • A daemon's private half is not constant. It builds an MCP server per accepted session -- eleven tool registrations, a decoder, buffers -- so its cost grows with the number of clients. The question is not whether it saves, it is the slope: an arm that saves at two clients and not at eight would not be worth the command.

Both arms therefore read the same published generation from its file, and the sweep is what answers the question. A single client count cannot, so the one-client point is measured rather than skipped: it is where a daemon's own overhead would be visible with nothing to amortise it over.

This comment predicted that a daemon must be *worse* there -- same load, plus a session. Measured, it is neither: the proportion at one client is 0,966 to 1,015 over three runs, a megabyte of noise. The per-session server does not show up against the 66 MB the load costs. See report.md.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL