Skip to content

feat(hotblocks): make the spill bound configurable#103

Merged
mo4islona merged 1 commit into
masterfrom
feat/hotblocks-spill-bound-flag
Jul 22, 2026
Merged

feat(hotblocks): make the spill bound configurable#103
mo4islona merged 1 commit into
masterfrom
feat/hotblocks-spill-bound-flag

Conversation

@mo4islona

@mo4islona mo4islona commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

The spill bound decides which chunks are prepared in memory and which build an out-of-core processor. That makes it the one dial trading ingest memory against the temp-file path #98 was written to avoid, and it is currently a constant.

Two things want it reachable:

  • Sizing it up. Raising the bound past a dataset's flush size is what keeps that dataset off temp files, and the right value follows block size, which varies widely between deployments.
  • Turning it off. 0 puts every chunk back on the temp-file path — the way out if the in-memory prepare ever misbehaves, without a rollback.

--spill-bound-bytes / SQD_SPILL_BOUND_BYTES, default 30 MB. An unset flag renders exactly as before, so this is inert until something sets it.

Sizing it up is not free: the builder buffer is per dataset, so the worst case is bound × datasets against the process memory limit.

This restores the knob from the first draft of #98, dropped there because nothing needed it yet. The unit tests move off the constant onto a small explicit bound, which also makes them cheaper.

🤖 Generated with Claude Code

The bound decides which chunks are prepared in memory and which build an
out-of-core processor, so it is the one dial that trades ingest memory against
the temp-file path #98 was written to avoid. Raising it past a dataset's flush
size is what keeps that dataset off temp files; 0 puts every chunk back on them,
which is the kill switch if the in-memory path ever misbehaves in production.
Neither is reachable while the bound is a constant, and both are wanted per
stack -- block sizes differ by an order of magnitude between them.

The default stays 30 MB, so an unset flag renders exactly as before. Sizing it
up is not free: the buffer is per dataset and mainnet runs 45 of them, so the
worst case scales with the bound.

Restores the knob from the first draft of #98, dropped there because nothing
needed it yet.
@mo4islona
mo4islona merged commit 28f9504 into master Jul 22, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant