A benchmark harness under src/script/benchmark/alternatives runs the scenarios against Ninlil's container image and writes a results file #92

Open
opened 2026-10-31 12:42:05 -04:00 by claude · 0 comments
Owner
  • Draft: PROC-10
  • Priority: medium (the base the alternative targets and the Ninlil matrix plug into)
  • Agent: coder
  • Depends on: #91
  • Decisions: Q-PROC-7, Q-PROC-8, Q-PROC-9, Q-PROC-11

Why

The comparison must be rerunnable by anyone. In-process BenchmarkDotNet classes cannot measure the other servers, so the harness is black-box over the network for every server, Ninlil included.

What changes

New directory src/script/benchmark/alternatives/:

  • compose.yaml: the ninlil-bench network, the fake upstream (#91), a static HTTP server for the block list, and a load-generator image with dnsperf from Debian's package (Q-PROC-8), pinned by digest. Check whether the installed dnsperf version supports DoT for S5 and record it.
  • run.sh <target> [--config <id>] [scenario...], which:
    1. starts one target (and, for Ninlil, the containers its configuration needs);
    2. waits until it answers;
    3. configures it through targets/<target>/configure.sh;
    4. warms it up;
    5. runs each scenario five times with rate steps;
    6. writes results/<date>-<host>/<target>[-<config>].json (metrics, versions, image digests, lscpu model, uname -r, cpusets per container, the exact commands).
      The --config value selects a Ninlil configuration from #90's table; this issue implements N-SQLite and the plumbing, #94 and #95 add the rest.
  • targets/ninlil/:
    • the image is git.lantea.one/lantea-one/ninlil:<tag> (docker-compose.yml:12-13), the bootstrap administrator from an environment variable, SQLite;
    • configure.sh uses the REST API to add the fake upstream as the forwarder and subscribe the block list at its HTTP URL;
    • rate limiting off and query logging at its default (Q-PROC-9).
  • fixtures/make-blocklist.sh: writes 100,000 names deterministically in the formats the targets need (plain domain list and hosts file).
  • fixtures/make-queries.sh: writes the query files for S1 to S5.
  • fixtures/certs.sh: makes one self-signed certificate for S5.
  • Every script has the header the comment standard requires. Ports and addresses come from the compose file, never the host's port 53.
  • AGENTS.md "Repository layout": the src/script/ row mentions benchmark/alternatives/.

Acceptance

  • ./run.sh ninlil --config N-SQLite S1 on a laptop (Small run: one repetition, 10 s) writes a results file whose JSON parses and whose S1 answer check passed. The harness checks one reply per scenario first: A 192.0.2.77 for S1 and S2, the blocked answer for S3.
  • fake-upstream reports zero queries during S1 after warm-up, proving the cache was hit.
  • Lint passes (shellcheck covers src/script/, lint.sh:34).
  • No result numbers are committed in this issue.

Source

  • Memory project_alternatives_benchmarks.md ("ship the harness and configs in the repo").
  • Owner decisions 2026-10-31: Q-PROC-7 "S1-S5", Q-PROC-8 "dnsperf", Q-PROC-9 "defaults, rate limiting off", Q-PROC-11 "same machine, pinned cores".
- **Draft:** PROC-10 - **Priority:** medium (the base the alternative targets and the Ninlil matrix plug into) - **Agent:** coder - **Depends on:** #91 - **Decisions:** Q-PROC-7, Q-PROC-8, Q-PROC-9, Q-PROC-11 ### Why The comparison must be rerunnable by anyone. In-process BenchmarkDotNet classes cannot measure the other servers, so the harness is black-box over the network for every server, Ninlil included. ### What changes New directory `src/script/benchmark/alternatives/`: - `compose.yaml`: the `ninlil-bench` network, the fake upstream (#91), a static HTTP server for the block list, and a load-generator image with `dnsperf` from Debian's package (Q-PROC-8), pinned by digest. Check whether the installed `dnsperf` version supports DoT for S5 and record it. - `run.sh <target> [--config <id>] [scenario...]`, which: 1. starts one target (and, for Ninlil, the containers its configuration needs); 2. waits until it answers; 3. configures it through `targets/<target>/configure.sh`; 4. warms it up; 5. runs each scenario five times with rate steps; 6. writes `results/<date>-<host>/<target>[-<config>].json` (metrics, versions, image digests, `lscpu` model, `uname -r`, cpusets per container, the exact commands). The `--config` value selects a Ninlil configuration from #90's table; this issue implements `N-SQLite` and the plumbing, #94 and #95 add the rest. - `targets/ninlil/`: - the image is `git.lantea.one/lantea-one/ninlil:<tag>` (`docker-compose.yml:12-13`), the bootstrap administrator from an environment variable, SQLite; - `configure.sh` uses the REST API to add the fake upstream as the forwarder and subscribe the block list at its HTTP URL; - rate limiting off and query logging at its default (Q-PROC-9). - `fixtures/make-blocklist.sh`: writes 100,000 names deterministically in the formats the targets need (plain domain list and hosts file). - `fixtures/make-queries.sh`: writes the query files for S1 to S5. - `fixtures/certs.sh`: makes one self-signed certificate for S5. - Every script has the header the comment standard requires. Ports and addresses come from the compose file, never the host's port 53. - AGENTS.md "Repository layout": the `src/script/` row mentions `benchmark/alternatives/`. ### Acceptance - [ ] `./run.sh ninlil --config N-SQLite S1` on a laptop (Small run: one repetition, 10 s) writes a results file whose JSON parses and whose S1 answer check passed. The harness checks one reply per scenario first: A 192.0.2.77 for S1 and S2, the blocked answer for S3. - [ ] `fake-upstream` reports zero queries during S1 after warm-up, proving the cache was hit. - [ ] Lint passes (shellcheck covers `src/script/`, `lint.sh:34`). - [ ] No result numbers are committed in this issue. ### Source - Memory `project_alternatives_benchmarks.md` ("ship the harness and configs in the repo"). - Owner decisions 2026-10-31: Q-PROC-7 "S1-S5", Q-PROC-8 "dnsperf", Q-PROC-9 "defaults, rate limiting off", Q-PROC-11 "same machine, pinned cores".
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
lantea-one/ninlil#92
No description provided.