Bound restore memory and reduce cache publication work - #62
Merged
Conversation
Limit restore allocations and metadata work, reuse authenticated prefix and object analysis, and tile native page placement. Protect asynchronous publication dependencies through capacity reconciliation and verify every reconstructed history boundary. Cache identities, digest salts, persisted formats, and native ABI remain unchanged; no namespace migration is required. GPU-free validation: 1,202 tests passed and eight skipped across sparkcache and deploy. CUDA and combined MTP3 measurements retain their workload-specific qualification limits.
This was referenced Sep 6, 2026
Compile the actual page-scatter body as serial C++ to check spans, odd pages, alignment, shuffled slots, guards, rejection, and the 4096-block continuation. Add a 257 MiB GPU benchmark fixture, not executed here. Refresh source-bound deployment receipts. Cache identity and placement ABI are unchanged. Validation: CPU C++ traversal passes under WSL; 1202 tests pass with 9 platform/optional skips on Windows; Ruff and diff checks pass. This does not qualify CUDA execution.
FujitsuPolycom
marked this pull request as ready for review
September 6, 2026 19:05
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.
Large page restores can allocate outside the shared-base budget, repeat object reads and prefix hashing, and leave a single CUDA block copying an entire span. Under eviction pressure, an asynchronous tail capture can also lose its publication base before the saver reads it. This change bounds those paths and preserves verified-or-recompute behavior.
Status: implemented; performance observations are research-only and limited to the stated fixtures and combined runtime.
The implementation:
spark_cache_cuda_restore_arena_budget_bytes. Zero preserves the configured lane count; a positive budget caps complete pairs of restore arenas. It does not claim to cap total process memory.Cache identities, digest salts, persisted formats, and the native ABI are unchanged. Default arena concurrency remains unchanged. Source-bound deployment receipts are refreshed to match the tree.
Validation:
python -m pytest sparkcache deploy -q: 1,202 passed, 8 skipped for the core changes; Ruff clean.5c3bd3eversus 147.95 ms / 6.39 MB with private-layer reconstruction; output bytes match.The serving evidence uses a source-attested SparkRing MTP3 composition with additional runtime changes. It does not establish an isolated speedup from this PR or resolve the original 40 GiB workload without a matched control.
Related: #60 and #61. Neither issue is automatically closed by this draft.
Dependent capture policy and telemetry: #63. Companion runtime integration and the repository-contained sustained-run evidence: SparkRing #227.