Repository navigation
Conversation
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
Use
mimalloc::MiMallocas the Rust global allocator for the MongoDB connector binary, in addition to the immutable-configuration sharing already released in v2.1.5 / #201.mimalloc = "=0.1.52"to the connector package (libmimalloc-sys0.1.49, bundled mimalloc3.3.2).mi_collect, purge timer, preload, native malloc override, or tuning environment variables.Fresh v2.1.5 measurements
All comparisons below use fresh source builds from the same v2.1.5 commit, identical Rust1.94.1/toolchain/runtime and workload limits, changing only the allocator. Every successful response was fully consumed and matched by byte count and SHA-256. Each final idle window is five minutes with zero active requests. No forced collection.
The full16-process experiment also includes v2.1.1 with/without mimalloc. Both old stress variants still OOM at12GiB; mimalloc is not a replacement for the config-sharing fix. Across all workloads9,120 successful responses matched. Only within-version pairs isolate the allocator; comparing releases also includes dependency/release differences.
These are isolated local synthetic observations, not production benchmarks or a diagnosis of a customer deployment. RSS sampled every100ms can miss brief spikes; cgroup CPU estimates bracket exact burst events using those samples. Small response/stress timing is similar, but the single large-response trial shows a real reason for further validation.
Validation
cargo +1.94.1 test --locked --release --package mongodb-agent-common --package mongodb-connector: 301passed,0failed,0ignored, including the two Arc-sharing regressions. Feature-gated MongoDB integration suites are not enabled by this command.cargo +1.94.1 clippy --locked --release --workspace --all-targets -- -D warnings: passed.cargo +1.94.1 build --locked --release --package mongodb-connector: passed; allocator symbols confirmed in the final binary.git diff --checkpasses. A repo-wide format check reports pre-existing drift in12unchanged files; all12are byte-identical to main, and no unrelated formatting churn is included.Hosted workflows run normally; their results are not claimed green in advance. Nix/static/cross-target builds, security scans, and full MongoDB integration suites remain to be reviewed. No CI safety bypass or MongoDB/kernel workaround is included.
Why draft / before merge
The lower idle footprint makes this worth evaluating separately from #201, but this is not an unconditional performance win. Before a merge/release recommendation:
No merge, deployment, version bump, tag, or release is requested by this PR.
Origin and evidence
Originating bot and full experiment report. Open the MongoDB connector: memory after the burst app artifact there for the four-way tables, individual RSS curves, response hashes, toolchain/source manifests and reproduction instructions. Evidence uses synthetic data only.