Skip to content

Optimize bandwidth parser ASCII scan - #1295

Merged
oferchen merged 1 commit into
masterfrom
establish-project-requirements-for-rsync-in-rust
Oct 27, 2025
Merged

oferchen merged 1 commit into
masterfrom
establish-project-requirements-for-rsync-in-rust

Conversation

@oferchen

@oferchen oferchen commented Oct 27, 2025 •

Copy link
Copy Markdown
Owner

Summary

  • rewrite parse_bandwidth_argument to operate directly on ASCII bytes for lower overhead while preserving upstream-compatible validation
  • tighten suffix parsing to reject non-ASCII modifiers up-front and extend unit coverage for those inputs
  • refresh bandwidth whitespace tests after rustfmt reordered imports

Testing

  • cargo test -p rsync-bandwidth

@oferchen
oferchen merged commit 0233a13 into master Oct 27, 2025
@oferchen
oferchen deleted the establish-project-requirements-for-rsync-in-rust branch October 27, 2025 20:39
oferchen added a commit that referenced this pull request May 5, 2026
Design note for #1295 covering current two-level pool, contention
hypothesis at 32+ threads, three sharding approaches, and the
recommended shard-then-fallback layout. Activation gated at 16+
rayon workers; trait surface and wire protocol unchanged.
oferchen added a commit that referenced this pull request May 7, 2026
Specifies the criterion harness that gates the sharded BufferPool
layout from #1295: 1/4/16/64 thread acquire-release loops with mixed
adaptive buffer sizes, pass/fail thresholds keyed to linear scaling
through 16 threads, and explicit risk mitigations for false sharing
and hot-shard imbalance.
oferchen added a commit that referenced this pull request May 17, 2026
Consolidates issues #1271 and #1370 into a single design proposal for
promoting the engine BufferPool's thread-local cache from a single
slot in front of a shared ArrayQueue to a per-thread slab as the
primary storage, with the existing ArrayQueue demoted to a bounded
global overflow / balancer.

Covers: contrast with sharded-mutex (#1295) and per-thread-cache
(#1370) alternatives, LIFO slab structure with cross-thread return
handling, bounded memory accounting layered on top of #2245's byte
budget, preserved PooledBuffer Drop and BufferAllocator surface,
failure modes (thread teardown, panicking thread, long-lived
buffers), comparison table, trigger conditions for adoption, and a
five-step implementation sequence. Recommendation is to defer
implementation until profiling at 32+ sustained threads proves the
existing two-level layout actually contends.
oferchen added a commit that referenced this pull request May 18, 2026
Design note for #1295 covering current two-level pool, contention
hypothesis at 32+ threads, three sharding approaches, and the
recommended shard-then-fallback layout. Activation gated at 16+
rayon workers; trait surface and wire protocol unchanged.
oferchen added a commit that referenced this pull request May 18, 2026
Specifies the criterion harness that gates the sharded BufferPool
layout from #1295: 1/4/16/64 thread acquire-release loops with mixed
adaptive buffer sizes, pass/fail thresholds keyed to linear scaling
through 16 threads, and explicit risk mitigations for false sharing
and hot-shard imbalance.
oferchen added a commit that referenced this pull request May 18, 2026
Consolidates issues #1271 and #1370 into a single design proposal for
promoting the engine BufferPool's thread-local cache from a single
slot in front of a shared ArrayQueue to a per-thread slab as the
primary storage, with the existing ArrayQueue demoted to a bounded
global overflow / balancer.

Covers: contrast with sharded-mutex (#1295) and per-thread-cache
(#1370) alternatives, LIFO slab structure with cross-thread return
handling, bounded memory accounting layered on top of #2245's byte
budget, preserved PooledBuffer Drop and BufferAllocator surface,
failure modes (thread teardown, panicking thread, long-lived
buffers), comparison table, trigger conditions for adoption, and a
five-step implementation sequence. Recommendation is to defer
implementation until profiling at 32+ sustained threads proves the
existing two-level layout actually contends.
oferchen added a commit that referenced this pull request May 18, 2026
Consolidates issues #1271 and #1370 into a single design proposal for
promoting the engine BufferPool's thread-local cache from a single
slot in front of a shared ArrayQueue to a per-thread slab as the
primary storage, with the existing ArrayQueue demoted to a bounded
global overflow / balancer.

Covers: contrast with sharded-mutex (#1295) and per-thread-cache
(#1370) alternatives, LIFO slab structure with cross-thread return
handling, bounded memory accounting layered on top of #2245's byte
budget, preserved PooledBuffer Drop and BufferAllocator surface,
failure modes (thread teardown, panicking thread, long-lived
buffers), comparison table, trigger conditions for adoption, and a
five-step implementation sequence. Recommendation is to defer
implementation until profiling at 32+ sustained threads proves the
existing two-level layout actually contends.
oferchen added a commit that referenced this pull request Aug 24, 2026
Design note for #1295 covering current two-level pool, contention
hypothesis at 32+ threads, three sharding approaches, and the
recommended shard-then-fallback layout. Activation gated at 16+
rayon workers; trait surface and wire protocol unchanged.
oferchen added a commit that referenced this pull request Aug 24, 2026
Specifies the criterion harness that gates the sharded BufferPool
layout from #1295: 1/4/16/64 thread acquire-release loops with mixed
adaptive buffer sizes, pass/fail thresholds keyed to linear scaling
through 16 threads, and explicit risk mitigations for false sharing
and hot-shard imbalance.
oferchen added a commit that referenced this pull request Aug 24, 2026
Consolidates issues #1271 and #1370 into a single design proposal for
promoting the engine BufferPool's thread-local cache from a single
slot in front of a shared ArrayQueue to a per-thread slab as the
primary storage, with the existing ArrayQueue demoted to a bounded
global overflow / balancer.

Covers: contrast with sharded-mutex (#1295) and per-thread-cache
(#1370) alternatives, LIFO slab structure with cross-thread return
handling, bounded memory accounting layered on top of #2245's byte
budget, preserved PooledBuffer Drop and BufferAllocator surface,
failure modes (thread teardown, panicking thread, long-lived
buffers), comparison table, trigger conditions for adoption, and a
five-step implementation sequence. Recommendation is to defer
implementation until profiling at 32+ sustained threads proves the
existing two-level layout actually contends.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant