Working-set placement research

The recorded experiment implements compact metadata + shared small segments + dense tree-node pools in a Python allocator model. It compares three geometries on identical traces, including fully populated 2/4 GiB ledger models represented sparsely on the host. Running the simulation does not change Store/CDK code.

This measures modeled heap page charges, not complete IC instructions or RRT throughput. Every physical execution starts fresh tracking; DTS continuations retain that execution's tracking state. The model's retained/transient arenas separate lifetimes while sharing heap tracking sets. Current Store uses disjoint owned page runs from shared authority, not two fixed payload arenas. Its native Map/Set use Nyxus-allocated B-trees; the model's dense node pools are experimental. See current engines for implementation guidance.

Read Purpose
Whitepaper Architecture, application boundaries and promotion criteria.
Combined comparison Recorded model, matched evidence and independent reviews.
Simulator Compact controls, allocation, geometry, population and metrics.
Trace contract Lifecycle arenas, pool requests, sparse population and executions.
RRT-shaped workloads Source grounding, scheduling and omitted behavior.
Ledger workloads Populated trees, transactions, splits and materialized oracle.
IC accounting Pinned source and actual calibration underlying the charge model.

Python's standard library is sufficient, from the repository root:

python3 -m unittest discover -s research/experiments/memory-layout/sim -p 'test_*.py'
python3 research/experiments/memory-layout/sim/run.py --list
python3 research/experiments/memory-layout/sim/run.py --family rrt \
  --scenarios mixed-batched --seeds 1 --policies dense segmented hybrid \
  --set cleanup_batch=32 --out rrt/tmp/memory-layout/local

Use run.py --help for ledger cases and parameters. Each saved comparison has exact source hashes, configuration, seeds, trace/work/state digests, phase totals, execution distributions and memory accounting. Compare policies within a matched case; never credit less semantic work or fewer execution boundaries as a placement improvement. More reserved capacity is not automatically more touched memory, and fewer page charges is not automatically fewer complete instructions.

Historical evidence

First-study results, audit fixes, peer reviews, audit summary and IC conformance document the experiments that selected this direction. Their raw data remains unchanged. The obsolete backing/cohort policies, fixed directory and old probe executables have been removed; use the Git revision named in each historical receipt to reproduce those studies.

The current three controls share compact metadata and lifecycle separation. Their comparisons isolate geometry; they do not independently measure the metadata improvement. Earlier one-arena numbers are not a clean before/after comparison with this model. No moving collector, new production storage format, root-upgrade implementation or stable-memory cost model is introduced here.