Default transducer.buffer.size to 600; port upstream resource-param docs - #29
Merged
Conversation
…ort upstream resource-param docs The XArrayEmitter's in-memory buffer flushes to the zarr store every `transducer.buffer.size` emit steps. Sizing it small (3-4) forces a flush every few *simulated* seconds, degrading write latency and compression by ~2 orders of magnitude, because the transport-layer latency is meant to be 2+ orders of magnitude below the time to fill one buffer. - Make `buffer.size` optional; when omitted, default to DEFAULT_BUFFER_SIZE = 600 (a handful of flushes per generation at 1 Hz emission, ~10 min of simulated time per flush). Explicit values are still validated (int > 2). - Port the clarified resource-parameter docs from vEcoli PR #414 (commit febe381): the transducer buffer.size note + example (3 -> 600) and the writer.buffers_per_chunk rule of thumb (interval * size * buffers_per_chunk ~= steps per generation). - Add tests/test_xarray_buffer_default.py covering the default, explicit override, and rejection of invalid explicit sizes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Aug 21, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The
XArrayEmitterflushes its in-memory buffer to the zarr store everytransducer.buffer.sizeemit steps. A small buffer (3–4) forces a flush every few simulated seconds, degrading write latency and compression by ~2 orders of magnitude — the transport-layer latency is designed to be 2+ orders of magnitude below the time to fill one buffer. This is the regression Boyan Beronov flagged on vEcoli PR #414 and v2ecoli #506.What
buffer.sizeis now optional, defaulting toDEFAULT_BUFFER_SIZE = 600— a handful of flushes per generation at 1 Hz emission (~10 min simulated time per flush), Boyan's recommended sizing. Explicit values are still validated (int > 2).febe381): thetransducer.buffer.sizenote + example (3 → 600), and thewriter.buffers_per_chunkrule of thumb (interval × size × buffers_per_chunk ≈ steps per generation; immutable object storage → 1).tests/test_xarray_buffer_default.py— default, explicit override, and rejection of invalid explicit sizes.Verification
23/23 relevant tests pass (
test_xarray_buffer_default,test_xarray_emitter,test_xarray_query_idempotent). Backward compatible: existing configs that passbuffer.sizeexplicitly are unaffected.🤖 Generated with Claude Code