Experiment 026: sqlite3_db_status() Probe

Date: 2026-04-08

Status: Rejected (no follow-on optimization justified)

Hypothesis

Before attempting a process-global page cache or more aggressive memory tuning, we

should check whether sqlite is actually under page-cache or lookaside pressure in

resqlite's hot paths.

If cache miss rates are high, cache spill happens, or lookaside misses show up in

meaningful volume, then a deeper page-cache experiment might be justified.

Change

Added an experiment-only aggregate probe:

The probe sums sqlite3_db_status() across the writer and idle readers, then runs

four representative workloads:

  1. point lookups
  2. parameterized page reads
  3. large result reads
  4. write burst

Results

Probe output:

WorkloadCache hit rateCache spillLookaside misses
Point lookups100.0% (2002 / 1)00 / 0
Parameterized page reads99.9% (7991 / 9)00 / 0
Large result reads100.0% (80 / 0)00 / 0
Write burst100.0% (6002 / 0)00 / 0

Additional observations:

Decision

Rejected as a tuning direction for now.

The probe says the current configuration is already warm and healthy:

That means a process-global page-cache experiment would be solving a problem we do

not currently have. The measurement tooling was still useful, but the optimization

it was meant to justify is not warranted by the data.