Conversation
Add bidirectional multithread socket throughput benchmarks for all three backends (corosio, asio coroutine, asio callback) with 2/4/8 thread counts and 32 connections. Expand buffer sizes up to 1 MiB. Move conntrack drain to per-backend scope so backends don't wait on each other. Make io_context microbenchmarks opt-in via --enable-microbenchmarks flag.
Ramp up inline budget geometrically (2→16) when fully consumed, and reset on partial consumption. Skip inlining when the private queue has pending work to avoid starving queued ops.
Only cap the inline budget when queued work exists but no idle thread was woken to absorb it. When another thread is available, let the adaptive ramp-up run unrestricted since the competing work gets processed in parallel. This recovers multi-threaded throughput while preserving single-threaded fairness for concurrent socket pairs.
Corosio does not yet support concurrency hints, so passing num_threads to Asio's io_context gives it an unfair locking optimization advantage. Default-construct all io_context instances for an apples-to-apples comparison.
Two changes to the epoll scheduler's inline completion budget: 1. Remove the private_queue.empty() gate from try_consume_inline_budget(). In bidirectional mode, descriptor_state produces two completions per epoll event (read + write); the second is posted to the private queue, which caused the gate to block all subsequent inline completions. 2. Raise the unassisted fairness cap from 1 to 4. The old cap of 1 effectively disabled inline completions in single-threaded mode, negating the symmetric transfer fast path for small-buffer streaming. A cap of 4 amortizes scheduling overhead without filling socket buffers at large transfer sizes.
📝 WalkthroughWalkthroughThis change updates allocator function calls in tcp_server.hpp and refactors the epoll scheduler implementation to manage inline budget and context state through new Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts (beta)
No actionable comments were generated in the recent review. 🎉 Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #143 +/- ##
===========================================
- Coverage 81.24% 80.96% -0.28%
===========================================
Files 64 64
Lines 5710 5721 +11
===========================================
- Hits 4639 4632 -7
- Misses 1071 1089 +18
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
An automated preview of the documentation is available at https://143.corosio.prtest3.cppalliance.org/index.html If more commits are pushed to the pull request, the docs will rebuild at the same URL. 2026-02-13 18:07:00 UTC |
Summary by CodeRabbit