Repository navigation
test: AIMD limiter convergence under error injection (#2092) - #4007
Merged
Merged
Conversation
Drives the token-bucket bandwidth limiter through an Additive-Increase/Multiplicative-Decrease control loop and verifies the observed throughput tracks the configured rate at every stage: steady state under no errors, multiplicative decrease on simulated error, recovery via additive increase, stability under intermittent errors, and clamping at the minimum rate floor. All assertions use the deterministic recorded sleep durations from the test-support infrastructure to remain free of wall-clock flakiness.
oferchen
added a commit
that referenced
this pull request
May 18, 2026
* test: add AIMD convergence tests under error injection (#2092) Drives the token-bucket bandwidth limiter through an Additive-Increase/Multiplicative-Decrease control loop and verifies the observed throughput tracks the configured rate at every stage: steady state under no errors, multiplicative decrease on simulated error, recovery via additive increase, stability under intermittent errors, and clamping at the minimum rate floor. All assertions use the deterministic recorded sleep durations from the test-support infrastructure to remain free of wall-clock flakiness. * style: apply cargo fmt to aimd convergence tests
6 tasks
oferchen
added a commit
that referenced
this pull request
Jun 10, 2026
Adds a fourth IoUringPolicy variant (SqpollOff) wired to the new --no-io-uring-sqpoll flag. The variant keeps io_uring active for file and socket I/O but suppresses IORING_SETUP_SQPOLL via a process-wide gate that build_ring() and the session-pool ring builder consult. This gives operators a deterministic opt-out for rootless containers and Kubernetes pods that cannot grant CAP_SYS_NICE, instead of relying on the kernel's EPERM fallback path. Adds docs/deployment/kubernetes.md covering Pod manifests for SQPOLL-enabled and SQPOLL-suppressed workloads, daemon-as-Pod deployment, Pod Security Admission profile interactions, and the tradeoff table. Extends docs/deployment/container-io-uring.md (IKV-F.6) with a K8s rootless-opt-out subsection and adds the new flag to docs/deployment/io-uring-feature-matrix.md. Bundles SQP-K8S.1 / .3 / .4 (#4004 / #4006 / #4007). The rootless throughput bench (SQP-K8S.2) requires container access and is deferred to a follow-up PR.
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
* test: add AIMD convergence tests under error injection (#2092) Drives the token-bucket bandwidth limiter through an Additive-Increase/Multiplicative-Decrease control loop and verifies the observed throughput tracks the configured rate at every stage: steady state under no errors, multiplicative decrease on simulated error, recovery via additive increase, stability under intermittent errors, and clamping at the minimum rate floor. All assertions use the deterministic recorded sleep durations from the test-support infrastructure to remain free of wall-clock flakiness. * style: apply cargo fmt to aimd convergence tests
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
* test: add AIMD convergence tests under error injection (#2092) Drives the token-bucket bandwidth limiter through an Additive-Increase/Multiplicative-Decrease control loop and verifies the observed throughput tracks the configured rate at every stage: steady state under no errors, multiplicative decrease on simulated error, recovery via additive increase, stability under intermittent errors, and clamping at the minimum rate floor. All assertions use the deterministic recorded sleep durations from the test-support infrastructure to remain free of wall-clock flakiness. * style: apply cargo fmt to aimd convergence tests
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
Adds a fourth IoUringPolicy variant (SqpollOff) wired to the new --no-io-uring-sqpoll flag. The variant keeps io_uring active for file and socket I/O but suppresses IORING_SETUP_SQPOLL via a process-wide gate that build_ring() and the session-pool ring builder consult. This gives operators a deterministic opt-out for rootless containers and Kubernetes pods that cannot grant CAP_SYS_NICE, instead of relying on the kernel's EPERM fallback path. Adds docs/deployment/kubernetes.md covering Pod manifests for SQPOLL-enabled and SQPOLL-suppressed workloads, daemon-as-Pod deployment, Pod Security Admission profile interactions, and the tradeoff table. Extends docs/deployment/container-io-uring.md (IKV-F.6) with a K8s rootless-opt-out subsection and adds the new flag to docs/deployment/io-uring-feature-matrix.md. Bundles SQP-K8S.1 / .3 / .4 (#4004 / #4006 / #4007). The rootless throughput bench (SQP-K8S.2) requires container access and is deferred to a follow-up PR.
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.
Summary
crates/bandwidth/src/limiter/tests/aimd_convergence.rs:Implementation notes
update_limit.test-supportrecording path; assertions useLimiterSleep::requested()so the tests are deterministic and free of wall-clock jitter.last_instantyet) does not skew the observation.Test plan