Skip to content

perf: cut IOCP syscalls per connection, per post and per TCP transfer - #420

Draft
TheLingeringWill wants to merge 28 commits into
cppalliance:developfrom
TheLingeringWill:pr/iocp-perf-pass
Draft

TheLingeringWill wants to merge 28 commits into
cppalliance:developfrom
TheLingeringWill:pr/iocp-perf-pass

Conversation

@TheLingeringWill

@TheLingeringWill TheLingeringWill commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

corosio's IOCP backend made syscalls that asio's does not, and the Windows benchmark report showed it about 5% behind asio coroutines on accept_churn and 3% on pingpong latency. This PR removes those calls. It also skips the completion port for work a loop thread gives itself and for TCP reads and writes that finish during the call. The two allocation sites #383 names were already removed on develop by 8efad53.

Changes

  • Accept reads both endpoints from the AcceptEx buffer instead of calling getsockname and getpeername.
  • Connect no longer calls getsockname. The first local_endpoint() fetches and caches it.
  • Close, cancel and open() wake the wait reactor only when it holds a wait. Close calls CancelIoEx only when an operation is in the kernel.
  • Wait reactor: removing an entry no longer shifts the table, and draining the wakeup channel takes one recv, not two.
  • Fix: the waitable timer is now armed under the dispatch lock. Two threads arming at once could make the earlier timer fire late.
  • File wrappers move their stop token instead of copying it.
  • Run loop: when one thread runs the loop, it keeps its own posts in a private queue and takes up to 64 completions per call. A post from a handler costs no syscall, where it cost two. With several loop threads, and in run_one(), poll_one() and wait_one(), nothing changes.
  • TCP reads and writes: sockets the library opens or accepts use FILE_SKIP_COMPLETION_PORT_ON_SUCCESS. A read or write that finishes during the call resumes its coroutine at once, up to inline_budget_max times per handler. Transfers above 64 KiB still go through the loop. UDP, files, pipes and accept are unchanged.

Behavior changes:

  • A TCP socket the library opened or accepted keeps skip-on-success mode after release(). Windows cannot clear it. tcp_socket::assign() now accepts such sockets.
  • inline_budget_max now applies to IOCP. Zero turns inline completion off.
  • A handler's own posts run before older completions waiting in the port.

Measurements

Benchmark workflow (Windows x64), before the run-loop and TCP changes: all 9 accept_churn benchmarks are 3.5–4.4% faster. Pingpong latency gains 0.4–1.3%. Nothing else moves beyond noise.

The run-loop and TCP changes are measured locally only (Windows 11 ARM64 VM, 4 cores, clang, Release). Against the commit before them, 85 benchmarks, median +31%:

category Δ
io_context, one thread +87% to +91%
io_context, several threads +4% to +7%
socket_latency +38% to +47%
socket_throughput, up to 16 KiB chunks +33% to +49%
socket_throughput, 64 KiB chunks +14% to +18%
socket_throughput, 256 KiB and 1 MiB chunks −1% to +4%
socket_throughput, multithread +16% to +26%
http_server +11% to +30%
fan_out +27% to +36%
accept_churn −6% to +1%

accept_churn loses part of its earlier gain: each socket pays one more syscall to enter skip-on-success mode.

Against asio in the same binary (83 benchmarks), corosio is faster on 68, with a median of +29% over callbacks and +33% over coroutines. It is slower on 1 against callbacks (io_context/multithreaded/8, −15%, already behind before this PR) and on 5 against coroutines (accept_churn, −3% to −5%).

Testing

  • New iocp_faults tests cover accept endpoints, the deferred connect endpoint, and wait-reactor wakeups.
  • New iocp_paths tests cover adopting a skip-on-success TCP socket, re-adopting a released socket, and run() continuing after a restart and after a timer fires.
  • Fault harness: it now hooks GetQueuedCompletionStatusEx and SetFileCompletionNotificationModes.
  • Adapted tests: fault tests that fail a post from a handler now drive the loop with run_one(). testPostDeferredFallbackRuns is removed because the re-post it tested no longer exists.

Locally the unit suite passes (84 suites), and passes again with skip-on-success compiled out. The fault suite, run from the build tree, has the same 35 failures as before the run-loop and TCP changes. CI has not finished on the latest push.

Part of #383

@coderabbitai

coderabbitai Bot commented Nov 14, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@cppalliance-bot

cppalliance-bot commented Nov 14, 2026 •

Copy link
Copy Markdown

An automated preview of the documentation is available at https://420.corosio.prtest3.cppalliance.org/index.html

If more commits are pushed to the pull request, the docs will rebuild at the same URL.

2026-11-24 12:16:47 UTC

@cppalliance-bot

cppalliance-bot commented Nov 14, 2026 •

Copy link
Copy Markdown

GCOVR code coverage report https://420.corosio.prtest3.cppalliance.org/gcovr/index.html
LCOV code coverage report https://420.corosio.prtest3.cppalliance.org/genhtml/index.html
Coverage Diff Report https://420.corosio.prtest3.cppalliance.org/diff-report/index.html

Build time: 2026-11-24 12:36:17 UTC

Each accept asked the kernel for both endpoints of the new connection,
one getsockname and one getpeername, although AcceptEx had already
written both addresses into the buffer it was given. The tcp service now
looks up GetAcceptExSockaddrs next to AcceptEx and the accept parses the
two addresses out of that buffer, which takes no syscall.

A provider that does not hand out GetAcceptExSockaddrs leaves the
accept asking the kernel as before.
A successful connect called getsockname to cache a local endpoint that
most connections never read. It now marks the endpoint pending, and the
first local_endpoint() call fetches and caches it, as the io_uring
backend does since it stopped fetching it eagerly. One reader claims
the fill and a reader racing it fetches its own copy, so concurrent
calls never read the cache while it is being written. A fetch that
fails caches nothing, and the next call asks again.

ConnectEx needs a bound socket, and an endpoint left unfetched says the
socket most likely is one. The mark can outlive the socket it described
when a late completion races a close and reopen, so a connect over it
tries the bind anyway and lets an "already bound" refusal through to
ConnectEx. A second connect on a connected socket still fails as it did
before, at ConnectEx.

The local_endpoint() documentation now says the endpoint may be cached
by the first call after a connect rather than at the connect.
Every socket close and cancel asked the wait reactor to drop the
socket's wait op, parked or not, and every open() closes first. Once the
polling thread exists, each ask took the reactor lock, sent a byte down
the wakeup channel, and made the thread wake, search its table and
rebuild its poll set, for a socket that in nearly every case had nothing
parked.

Ops now carry a flag the reactor sets when a register queues them and
clears before it completes them. A cancel reads it under the reactor
lock and returns when it is clear: the op is not held, so there is
nothing to drop. A cancel that comes before the register is still caught
there by the op's cancelled flag, and one that races the reactor letting
go of the op is dropped by the table search as before.

Two fault tests used a cancel with nothing parked as a wake that always
reaches the polling thread. testWakeSendFails now parks its wait again
after every cancel, and testWaitReactorPollFails wakes the thread with a
register.
Removing a fired, cancelled or refused wait erased it from the middle of
the table, moving every entry after it down, so k completions out of n
parked waits cost O(k*n) moves. The table has no order, so the last
entry now fills the hole; the walks that remove as they go run from the
back, so the entry moved was already examined and the slots below it
keep their poll set entries.

Draining the wakeup channel read until recv failed, which took a second
recv on every wake just to hear WSAEWOULDBLOCK. Only the sender that
turns wake_pending_ from false to true writes a byte, so the channel
holds one at a time and a short read has emptied it.
update_timeout read the earliest expiry and set the waitable timer with
no lock held. Two threads arming at once could read different expiries
and set the timer in the opposite order, leaving the later deadline set,
so the earlier timer fired late, at the later one's deadline. A thread
inserting a new earliest timer races the run thread re-arming after a
fire the same way.

The read and the arm now happen under the dispatch lock, as asio arms
its timer. A new earliest expiry is published before its notification
takes the lock, so the last thread through always arms the earliest
one.
The stream and random-access file wrappers passed their by-value stop
token on by copy, so every read and write took and dropped a reference
on the stop state. They now move it, as the stream handle already does.
@pgit

pgit commented Nov 14, 2026

Copy link
Copy Markdown

There is something weird with the unit tests in the CI:

https://github.com/cppalliance/corosio/actions/runs/43557619651/job/132334044957?pr=420#step:31:1168

          Start  87: boost.corosio.wolfssl_engine
   84/245 Test  #87: boost.corosio.wolfssl_engine ...............................   Passed    0.21 sec
          Start  88: boost.corosio.wolfssl_stream
   85/245 Test  #78: boost.corosio.udp_socket.iocp ..............................   Passed    1.49 sec
          Start  89: fault
   86/245 Test  #89: fault ......................................................   Passed    0.01 sec
          Start  90: harness:
   87/245 Test  #90: harness: ...................................................   Passed    0.01 sec
          Start  91: pthread_create
   88/245 Test  #91: pthread_create .............................................   Passed    0.01 sec

@sgerbino sgerbino added the benchmark Triggers benchmark suite label Nov 16, 2026
@github-actions github-actions Bot removed the benchmark Triggers benchmark suite label Nov 16, 2026
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Benchmark report

efa2665da154 (base) vs 776bf1e174ad (head)

  • ✅ linux — clean (epoll, uring)
  • ⚠️ windows — 61 flagged (iocp)
  • ✅ macos — clean (kqueue)

⚠️ Flagged

Platform Backend Benchmark Metric Base Head Δ Noise
windows iocp accept_churn/burst/10 ops_per_sec 1.56K ops/s 1.64K ops/s 🟢▲ +5.09% 0.48%
windows iocp accept_churn/burst/100 ops_per_sec 155.8 ops/s 166.0 ops/s 🟢▲ +6.43% 0.39%
windows iocp accept_churn/burst_lockless/10 ops_per_sec 1.56K ops/s 1.64K ops/s 🟢▲ +5.31% 0.23%
windows iocp accept_churn/burst_lockless/100 ops_per_sec 159.2 ops/s 168.3 ops/s 🟢▲ +5.51% 0.72%
windows iocp accept_churn/concurrent/1 ops_per_sec 12.52K ops/s 13.27K ops/s 🟢▲ +5.83% 0.21%
windows iocp accept_churn/concurrent/4 ops_per_sec 13.14K ops/s 13.51K ops/s 🟢▲ +2.71% 0.30%
windows iocp accept_churn/sequential ops_per_sec 12.45K ops/s 13.18K ops/s 🟢▲ +5.97% 0.18%
windows iocp accept_churn/sequential_lockless ops_per_sec 12.50K ops/s 13.29K ops/s 🟢▲ +6.37% 0.38%
windows iocp fan_out/concurrent_parents/1 ops_per_sec 7.36K ops/s 7.76K ops/s 🟢▲ +5.33% 0.30%
windows iocp fan_out/concurrent_parents/16 ops_per_sec 6.76K ops/s 7.70K ops/s 🟢▲ +13.78% 0.83%
windows iocp fan_out/concurrent_parents/4 ops_per_sec 7.24K ops/s 7.71K ops/s 🟢▲ +6.17% 0.75%
windows iocp fan_out/concurrent_parents_lockless/1 ops_per_sec 7.36K ops/s 7.80K ops/s 🟢▲ +6.02% 0.35%
windows iocp fan_out/concurrent_parents_lockless/16 ops_per_sec 6.79K ops/s 7.71K ops/s 🟢▲ +13.50% 0.65%
windows iocp fan_out/concurrent_parents_lockless/4 ops_per_sec 7.26K ops/s 7.74K ops/s 🟢▲ +6.26% 0.52%
windows iocp fan_out/fork_join/16 ops_per_sec 7.35K ops/s 7.76K ops/s 🟢▲ +5.68% 0.23%
windows iocp fan_out/fork_join/4 ops_per_sec 29.15K ops/s 30.51K ops/s 🟢▲ +4.73% 0.31%
windows iocp fan_out/fork_join/64 ops_per_sec 1.81K ops/s 1.92K ops/s 🟢▲ +5.50% 1.56%
windows iocp fan_out/fork_join_lockless/16 ops_per_sec 7.35K ops/s 7.80K ops/s 🟢▲ +5.95% 0.40%
windows iocp fan_out/fork_join_lockless/4 ops_per_sec 29.14K ops/s 30.62K ops/s 🟢▲ +5.27% 0.28%
windows iocp fan_out/fork_join_lockless/64 ops_per_sec 1.80K ops/s 1.94K ops/s 🟢▲ +7.29% 1.90%
windows iocp fan_out/nested/16 ops_per_sec 1.78K ops/s 1.91K ops/s 🟢▲ +6.57% 1.45%
windows iocp fan_out/nested/4 ops_per_sec 7.22K ops/s 7.69K ops/s 🟢▲ +6.39% 0.29%
windows iocp fan_out/nested_lockless/16 ops_per_sec 1.79K ops/s 1.92K ops/s 🟢▲ +7.23% 0.95%
windows iocp fan_out/nested_lockless/4 ops_per_sec 7.23K ops/s 7.71K ops/s 🟢▲ +6.73% 0.31%
windows iocp http_server/concurrent/1 ops_per_sec 110.7K ops/s 107.4K ops/s 🔴▼ -3.14% 0.60%
windows iocp http_server/concurrent/16 ops_per_sec 107.8K ops/s 113.2K ops/s 🟢▲ +4.75% 0.39%
windows iocp http_server/concurrent/32 ops_per_sec 107.0K ops/s 112.9K ops/s 🟢▲ +5.19% 0.70%
windows iocp http_server/concurrent/4 ops_per_sec 108.5K ops/s 113.0K ops/s 🟢▲ +4.05% 0.26%
windows iocp http_server/multithread/1 ops_per_sec 107.0K ops/s 112.9K ops/s 🟢▲ +5.41% 0.73%
windows iocp http_server/multithread/16 ops_per_sec 263.6K ops/s 309.4K ops/s 🟢▲ +16.97% 0.88%
windows iocp http_server/multithread/2 ops_per_sec 180.4K ops/s 194.0K ops/s 🟢▲ +7.55% 1.09%
windows iocp http_server/multithread/4 ops_per_sec 223.3K ops/s 252.4K ops/s 🟢▲ +13.58% 1.29%
windows iocp http_server/multithread/8 ops_per_sec 263.9K ops/s 309.0K ops/s 🟢▲ +17.10% 0.49%
windows iocp http_server/single_conn ops_per_sec 111.0K ops/s 107.7K ops/s 🔴▼ -3.11% 0.40%
windows iocp http_server/single_conn_lockless ops_per_sec 110.7K ops/s 107.4K ops/s 🔴▼ -2.87% 0.37%
windows iocp socket_latency/concurrent/1 latency_mean_ns 7.60 µs 6.25 µs 🟢▲ +17.97% 0.31%
windows iocp socket_latency/concurrent/16 latency_mean_ns 133.98 µs 101.76 µs 🟢▲ +24.25% 4.87%
windows iocp socket_latency/concurrent/4 latency_mean_ns 30.47 µs 25.22 µs 🟢▲ +17.11% 0.35%
windows iocp socket_latency/concurrent_lockless/1 latency_mean_ns 7.62 µs 6.24 µs 🟢▲ +18.09% 0.26%
windows iocp socket_latency/concurrent_lockless/16 latency_mean_ns 122.41 µs 101.17 µs 🟢▲ +16.93% 1.00%
windows iocp socket_latency/concurrent_lockless/4 latency_mean_ns 30.44 µs 25.16 µs 🟢▲ +17.24% 0.25%
windows iocp socket_latency/pingpong/1 latency_mean_ns 7.60 µs 6.24 µs 🟢▲ +17.92% 0.31%
windows iocp socket_latency/pingpong/1024 latency_mean_ns 7.68 µs 6.32 µs 🟢▲ +17.77% 0.56%
windows iocp socket_latency/pingpong/64 latency_mean_ns 7.58 µs 6.24 µs 🟢▲ +17.81% 0.36%
windows iocp socket_latency/pingpong_lockless/1 latency_mean_ns 7.58 µs 6.19 µs 🟢▲ +18.14% 0.45%
windows iocp socket_latency/pingpong_lockless/1024 latency_mean_ns 7.69 µs 6.32 µs 🟢▲ +17.78% 0.41%
windows iocp socket_latency/pingpong_lockless/64 latency_mean_ns 7.60 µs 6.23 µs 🟢▲ +18.01% 0.51%
windows iocp socket_throughput/bidirectional/1024 bytes_per_sec 281.1 MB/s 369.4 MB/s 🟢▲ +31.28% 0.26%
windows iocp socket_throughput/bidirectional/16384 bytes_per_sec 3.74 GB/s 4.21 GB/s 🟢▲ +12.35% 0.74%
windows iocp socket_throughput/bidirectional/4096 bytes_per_sec 1.08 GB/s 1.34 GB/s 🟢▲ +23.52% 4.22%
windows iocp socket_throughput/bidirectional/65536 bytes_per_sec 9.10 GB/s 8.19 GB/s 🔴▼ -10.07% 1.23%
windows iocp socket_throughput/bidirectional_lockless/1024 bytes_per_sec 281.1 MB/s 357.4 MB/s 🟢▲ +29.58% 4.40%
windows iocp socket_throughput/bidirectional_lockless/16384 bytes_per_sec 3.72 GB/s 4.21 GB/s 🟢▲ +13.47% 0.95%
windows iocp socket_throughput/bidirectional_lockless/4096 bytes_per_sec 1.07 GB/s 1.39 GB/s 🟢▲ +29.83% 2.42%
windows iocp socket_throughput/bidirectional_lockless/65536 bytes_per_sec 8.94 GB/s 8.19 GB/s 🔴▼ -8.00% 1.13%
windows iocp socket_throughput/multithread/2 bytes_per_sec 12.61 GB/s 6.74 GB/s 🔴▼ -46.38% 1.49%
windows iocp socket_throughput/multithread/4 bytes_per_sec 16.84 GB/s 8.35 GB/s 🔴▼ -50.62% 1.50%
windows iocp socket_throughput/multithread/8 bytes_per_sec 18.35 GB/s 9.29 GB/s 🔴▼ -49.13% 0.99%
windows iocp socket_throughput/unidirectional_lockless/1024 bytes_per_sec 283.8 MB/s 370.6 MB/s 🟢▲ +30.38% 0.45%
windows iocp socket_throughput/unidirectional_lockless/4096 bytes_per_sec 1.09 GB/s 1.40 GB/s 🟢▲ +28.79% 0.54%
windows iocp socket_throughput/unidirectional_lockless/65536 bytes_per_sec 9.34 GB/s 8.20 GB/s 🔴▼ -12.42% 1.35%
linux — full results (226 benchmarks, 5 iterations, 1.5s each)

accept_churn

Benchmark Backend Metric Base Head Δ Noise
burst/10 epoll ops_per_sec 2.03K ops/s 2.03K ops/s 🔴▼ -0.23% 0.90%
burst/10 uring ops_per_sec 2.43K ops/s 2.43K ops/s 🔴▼ -0.10% 1.31%
burst/100 epoll ops_per_sec 206.4 ops/s 205.2 ops/s 🔴▼ -0.19% 0.97%
burst/100 uring ops_per_sec 248.7 ops/s 249.6 ops/s 🔴▼ -0.05% 0.68%
burst_lockless/10 epoll ops_per_sec 2.04K ops/s 2.04K ops/s 🟢▲ +0.26% 0.98%
burst_lockless/10 uring ops_per_sec 2.42K ops/s 2.44K ops/s 🔴▼ -0.13% 1.13%
burst_lockless/100 epoll ops_per_sec 207.7 ops/s 206.8 ops/s 🟢▲ +0.04% 0.97%
burst_lockless/100 uring ops_per_sec 249.1 ops/s 249.7 ops/s 🔴▼ -0.24% 0.69%
concurrent/1 epoll ops_per_sec 16.20K ops/s 16.17K ops/s 🔴▼ -0.17% 1.51%
concurrent/1 uring ops_per_sec 17.53K ops/s 17.63K ops/s 🔴▼ -0.28% 1.34%
concurrent/16 epoll ops_per_sec 16.19K ops/s 16.25K ops/s 🟢▲ +0.18% 1.39%
concurrent/16 uring ops_per_sec 19.10K ops/s 19.10K ops/s 🟢▲ +0.04% 1.25%
concurrent/4 epoll ops_per_sec 16.22K ops/s 16.26K ops/s 🟢▲ +0.19% 1.47%
concurrent/4 uring ops_per_sec 18.12K ops/s 18.19K ops/s 🟢▲ +0.07% 1.29%
sequential epoll ops_per_sec 16.24K ops/s 16.25K ops/s 🔴▼ -0.33% 1.53%
sequential uring ops_per_sec 17.42K ops/s 17.54K ops/s 🟢▲ +0.57% 1.50%
sequential_lockless epoll ops_per_sec 16.32K ops/s 16.31K ops/s 🟢▲ +0.12% 1.28%
sequential_lockless uring ops_per_sec 17.59K ops/s 17.72K ops/s 🟢▲ +0.45% 1.40%

fan_out

Benchmark Backend Metric Base Head Δ Noise
concurrent_parents/1 epoll ops_per_sec 3.96K ops/s 3.97K ops/s 🔴▼ -0.33% 1.21%
concurrent_parents/1 uring ops_per_sec 4.08K ops/s 4.07K ops/s 🔴▼ -0.22% 0.40%
concurrent_parents/16 epoll ops_per_sec 3.87K ops/s 3.88K ops/s 🔴▼ -0.07% 1.16%
concurrent_parents/16 uring ops_per_sec 4.00K ops/s 3.98K ops/s 🔴▼ -0.19% 0.89%
concurrent_parents/4 epoll ops_per_sec 3.88K ops/s 3.89K ops/s 🟢▲ +0.07% 1.16%
concurrent_parents/4 uring ops_per_sec 4.04K ops/s 4.02K ops/s 🔴▼ -0.15% 0.96%
concurrent_parents_lockless/1 epoll ops_per_sec 3.98K ops/s 4.00K ops/s 🟢▲ +0.28% 1.33%
concurrent_parents_lockless/1 uring ops_per_sec 4.12K ops/s 4.12K ops/s 🔴▼ -0.20% 1.15%
concurrent_parents_lockless/16 epoll ops_per_sec 3.89K ops/s 3.89K ops/s 🟢▲ +0.21% 1.04%
concurrent_parents_lockless/16 uring ops_per_sec 4.03K ops/s 4.02K ops/s 🔴▼ -0.06% 0.99%
concurrent_parents_lockless/4 epoll ops_per_sec 3.89K ops/s 3.91K ops/s 🟢▲ +0.29% 1.24%
concurrent_parents_lockless/4 uring ops_per_sec 4.07K ops/s 4.07K ops/s 🔴▼ -0.28% 1.14%
fork_join/1 epoll ops_per_sec 58.07K ops/s 57.75K ops/s 🔴▼ -0.14% 1.00%
fork_join/1 uring ops_per_sec 56.15K ops/s 55.73K ops/s 🔴▼ -0.44% 1.03%
fork_join/16 epoll ops_per_sec 3.96K ops/s 3.94K ops/s 🔴▼ -0.28% 1.06%
fork_join/16 uring ops_per_sec 4.09K ops/s 4.06K ops/s 🔴▼ -0.35% 1.07%
fork_join/4 epoll ops_per_sec 15.65K ops/s 15.57K ops/s 🔴▼ -0.13% 0.85%
fork_join/4 uring ops_per_sec 15.40K ops/s 15.31K ops/s 🔴▼ -0.25% 1.04%
fork_join/64 epoll ops_per_sec 970.7 ops/s 967.5 ops/s 🟢▲ +0.05% 0.96%
fork_join/64 uring ops_per_sec 1.01K ops/s 1.01K ops/s 🔴▼ -0.22% 1.00%
fork_join_lockless/1 epoll ops_per_sec 58.60K ops/s 58.41K ops/s 🔴▼ -0.10% 0.94%
fork_join_lockless/1 uring ops_per_sec 57.00K ops/s 56.77K ops/s 🔴▼ -0.37% 0.94%
fork_join_lockless/16 epoll ops_per_sec 3.99K ops/s 3.96K ops/s 🔴▼ -0.14% 1.01%
fork_join_lockless/16 uring ops_per_sec 4.13K ops/s 4.11K ops/s 🔴▼ -0.49% 1.07%
fork_join_lockless/4 epoll ops_per_sec 15.75K ops/s 15.67K ops/s 🔴▼ -0.20% 0.93%
fork_join_lockless/4 uring ops_per_sec 15.59K ops/s 15.51K ops/s 🔴▼ -0.65% 1.20%
fork_join_lockless/64 epoll ops_per_sec 974.0 ops/s 971.8 ops/s 🔴▼ -0.01% 1.00%
fork_join_lockless/64 uring ops_per_sec 1.02K ops/s 1.02K ops/s 🔴▼ -0.34% 1.11%
nested/16 epoll ops_per_sec 966.5 ops/s 966.8 ops/s 🟢▲ +0.14% 0.98%
nested/16 uring ops_per_sec 1.01K ops/s 1.01K ops/s 🟢▲ +0.14% 1.05%
nested/4 epoll ops_per_sec 3.93K ops/s 3.94K ops/s 🟢▲ +0.21% 0.99%
nested/4 uring ops_per_sec 4.08K ops/s 4.07K ops/s 🟢▲ +0.08% 1.02%
nested_lockless/16 epoll ops_per_sec 970.8 ops/s 975.4 ops/s 🔴▼ -0.08% 1.04%
nested_lockless/16 uring ops_per_sec 1.01K ops/s 1.01K ops/s 🟢▲ +0.13% 1.10%
nested_lockless/4 epoll ops_per_sec 3.96K ops/s 3.97K ops/s 🔴▼ -0.10% 1.03%
nested_lockless/4 uring ops_per_sec 4.10K ops/s 4.11K ops/s 🟢▲ +0.02% 1.05%

http_server

Benchmark Backend Metric Base Head Δ Noise
concurrent/1 epoll ops_per_sec 59.46K ops/s 59.58K ops/s 🔴▼ -0.25% 1.32%
concurrent/1 uring ops_per_sec 55.34K ops/s 55.29K ops/s 🔴▼ -0.26% 0.61%
concurrent/16 epoll ops_per_sec 62.23K ops/s 62.43K ops/s 🟢▲ +0.08% 1.00%
concurrent/16 uring ops_per_sec 65.33K ops/s 65.50K ops/s 🔴▼ -0.25% 0.86%
concurrent/32 epoll ops_per_sec 61.80K ops/s 61.99K ops/s 🔴▼ -0.04% 0.85%
concurrent/32 uring ops_per_sec 65.10K ops/s 65.08K ops/s 🟢▲ +0.12% 0.26%
concurrent/4 epoll ops_per_sec 62.23K ops/s 62.33K ops/s 🔴▼ -0.11% 1.03%
concurrent/4 uring ops_per_sec 63.23K ops/s 63.32K ops/s 🔴▼ -0.09% 0.96%
multithread/1 epoll ops_per_sec 61.71K ops/s 62.00K ops/s 🟢▲ +0.16% 0.88%
multithread/1 uring ops_per_sec 65.03K ops/s 65.08K ops/s 🟢▲ +0.06% 0.32%
multithread/16 epoll ops_per_sec 173.2K ops/s 173.0K ops/s ⚪ 0.00% 0.33%
multithread/16 uring ops_per_sec 103.6K ops/s 103.6K ops/s 🔴▼ -0.19% 0.48%
multithread/2 epoll ops_per_sec 94.05K ops/s 94.26K ops/s 🟢▲ +0.52% 0.54%
multithread/2 uring ops_per_sec 79.02K ops/s 78.69K ops/s 🔴▼ -0.48% 0.50%
multithread/4 epoll ops_per_sec 168.8K ops/s 170.8K ops/s 🟢▲ +1.28% 0.61%
multithread/4 uring ops_per_sec 124.5K ops/s 124.8K ops/s 🟢▲ +0.62% 0.63%
multithread/8 epoll ops_per_sec 172.4K ops/s 172.3K ops/s 🟢▲ +0.07% 0.55%
multithread/8 uring ops_per_sec 116.4K ops/s 116.4K ops/s 🟢▲ +0.09% 0.27%
single_conn epoll ops_per_sec 59.35K ops/s 59.29K ops/s 🔴▼ -0.16% 1.17%
single_conn uring ops_per_sec 55.34K ops/s 55.45K ops/s ⚪ 0.00% 0.65%
single_conn_lockless epoll ops_per_sec 59.91K ops/s 59.94K ops/s 🔴▼ -0.12% 1.12%
single_conn_lockless uring ops_per_sec 56.52K ops/s 56.39K ops/s 🔴▼ -0.35% 0.63%

local_socket_latency

Benchmark Backend Metric Base Head Δ Noise
concurrent/1 epoll latency_mean_ns 6.97 µs 6.85 µs 🔴▼ -0.13% 4.84%
concurrent/1 uring latency_mean_ns 5.31 µs 5.28 µs 🟢▲ +0.52% 0.12%
concurrent/16 epoll latency_mean_ns 104.03 µs 104.25 µs 🟢▲ +0.21% 0.50%
concurrent/16 uring latency_mean_ns 87.66 µs 87.18 µs 🟢▲ +0.37% 0.31%
concurrent/4 epoll latency_mean_ns 26.12 µs 26.20 µs 🔴▼ -1.75% 1.52%
concurrent/4 uring latency_mean_ns 21.87 µs 21.72 µs 🟢▲ +0.54% 1.61%
concurrent_lockless/1 epoll latency_mean_ns 6.66 µs 6.94 µs 🔴▼ -0.10% 5.90%
concurrent_lockless/1 uring latency_mean_ns 5.42 µs 5.39 µs 🟢▲ +0.72% 5.69%
concurrent_lockless/16 epoll latency_mean_ns 102.74 µs 103.00 µs 🔴▼ -0.12% 1.00%
concurrent_lockless/16 uring latency_mean_ns 87.16 µs 86.76 µs 🟢▲ +0.25% 0.96%
concurrent_lockless/4 epoll latency_mean_ns 25.88 µs 26.04 µs 🔴▼ -2.04% 2.11%
concurrent_lockless/4 uring latency_mean_ns 21.53 µs 21.50 µs 🔴▼ -0.05% 2.14%
pingpong/1 epoll latency_mean_ns 6.77 µs 6.76 µs 🔴▼ -0.29% 3.46%
pingpong/1 uring latency_mean_ns 5.36 µs 5.35 µs 🟢▲ +0.74% 5.75%
pingpong/1024 epoll latency_mean_ns 7.34 µs 7.52 µs 🔴▼ -0.32% 4.73%
pingpong/1024 uring latency_mean_ns 5.93 µs 5.77 µs 🟢▲ +0.47% 5.95%
pingpong/64 epoll latency_mean_ns 6.81 µs 6.82 µs 🔴▼ -0.11% 4.91%
pingpong/64 uring latency_mean_ns 5.43 µs 5.32 µs 🟢▲ +0.56% 5.75%
pingpong_lockless/1 epoll latency_mean_ns 6.61 µs 6.61 µs 🔴▼ -0.04% 0.97%
pingpong_lockless/1 uring latency_mean_ns 5.37 µs 5.22 µs 🟢▲ +0.71% 5.91%
pingpong_lockless/1024 epoll latency_mean_ns 7.18 µs 7.03 µs 🟢▲ +1.53% 5.14%
pingpong_lockless/1024 uring latency_mean_ns 6.00 µs 5.96 µs 🟢▲ +0.44% 5.38%
pingpong_lockless/64 epoll latency_mean_ns 6.79 µs 6.67 µs 🔴▼ -0.07% 4.70%
pingpong_lockless/64 uring latency_mean_ns 5.39 µs 5.27 µs 🟢▲ +0.48% 4.13%

local_socket_throughput

Benchmark Backend Metric Base Head Δ Noise
bidirectional/1024 epoll bytes_per_sec 315.5 MB/s 315.3 MB/s 🔴▼ -0.88% 1.95%
bidirectional/1024 uring bytes_per_sec 362.8 MB/s 360.2 MB/s 🔴▼ -0.15% 0.99%
bidirectional/1048576 epoll bytes_per_sec 3.30 GB/s 3.18 GB/s 🔴▼ -3.59% 3.26%
bidirectional/1048576 uring bytes_per_sec 3.58 GB/s 3.55 GB/s 🟢▲ +1.63% 4.87%
bidirectional/16384 epoll bytes_per_sec 3.11 GB/s 3.15 GB/s 🔴▼ -0.22% 3.15%
bidirectional/16384 uring bytes_per_sec 3.06 GB/s 3.01 GB/s 🔴▼ -2.16% 2.89%
bidirectional/262144 epoll bytes_per_sec 3.24 GB/s 3.29 GB/s 🟢▲ +2.17% 1.70%
bidirectional/262144 uring bytes_per_sec 3.56 GB/s 3.47 GB/s 🔴▼ -1.15% 2.48%
bidirectional/4096 epoll bytes_per_sec 1.03 GB/s 1.03 GB/s 🟢▲ +0.22% 1.07%
bidirectional/4096 uring bytes_per_sec 1.15 GB/s 1.14 GB/s 🔴▼ -0.19% 0.68%
bidirectional/65536 epoll bytes_per_sec 2.99 GB/s 3.02 GB/s 🟢▲ +0.55% 1.84%
bidirectional/65536 uring bytes_per_sec 3.52 GB/s 3.33 GB/s 🔴▼ -4.37% 5.41%
bidirectional_lockless/1024 epoll bytes_per_sec 314.2 MB/s 314.3 MB/s 🟢▲ +0.31% 0.76%
bidirectional_lockless/1024 uring bytes_per_sec 360.5 MB/s 361.0 MB/s 🟢▲ +0.33% 0.51%
bidirectional_lockless/1048576 epoll bytes_per_sec 3.31 GB/s 3.17 GB/s 🔴▼ -5.04% 2.62%
bidirectional_lockless/1048576 uring bytes_per_sec 3.60 GB/s 3.53 GB/s 🔴▼ -3.49% 3.41%
bidirectional_lockless/16384 epoll bytes_per_sec 3.14 GB/s 3.16 GB/s 🔴▼ -0.41% 3.45%
bidirectional_lockless/16384 uring bytes_per_sec 3.07 GB/s 3.02 GB/s 🔴▼ -1.70% 2.33%
bidirectional_lockless/262144 epoll bytes_per_sec 3.25 GB/s 3.30 GB/s 🟢▲ +2.58% 1.58%
bidirectional_lockless/262144 uring bytes_per_sec 3.55 GB/s 3.50 GB/s 🔴▼ -2.71% 3.09%
bidirectional_lockless/4096 epoll bytes_per_sec 1.04 GB/s 1.03 GB/s 🔴▼ -0.54% 0.98%
bidirectional_lockless/4096 uring bytes_per_sec 1.15 GB/s 1.15 GB/s 🟢▲ +0.17% 0.88%
bidirectional_lockless/65536 epoll bytes_per_sec 3.02 GB/s 3.02 GB/s 🟢▲ +0.68% 1.56%
bidirectional_lockless/65536 uring bytes_per_sec 3.52 GB/s 3.32 GB/s 🔴▼ -4.66% 5.60%
unidirectional/1024 epoll bytes_per_sec 303.6 MB/s 304.9 MB/s 🟢▲ +0.37% 1.04%
unidirectional/1024 uring bytes_per_sec 361.6 MB/s 359.9 MB/s 🔴▼ -0.70% 1.09%
unidirectional/1048576 epoll bytes_per_sec 3.37 GB/s 3.26 GB/s 🔴▼ -4.29% 2.33%
unidirectional/1048576 uring bytes_per_sec 3.60 GB/s 3.55 GB/s 🟢▲ +0.87% 3.68%
unidirectional/16384 epoll bytes_per_sec 3.16 GB/s 3.02 GB/s 🔴▼ -2.45% 5.75%
unidirectional/16384 uring bytes_per_sec 3.00 GB/s 3.01 GB/s 🟢▲ +1.89% 2.76%
unidirectional/262144 epoll bytes_per_sec 3.33 GB/s 3.37 GB/s 🟢▲ +2.41% 1.61%
unidirectional/262144 uring bytes_per_sec 3.57 GB/s 3.47 GB/s 🔴▼ -1.84% 2.66%
unidirectional/4096 epoll bytes_per_sec 1.00 GB/s 1.01 GB/s 🟢▲ +0.33% 0.99%
unidirectional/4096 uring bytes_per_sec 1.15 GB/s 1.15 GB/s 🔴▼ -0.96% 0.93%
unidirectional/65536 epoll bytes_per_sec 3.32 GB/s 3.31 GB/s 🔴▼ -0.79% 1.98%
unidirectional/65536 uring bytes_per_sec 3.54 GB/s 3.38 GB/s 🔴▼ -2.52% 4.87%
unidirectional_lockless/1024 epoll bytes_per_sec 307.4 MB/s 306.2 MB/s 🔴▼ -0.88% 1.16%
unidirectional_lockless/1024 uring bytes_per_sec 362.0 MB/s 361.0 MB/s 🟢▲ +0.02% 0.77%
unidirectional_lockless/1048576 epoll bytes_per_sec 3.38 GB/s 3.26 GB/s 🔴▼ -4.08% 1.42%
unidirectional_lockless/1048576 uring bytes_per_sec 3.61 GB/s 3.58 GB/s 🔴▼ -1.95% 2.79%
unidirectional_lockless/16384 epoll bytes_per_sec 3.18 GB/s 2.99 GB/s 🔴▼ -4.44% 4.49%
unidirectional_lockless/16384 uring bytes_per_sec 3.07 GB/s 3.07 GB/s 🟢▲ +2.32% 3.51%
unidirectional_lockless/262144 epoll bytes_per_sec 3.33 GB/s 3.36 GB/s 🔴▼ -0.26% 2.22%
unidirectional_lockless/262144 uring bytes_per_sec 3.58 GB/s 3.52 GB/s 🔴▼ -1.59% 3.39%
unidirectional_lockless/4096 epoll bytes_per_sec 1.01 GB/s 1.02 GB/s 🔴▼ -0.56% 1.88%
unidirectional_lockless/4096 uring bytes_per_sec 1.15 GB/s 1.15 GB/s 🟢▲ +0.11% 0.65%
unidirectional_lockless/65536 epoll bytes_per_sec 3.32 GB/s 3.28 GB/s 🟢▲ +0.88% 2.11%
unidirectional_lockless/65536 uring bytes_per_sec 3.55 GB/s 3.45 GB/s 🔴▼ -2.30% 4.96%

socket_latency

Benchmark Backend Metric Base Head Δ Noise
concurrent/1 epoll latency_mean_ns 14.47 µs 14.42 µs 🟢▲ +0.04% 0.69%
concurrent/1 uring latency_mean_ns 13.23 µs 13.25 µs 🟢▲ +0.17% 1.01%
concurrent/16 epoll latency_mean_ns 228.47 µs 228.85 µs 🔴▼ -0.25% 0.19%
concurrent/16 uring latency_mean_ns 213.88 µs 214.20 µs 🔴▼ -0.29% 1.21%
concurrent/4 epoll latency_mean_ns 56.98 µs 57.00 µs 🟢▲ +0.01% 0.25%
concurrent/4 uring latency_mean_ns 53.17 µs 53.15 µs 🔴▼ -0.20% 1.16%
concurrent_lockless/1 epoll latency_mean_ns 14.39 µs 14.35 µs 🔴▼ -0.06% 1.16%
concurrent_lockless/1 uring latency_mean_ns 13.28 µs 13.27 µs 🔴▼ -0.23% 0.72%
concurrent_lockless/16 epoll latency_mean_ns 226.78 µs 226.70 µs 🔴▼ -0.03% 1.10%
concurrent_lockless/16 uring latency_mean_ns 214.47 µs 213.87 µs 🔴▼ -0.18% 1.10%
concurrent_lockless/4 epoll latency_mean_ns 56.53 µs 56.57 µs 🟢▲ +0.02% 1.12%
concurrent_lockless/4 uring latency_mean_ns 53.36 µs 53.18 µs ⚪ 0.00% 0.61%
pingpong/1 epoll latency_mean_ns 14.40 µs 14.34 µs 🟢▲ +0.22% 0.99%
pingpong/1 uring latency_mean_ns 13.13 µs 13.20 µs 🔴▼ -0.25% 1.08%
pingpong/1024 epoll latency_mean_ns 14.73 µs 14.63 µs 🟢▲ +0.12% 0.96%
pingpong/1024 uring latency_mean_ns 13.41 µs 13.50 µs 🔴▼ -0.25% 1.06%
pingpong/64 epoll latency_mean_ns 14.47 µs 14.35 µs 🟢▲ +0.22% 1.19%
pingpong/64 uring latency_mean_ns 13.19 µs 13.26 µs 🔴▼ -0.18% 1.05%
pingpong_lockless/1 epoll latency_mean_ns 14.35 µs 14.27 µs 🟢▲ +0.18% 1.05%
pingpong_lockless/1 uring latency_mean_ns 13.05 µs 13.11 µs 🔴▼ -0.56% 1.05%
pingpong_lockless/1024 epoll latency_mean_ns 14.68 µs 14.60 µs 🟢▲ +0.27% 0.98%
pingpong_lockless/1024 uring latency_mean_ns 13.40 µs 13.47 µs 🟢▲ +0.05% 1.19%
pingpong_lockless/64 epoll latency_mean_ns 14.41 µs 14.34 µs 🟢▲ +0.16% 1.03%
pingpong_lockless/64 uring latency_mean_ns 13.17 µs 13.22 µs 🟢▲ +0.04% 1.21%

socket_throughput

Benchmark Backend Metric Base Head Δ Noise
bidirectional/1024 epoll bytes_per_sec 135.1 MB/s 135.0 MB/s 🔴▼ -0.17% 0.38%
bidirectional/1024 uring bytes_per_sec 152.7 MB/s 152.8 MB/s 🔴▼ -0.17% 1.03%
bidirectional/1048576 epoll bytes_per_sec 3.34 GB/s 3.36 GB/s 🟢▲ +1.06% 2.52%
bidirectional/1048576 uring bytes_per_sec 3.36 GB/s 3.39 GB/s 🟢▲ +1.62% 1.09%
bidirectional/16384 epoll bytes_per_sec 1.63 GB/s 1.63 GB/s 🔴▼ -0.22% 1.14%
bidirectional/16384 uring bytes_per_sec 1.64 GB/s 1.64 GB/s 🟢▲ +0.28% 0.87%
bidirectional/262144 epoll bytes_per_sec 3.25 GB/s 3.25 GB/s 🟢▲ +0.39% 0.62%
bidirectional/262144 uring bytes_per_sec 3.26 GB/s 3.31 GB/s 🟢▲ +1.33% 1.11%
bidirectional/4096 epoll bytes_per_sec 509.4 MB/s 510.6 MB/s 🟢▲ +0.71% 0.44%
bidirectional/4096 uring bytes_per_sec 530.1 MB/s 529.5 MB/s 🔴▼ -0.40% 1.51%
bidirectional/65536 epoll bytes_per_sec 2.59 GB/s 2.60 GB/s 🔴▼ -0.85% 2.75%
bidirectional/65536 uring bytes_per_sec 2.88 GB/s 2.95 GB/s 🟢▲ +2.05% 2.02%
bidirectional_lockless/1024 epoll bytes_per_sec 135.4 MB/s 135.3 MB/s 🔴▼ -0.08% 0.29%
bidirectional_lockless/1024 uring bytes_per_sec 152.8 MB/s 152.9 MB/s 🟢▲ +0.05% 1.07%
bidirectional_lockless/1048576 epoll bytes_per_sec 3.28 GB/s 3.25 GB/s 🔴▼ -1.24% 1.62%
bidirectional_lockless/1048576 uring bytes_per_sec 3.32 GB/s 3.31 GB/s 🔴▼ -0.31% 0.62%
bidirectional_lockless/16384 epoll bytes_per_sec 1.63 GB/s 1.64 GB/s 🟢▲ +0.26% 1.03%
bidirectional_lockless/16384 uring bytes_per_sec 1.61 GB/s 1.59 GB/s 🔴▼ -0.47% 3.87%
bidirectional_lockless/262144 epoll bytes_per_sec 3.24 GB/s 3.24 GB/s 🟢▲ +0.25% 0.94%
bidirectional_lockless/262144 uring bytes_per_sec 3.21 GB/s 3.23 GB/s 🟢▲ +0.86% 0.71%
bidirectional_lockless/4096 epoll bytes_per_sec 511.8 MB/s 509.9 MB/s 🔴▼ -0.24% 0.52%
bidirectional_lockless/4096 uring bytes_per_sec 528.7 MB/s 529.0 MB/s 🟢▲ +0.06% 1.05%
bidirectional_lockless/65536 epoll bytes_per_sec 2.67 GB/s 2.65 GB/s 🟢▲ +0.14% 3.09%
bidirectional_lockless/65536 uring bytes_per_sec 2.79 GB/s 2.78 GB/s 🔴▼ -0.26% 2.08%
multithread/2 epoll bytes_per_sec 3.66 GB/s 3.66 GB/s 🔴▼ -0.14% 1.23%
multithread/2 uring bytes_per_sec 4.24 GB/s 4.25 GB/s 🟢▲ +0.31% 0.83%
multithread/4 epoll bytes_per_sec 5.79 GB/s 5.80 GB/s 🔴▼ -0.18% 1.17%
multithread/4 uring bytes_per_sec 6.80 GB/s 6.80 GB/s 🔴▼ -0.12% 0.42%
multithread/8 epoll bytes_per_sec 6.38 GB/s 6.36 GB/s 🔴▼ -0.07% 1.10%
multithread/8 uring bytes_per_sec 6.92 GB/s 6.92 GB/s 🔴▼ -0.10% 0.72%
unidirectional/1024 epoll bytes_per_sec 126.7 MB/s 126.7 MB/s 🟢▲ +0.07% 0.32%
unidirectional/1024 uring bytes_per_sec 151.3 MB/s 151.0 MB/s 🔴▼ -0.19% 1.05%
unidirectional/1048576 epoll bytes_per_sec 3.37 GB/s 3.38 GB/s 🔴▼ -0.06% 1.19%
unidirectional/1048576 uring bytes_per_sec 3.42 GB/s 3.43 GB/s 🟢▲ +0.25% 0.62%
unidirectional/16384 epoll bytes_per_sec 1.56 GB/s 1.55 GB/s 🔴▼ -1.74% 1.16%
unidirectional/16384 uring bytes_per_sec 1.74 GB/s 1.73 GB/s 🔴▼ -0.44% 1.02%
unidirectional/262144 epoll bytes_per_sec 3.36 GB/s 3.33 GB/s 🔴▼ -1.59% 1.53%
unidirectional/262144 uring bytes_per_sec 3.26 GB/s 3.28 GB/s 🟢▲ +0.50% 0.70%
unidirectional/4096 epoll bytes_per_sec 474.4 MB/s 476.3 MB/s 🟢▲ +0.05% 0.50%
unidirectional/4096 uring bytes_per_sec 530.0 MB/s 531.2 MB/s 🟢▲ +0.08% 2.11%
unidirectional/65536 epoll bytes_per_sec 2.82 GB/s 2.69 GB/s 🔴▼ -5.92% 5.51%
unidirectional/65536 uring bytes_per_sec 2.81 GB/s 2.85 GB/s 🟢▲ +0.21% 2.18%
unidirectional_lockless/1024 epoll bytes_per_sec 127.1 MB/s 127.0 MB/s 🔴▼ -0.10% 0.15%
unidirectional_lockless/1024 uring bytes_per_sec 151.1 MB/s 151.4 MB/s 🟢▲ +0.14% 1.16%
unidirectional_lockless/1048576 epoll bytes_per_sec 3.26 GB/s 3.28 GB/s 🟢▲ +1.64% 1.90%
unidirectional_lockless/1048576 uring bytes_per_sec 3.38 GB/s 3.41 GB/s 🟢▲ +1.34% 1.47%
unidirectional_lockless/16384 epoll bytes_per_sec 1.57 GB/s 1.56 GB/s 🔴▼ -0.19% 1.44%
unidirectional_lockless/16384 uring bytes_per_sec 1.73 GB/s 1.73 GB/s 🟢▲ +0.42% 0.73%
unidirectional_lockless/262144 epoll bytes_per_sec 3.36 GB/s 3.36 GB/s 🔴▼ -1.04% 1.22%
unidirectional_lockless/262144 uring bytes_per_sec 3.30 GB/s 3.31 GB/s 🟢▲ +0.07% 1.26%
unidirectional_lockless/4096 epoll bytes_per_sec 476.9 MB/s 475.9 MB/s 🔴▼ -0.29% 0.53%
unidirectional_lockless/4096 uring bytes_per_sec 527.8 MB/s 527.1 MB/s 🟢▲ +0.14% 1.80%
unidirectional_lockless/65536 epoll bytes_per_sec 2.83 GB/s 2.81 GB/s 🔴▼ -0.57% 0.82%
unidirectional_lockless/65536 uring bytes_per_sec 2.89 GB/s 2.85 GB/s 🔴▼ -0.07% 3.05%
windows — full results (77 benchmarks, 5 iterations, 1.5s each)

accept_churn

Benchmark Backend Metric Base Head Δ Noise
burst/10 iocp ops_per_sec 1.56K ops/s 1.64K ops/s 🟢▲ +5.09% 0.48%
burst/100 iocp ops_per_sec 155.8 ops/s 166.0 ops/s 🟢▲ +6.43% 0.39%
burst_lockless/10 iocp ops_per_sec 1.56K ops/s 1.64K ops/s 🟢▲ +5.31% 0.23%
burst_lockless/100 iocp ops_per_sec 159.2 ops/s 168.3 ops/s 🟢▲ +5.51% 0.72%
concurrent/1 iocp ops_per_sec 12.52K ops/s 13.27K ops/s 🟢▲ +5.83% 0.21%
concurrent/16 iocp ops_per_sec 13.42K ops/s 13.53K ops/s 🟢▲ +0.85% 0.31%
concurrent/4 iocp ops_per_sec 13.14K ops/s 13.51K ops/s 🟢▲ +2.71% 0.30%
sequential iocp ops_per_sec 12.45K ops/s 13.18K ops/s 🟢▲ +5.97% 0.18%
sequential_lockless iocp ops_per_sec 12.50K ops/s 13.29K ops/s 🟢▲ +6.37% 0.38%

fan_out

Benchmark Backend Metric Base Head Δ Noise
concurrent_parents/1 iocp ops_per_sec 7.36K ops/s 7.76K ops/s 🟢▲ +5.33% 0.30%
concurrent_parents/16 iocp ops_per_sec 6.76K ops/s 7.70K ops/s 🟢▲ +13.78% 0.83%
concurrent_parents/4 iocp ops_per_sec 7.24K ops/s 7.71K ops/s 🟢▲ +6.17% 0.75%
concurrent_parents_lockless/1 iocp ops_per_sec 7.36K ops/s 7.80K ops/s 🟢▲ +6.02% 0.35%
concurrent_parents_lockless/16 iocp ops_per_sec 6.79K ops/s 7.71K ops/s 🟢▲ +13.50% 0.65%
concurrent_parents_lockless/4 iocp ops_per_sec 7.26K ops/s 7.74K ops/s 🟢▲ +6.26% 0.52%
fork_join/1 iocp ops_per_sec 112.6K ops/s 113.0K ops/s 🟢▲ +0.29% 0.47%
fork_join/16 iocp ops_per_sec 7.35K ops/s 7.76K ops/s 🟢▲ +5.68% 0.23%
fork_join/4 iocp ops_per_sec 29.15K ops/s 30.51K ops/s 🟢▲ +4.73% 0.31%
fork_join/64 iocp ops_per_sec 1.81K ops/s 1.92K ops/s 🟢▲ +5.50% 1.56%
fork_join_lockless/1 iocp ops_per_sec 112.3K ops/s 113.2K ops/s 🟢▲ +0.89% 0.45%
fork_join_lockless/16 iocp ops_per_sec 7.35K ops/s 7.80K ops/s 🟢▲ +5.95% 0.40%
fork_join_lockless/4 iocp ops_per_sec 29.14K ops/s 30.62K ops/s 🟢▲ +5.27% 0.28%
fork_join_lockless/64 iocp ops_per_sec 1.80K ops/s 1.94K ops/s 🟢▲ +7.29% 1.90%
nested/16 iocp ops_per_sec 1.78K ops/s 1.91K ops/s 🟢▲ +6.57% 1.45%
nested/4 iocp ops_per_sec 7.22K ops/s 7.69K ops/s 🟢▲ +6.39% 0.29%
nested_lockless/16 iocp ops_per_sec 1.79K ops/s 1.92K ops/s 🟢▲ +7.23% 0.95%
nested_lockless/4 iocp ops_per_sec 7.23K ops/s 7.71K ops/s 🟢▲ +6.73% 0.31%

http_server

Benchmark Backend Metric Base Head Δ Noise
concurrent/1 iocp ops_per_sec 110.7K ops/s 107.4K ops/s 🔴▼ -3.14% 0.60%
concurrent/16 iocp ops_per_sec 107.8K ops/s 113.2K ops/s 🟢▲ +4.75% 0.39%
concurrent/32 iocp ops_per_sec 107.0K ops/s 112.9K ops/s 🟢▲ +5.19% 0.70%
concurrent/4 iocp ops_per_sec 108.5K ops/s 113.0K ops/s 🟢▲ +4.05% 0.26%
multithread/1 iocp ops_per_sec 107.0K ops/s 112.9K ops/s 🟢▲ +5.41% 0.73%
multithread/16 iocp ops_per_sec 263.6K ops/s 309.4K ops/s 🟢▲ +16.97% 0.88%
multithread/2 iocp ops_per_sec 180.4K ops/s 194.0K ops/s 🟢▲ +7.55% 1.09%
multithread/4 iocp ops_per_sec 223.3K ops/s 252.4K ops/s 🟢▲ +13.58% 1.29%
multithread/8 iocp ops_per_sec 263.9K ops/s 309.0K ops/s 🟢▲ +17.10% 0.49%
single_conn iocp ops_per_sec 111.0K ops/s 107.7K ops/s 🔴▼ -3.11% 0.40%
single_conn_lockless iocp ops_per_sec 110.7K ops/s 107.4K ops/s 🔴▼ -2.87% 0.37%

socket_latency

Benchmark Backend Metric Base Head Δ Noise
concurrent/1 iocp latency_mean_ns 7.60 µs 6.25 µs 🟢▲ +17.97% 0.31%
concurrent/16 iocp latency_mean_ns 133.98 µs 101.76 µs 🟢▲ +24.25% 4.87%
concurrent/4 iocp latency_mean_ns 30.47 µs 25.22 µs 🟢▲ +17.11% 0.35%
concurrent_lockless/1 iocp latency_mean_ns 7.62 µs 6.24 µs 🟢▲ +18.09% 0.26%
concurrent_lockless/16 iocp latency_mean_ns 122.41 µs 101.17 µs 🟢▲ +16.93% 1.00%
concurrent_lockless/4 iocp latency_mean_ns 30.44 µs 25.16 µs 🟢▲ +17.24% 0.25%
pingpong/1 iocp latency_mean_ns 7.60 µs 6.24 µs 🟢▲ +17.92% 0.31%
pingpong/1024 iocp latency_mean_ns 7.68 µs 6.32 µs 🟢▲ +17.77% 0.56%
pingpong/64 iocp latency_mean_ns 7.58 µs 6.24 µs 🟢▲ +17.81% 0.36%
pingpong_lockless/1 iocp latency_mean_ns 7.58 µs 6.19 µs 🟢▲ +18.14% 0.45%
pingpong_lockless/1024 iocp latency_mean_ns 7.69 µs 6.32 µs 🟢▲ +17.78% 0.41%
pingpong_lockless/64 iocp latency_mean_ns 7.60 µs 6.23 µs 🟢▲ +18.01% 0.51%

socket_throughput

Benchmark Backend Metric Base Head Δ Noise
bidirectional/1024 iocp bytes_per_sec 281.1 MB/s 369.4 MB/s 🟢▲ +31.28% 0.26%
bidirectional/1048576 iocp bytes_per_sec 4.70 GB/s 5.18 GB/s 🟢▲ +10.59% 6.10%
bidirectional/16384 iocp bytes_per_sec 3.74 GB/s 4.21 GB/s 🟢▲ +12.35% 0.74%
bidirectional/262144 iocp bytes_per_sec 9.58 GB/s 9.50 GB/s 🔴▼ -0.35% 1.14%
bidirectional/4096 iocp bytes_per_sec 1.08 GB/s 1.34 GB/s 🟢▲ +23.52% 4.22%
bidirectional/65536 iocp bytes_per_sec 9.10 GB/s 8.19 GB/s 🔴▼ -10.07% 1.23%
bidirectional_lockless/1024 iocp bytes_per_sec 281.1 MB/s 357.4 MB/s 🟢▲ +29.58% 4.40%
bidirectional_lockless/1048576 iocp bytes_per_sec 4.97 GB/s 5.23 GB/s 🟢▲ +3.91% 6.47%
bidirectional_lockless/16384 iocp bytes_per_sec 3.72 GB/s 4.21 GB/s 🟢▲ +13.47% 0.95%
bidirectional_lockless/262144 iocp bytes_per_sec 9.65 GB/s 9.73 GB/s 🟢▲ +0.63% 0.92%
bidirectional_lockless/4096 iocp bytes_per_sec 1.07 GB/s 1.39 GB/s 🟢▲ +29.83% 2.42%
bidirectional_lockless/65536 iocp bytes_per_sec 8.94 GB/s 8.19 GB/s 🔴▼ -8.00% 1.13%
multithread/2 iocp bytes_per_sec 12.61 GB/s 6.74 GB/s 🔴▼ -46.38% 1.49%
multithread/4 iocp bytes_per_sec 16.84 GB/s 8.35 GB/s 🔴▼ -50.62% 1.50%
multithread/8 iocp bytes_per_sec 18.35 GB/s 9.29 GB/s 🔴▼ -49.13% 0.99%
unidirectional/1024 iocp bytes_per_sec 285.1 MB/s 324.7 MB/s 🟢▲ +16.30% 9.86%
unidirectional/1048576 iocp bytes_per_sec 4.18 GB/s 4.14 GB/s 🔴▼ -1.95% 3.59%
unidirectional/16384 iocp bytes_per_sec 3.79 GB/s 3.89 GB/s 🔴▼ -0.84% 6.63%
unidirectional/262144 iocp bytes_per_sec 8.43 GB/s 8.95 GB/s 🟢▲ +5.40% 10.99%
unidirectional/4096 iocp bytes_per_sec 1.09 GB/s 1.15 GB/s 🟢▲ +7.24% 3.10%
unidirectional/65536 iocp bytes_per_sec 8.82 GB/s 8.14 GB/s 🔴▼ -12.45% 11.57%
unidirectional_lockless/1024 iocp bytes_per_sec 283.8 MB/s 370.6 MB/s 🟢▲ +30.38% 0.45%
unidirectional_lockless/1048576 iocp bytes_per_sec 4.51 GB/s 4.71 GB/s 🟢▲ +3.71% 8.96%
unidirectional_lockless/16384 iocp bytes_per_sec 3.79 GB/s 4.10 GB/s 🟢▲ +10.74% 5.19%
unidirectional_lockless/262144 iocp bytes_per_sec 9.75 GB/s 9.20 GB/s 🔴▼ -1.31% 11.96%
unidirectional_lockless/4096 iocp bytes_per_sec 1.09 GB/s 1.40 GB/s 🟢▲ +28.79% 0.54%
unidirectional_lockless/65536 iocp bytes_per_sec 9.34 GB/s 8.20 GB/s 🔴▼ -12.42% 1.35%
macos — full results (113 benchmarks, 5 iterations, 1.5s each)

accept_churn

Benchmark Backend Metric Base Head Δ Noise
burst/10 kqueue ops_per_sec 4.60K ops/s 4.61K ops/s 🟢▲ +0.21% 0.57%
burst/100 kqueue ops_per_sec 468.9 ops/s 467.1 ops/s 🔴▼ -0.56% 1.05%
burst_lockless/10 kqueue ops_per_sec 4.63K ops/s 4.65K ops/s 🟢▲ +0.72% 1.00%
burst_lockless/100 kqueue ops_per_sec 473.0 ops/s 470.7 ops/s 🔴▼ -0.82% 0.76%
concurrent/1 kqueue ops_per_sec 20.86K ops/s 20.76K ops/s 🟢▲ +0.19% 1.79%
concurrent/16 kqueue ops_per_sec 37.66K ops/s 37.67K ops/s 🔴▼ -0.01% 0.46%
concurrent/4 kqueue ops_per_sec 29.23K ops/s 29.38K ops/s 🔴▼ -0.23% 0.81%
sequential kqueue ops_per_sec 21.04K ops/s 20.97K ops/s 🔴▼ -0.55% 1.12%
sequential_lockless kqueue ops_per_sec 20.86K ops/s 20.72K ops/s 🟢▲ +0.01% 1.61%

fan_out

Benchmark Backend Metric Base Head Δ Noise
concurrent_parents/1 kqueue ops_per_sec 8.16K ops/s 8.14K ops/s 🔴▼ -0.12% 1.57%
concurrent_parents/16 kqueue ops_per_sec 7.62K ops/s 6.97K ops/s 🔴▼ -9.38% 23.45%
concurrent_parents/4 kqueue ops_per_sec 8.36K ops/s 8.38K ops/s 🟢▲ +0.34% 1.54%
concurrent_parents_lockless/1 kqueue ops_per_sec 8.25K ops/s 8.25K ops/s 🟢▲ +0.16% 1.59%
concurrent_parents_lockless/16 kqueue ops_per_sec 7.76K ops/s 7.10K ops/s 🔴▼ -2.50% 23.01%
concurrent_parents_lockless/4 kqueue ops_per_sec 8.44K ops/s 8.47K ops/s 🔴▼ -0.01% 1.58%
fork_join/1 kqueue ops_per_sec 49.17K ops/s 49.05K ops/s 🔴▼ -0.67% 1.22%
fork_join/16 kqueue ops_per_sec 8.16K ops/s 8.18K ops/s 🟢▲ +0.36% 1.64%
fork_join/4 kqueue ops_per_sec 23.68K ops/s 23.58K ops/s 🔴▼ -0.54% 1.04%
fork_join/64 kqueue ops_per_sec 2.11K ops/s 2.14K ops/s ⚪ 0.00% 2.45%
fork_join_lockless/1 kqueue ops_per_sec 50.47K ops/s 50.32K ops/s 🔴▼ -0.34% 0.62%
fork_join_lockless/16 kqueue ops_per_sec 8.28K ops/s 8.25K ops/s 🔴▼ -0.32% 1.73%
fork_join_lockless/4 kqueue ops_per_sec 23.75K ops/s 23.54K ops/s 🔴▼ -0.43% 0.75%
fork_join_lockless/64 kqueue ops_per_sec 2.12K ops/s 2.14K ops/s 🟢▲ +0.06% 2.52%
nested/16 kqueue ops_per_sec 2.09K ops/s 2.11K ops/s 🟢▲ +0.41% 2.55%
nested/4 kqueue ops_per_sec 8.08K ops/s 8.08K ops/s 🟢▲ +0.44% 1.37%
nested_lockless/16 kqueue ops_per_sec 2.11K ops/s 2.12K ops/s 🔴▼ -0.09% 2.60%
nested_lockless/4 kqueue ops_per_sec 8.19K ops/s 8.18K ops/s 🔴▼ -0.57% 1.80%

http_server

Benchmark Backend Metric Base Head Δ Noise
concurrent/1 kqueue ops_per_sec 49.70K ops/s 49.92K ops/s 🟢▲ +0.23% 0.59%
concurrent/16 kqueue ops_per_sec 131.0K ops/s 130.9K ops/s 🔴▼ -0.14% 0.49%
concurrent/32 kqueue ops_per_sec 130.7K ops/s 129.5K ops/s 🔴▼ -0.33% 1.48%
concurrent/4 kqueue ops_per_sec 90.05K ops/s 90.24K ops/s 🟢▲ +0.20% 0.92%
multithread/1 kqueue ops_per_sec 130.6K ops/s 129.5K ops/s 🔴▼ -0.45% 1.40%
multithread/16 kqueue ops_per_sec 132.8K ops/s 135.9K ops/s 🟢▲ +0.07% 5.16%
multithread/2 kqueue ops_per_sec 184.4K ops/s 185.1K ops/s 🟢▲ +0.13% 0.80%
multithread/4 kqueue ops_per_sec 162.6K ops/s 164.9K ops/s 🔴▼ -0.08% 3.51%
multithread/8 kqueue ops_per_sec 138.5K ops/s 140.0K ops/s 🟢▲ +0.27% 3.50%
single_conn kqueue ops_per_sec 49.64K ops/s 49.86K ops/s 🟢▲ +0.40% 0.44%
single_conn_lockless kqueue ops_per_sec 50.07K ops/s 50.15K ops/s 🟢▲ +0.24% 0.21%

local_socket_latency

Benchmark Backend Metric Base Head Δ Noise
concurrent/1 kqueue latency_mean_ns 1.82 µs 1.82 µs 🔴▼ -0.39% 0.47%
concurrent/16 kqueue latency_mean_ns 27.16 µs 27.12 µs 🟢▲ +0.15% 0.55%
concurrent/4 kqueue latency_mean_ns 6.80 µs 6.82 µs 🔴▼ -0.10% 0.52%
concurrent_lockless/1 kqueue latency_mean_ns 1.80 µs 1.81 µs 🔴▼ -0.32% 0.29%
concurrent_lockless/16 kqueue latency_mean_ns 27.03 µs 27.00 µs 🔴▼ -0.14% 0.47%
concurrent_lockless/4 kqueue latency_mean_ns 6.78 µs 6.78 µs 🟢▲ +0.46% 0.84%
pingpong/1 kqueue latency_mean_ns 1.82 µs 1.82 µs 🔴▼ -0.40% 0.38%
pingpong/1024 kqueue latency_mean_ns 1.92 µs 1.92 µs 🔴▼ -0.18% 0.38%
pingpong/64 kqueue latency_mean_ns 1.83 µs 1.82 µs 🟢▲ +0.74% 0.44%
pingpong_lockless/1 kqueue latency_mean_ns 1.81 µs 1.81 µs 🔴▼ -0.06% 0.46%
pingpong_lockless/1024 kqueue latency_mean_ns 1.90 µs 1.91 µs 🔴▼ -0.78% 0.45%
pingpong_lockless/64 kqueue latency_mean_ns 1.81 µs 1.81 µs 🟢▲ +0.08% 0.50%

local_socket_throughput

Benchmark Backend Metric Base Head Δ Noise
bidirectional/1024 kqueue bytes_per_sec 1.30 GB/s 1.30 GB/s 🟢▲ +0.40% 0.21%
bidirectional/1048576 kqueue bytes_per_sec 3.90 GB/s 3.91 GB/s 🟢▲ +0.26% 0.35%
bidirectional/16384 kqueue bytes_per_sec 3.88 GB/s 3.92 GB/s 🟢▲ +0.63% 0.48%
bidirectional/262144 kqueue bytes_per_sec 3.89 GB/s 3.91 GB/s 🟢▲ +0.12% 0.46%
bidirectional/4096 kqueue bytes_per_sec 2.91 GB/s 2.95 GB/s 🟢▲ +1.32% 0.45%
bidirectional/65536 kqueue bytes_per_sec 3.91 GB/s 3.89 GB/s 🔴▼ -0.17% 0.84%
bidirectional_lockless/1024 kqueue bytes_per_sec 1.31 GB/s 1.31 GB/s 🔴▼ -0.04% 0.42%
bidirectional_lockless/1048576 kqueue bytes_per_sec 3.97 GB/s 4.00 GB/s 🟢▲ +0.80% 0.61%
bidirectional_lockless/16384 kqueue bytes_per_sec 3.98 GB/s 4.00 GB/s 🟢▲ +0.70% 0.48%
bidirectional_lockless/262144 kqueue bytes_per_sec 3.98 GB/s 4.00 GB/s 🟢▲ +0.54% 0.41%
bidirectional_lockless/4096 kqueue bytes_per_sec 3.00 GB/s 2.99 GB/s 🔴▼ -0.01% 0.49%
bidirectional_lockless/65536 kqueue bytes_per_sec 3.98 GB/s 3.98 GB/s 🔴▼ -0.15% 0.40%
unidirectional/1024 kqueue bytes_per_sec 1.27 GB/s 1.28 GB/s 🟢▲ +0.41% 0.34%
unidirectional/1048576 kqueue bytes_per_sec 3.52 GB/s 3.55 GB/s 🟢▲ +0.57% 0.38%
unidirectional/16384 kqueue bytes_per_sec 3.54 GB/s 3.56 GB/s 🟢▲ +0.71% 0.58%
unidirectional/262144 kqueue bytes_per_sec 3.53 GB/s 3.55 GB/s 🟢▲ +0.85% 0.31%
unidirectional/4096 kqueue bytes_per_sec 2.72 GB/s 2.74 GB/s 🟢▲ +0.72% 0.31%
unidirectional/65536 kqueue bytes_per_sec 3.53 GB/s 3.54 GB/s 🟢▲ +0.53% 0.66%
unidirectional_lockless/1024 kqueue bytes_per_sec 1.28 GB/s 1.29 GB/s 🟢▲ +0.35% 0.47%
unidirectional_lockless/1048576 kqueue bytes_per_sec 3.62 GB/s 3.61 GB/s 🔴▼ -0.13% 0.64%
unidirectional_lockless/16384 kqueue bytes_per_sec 3.62 GB/s 3.62 GB/s 🟢▲ +0.01% 0.41%
unidirectional_lockless/262144 kqueue bytes_per_sec 3.62 GB/s 3.61 GB/s 🔴▼ -0.16% 0.37%
unidirectional_lockless/4096 kqueue bytes_per_sec 2.78 GB/s 2.77 GB/s 🔴▼ -0.16% 0.43%
unidirectional_lockless/65536 kqueue bytes_per_sec 3.62 GB/s 3.61 GB/s 🔴▼ -0.42% 0.43%

socket_latency

Benchmark Backend Metric Base Head Δ Noise
concurrent/1 kqueue latency_mean_ns 18.69 µs 18.73 µs 🟢▲ +0.07% 0.65%
concurrent/16 kqueue latency_mean_ns 120.79 µs 120.37 µs 🔴▼ -0.10% 1.10%
concurrent/4 kqueue latency_mean_ns 43.15 µs 43.46 µs 🔴▼ -0.99% 1.90%
concurrent_lockless/1 kqueue latency_mean_ns 18.65 µs 18.63 µs 🔴▼ -0.02% 0.55%
concurrent_lockless/16 kqueue latency_mean_ns 120.94 µs 119.86 µs 🟢▲ +0.14% 1.33%
concurrent_lockless/4 kqueue latency_mean_ns 42.54 µs 42.69 µs 🔴▼ -0.39% 0.92%
pingpong/1 kqueue latency_mean_ns 15.41 µs 15.42 µs 🟢▲ +0.06% 1.58%
pingpong/1024 kqueue latency_mean_ns 19.03 µs 19.01 µs 🟢▲ +0.11% 0.13%
pingpong/64 kqueue latency_mean_ns 18.73 µs 18.66 µs 🟢▲ +0.50% 0.40%
pingpong_lockless/1 kqueue latency_mean_ns 15.34 µs 15.35 µs 🟢▲ +0.05% 0.23%
pingpong_lockless/1024 kqueue latency_mean_ns 19.04 µs 18.98 µs 🟢▲ +0.24% 0.25%
pingpong_lockless/64 kqueue latency_mean_ns 18.66 µs 18.61 µs 🟢▲ +0.10% 0.23%

socket_throughput

Benchmark Backend Metric Base Head Δ Noise
bidirectional/1024 kqueue bytes_per_sec 475.4 MB/s 471.3 MB/s 🔴▼ -1.02% 0.90%
bidirectional/1048576 kqueue bytes_per_sec 7.68 GB/s 7.66 GB/s 🟢▲ +0.39% 6.05%
bidirectional/16384 kqueue bytes_per_sec 4.56 GB/s 4.55 GB/s 🔴▼ -0.06% 1.29%
bidirectional/262144 kqueue bytes_per_sec 8.71 GB/s 8.77 GB/s 🟢▲ +1.03% 1.58%
bidirectional/4096 kqueue bytes_per_sec 1.82 GB/s 1.80 GB/s 🔴▼ -1.28% 1.37%
bidirectional/65536 kqueue bytes_per_sec 7.56 GB/s 7.54 GB/s 🔴▼ -0.19% 0.97%
bidirectional_lockless/1024 kqueue bytes_per_sec 477.2 MB/s 476.4 MB/s 🟢▲ +0.05% 0.86%
bidirectional_lockless/1048576 kqueue bytes_per_sec 7.85 GB/s 7.72 GB/s 🔴▼ -0.25% 4.12%
bidirectional_lockless/16384 kqueue bytes_per_sec 4.60 GB/s 4.55 GB/s 🔴▼ -1.05% 1.59%
bidirectional_lockless/262144 kqueue bytes_per_sec 8.93 GB/s 8.75 GB/s 🔴▼ -1.72% 2.50%
bidirectional_lockless/4096 kqueue bytes_per_sec 1.83 GB/s 1.82 GB/s 🔴▼ -0.22% 0.66%
bidirectional_lockless/65536 kqueue bytes_per_sec 7.56 GB/s 7.52 GB/s 🟢▲ +0.03% 1.85%
multithread/2 kqueue bytes_per_sec 7.70 GB/s 7.52 GB/s 🔴▼ -1.65% 3.87%
multithread/4 kqueue bytes_per_sec 3.55 GB/s 3.75 GB/s 🟢▲ +5.22% 3.54%
multithread/8 kqueue bytes_per_sec 3.24 GB/s 3.32 GB/s 🟢▲ +2.53% 6.13%
unidirectional/1024 kqueue bytes_per_sec 460.5 MB/s 454.6 MB/s 🔴▼ -0.27% 2.31%
unidirectional/1048576 kqueue bytes_per_sec 9.00 GB/s 8.78 GB/s 🔴▼ -0.46% 5.74%
unidirectional/16384 kqueue bytes_per_sec 4.51 GB/s 4.49 GB/s 🟢▲ +0.44% 2.33%
unidirectional/262144 kqueue bytes_per_sec 8.87 GB/s 8.74 GB/s 🔴▼ -2.46% 1.76%
unidirectional/4096 kqueue bytes_per_sec 1.81 GB/s 1.79 GB/s 🟢▲ +0.89% 2.20%
unidirectional/65536 kqueue bytes_per_sec 7.49 GB/s 7.39 GB/s 🔴▼ -1.20% 2.17%
unidirectional_lockless/1024 kqueue bytes_per_sec 479.9 MB/s 473.1 MB/s 🔴▼ -1.63% 1.63%
unidirectional_lockless/1048576 kqueue bytes_per_sec 9.07 GB/s 8.83 GB/s 🔴▼ -0.80% 4.70%
unidirectional_lockless/16384 kqueue bytes_per_sec 4.54 GB/s 4.45 GB/s 🔴▼ -3.29% 3.75%
unidirectional_lockless/262144 kqueue bytes_per_sec 8.94 GB/s 8.84 GB/s 🔴▼ -0.42% 1.37%
unidirectional_lockless/4096 kqueue bytes_per_sec 1.82 GB/s 1.81 GB/s 🔴▼ -0.29% 1.44%
unidirectional_lockless/65536 kqueue bytes_per_sec 7.44 GB/s 7.39 GB/s 🔴▼ -1.08% 1.47%

Run & raw JSON artifacts · flag rule: |median Δ| > max(2%, 3×CV of the noisier side) · advisory only

The polling thread takes queued register and cancel requests by
swapping its own buffer with the one callers fill. It swaps twice per
wait in the common case, so callers kept filling the same buffer and
the other one stayed empty. The first request to land on the empty one
allocated on the caller's thread, whenever the polling thread happened
to be slow to come back around, which could be long after the reactor
had settled.

The buffer handed back now gets the capacity of the one taken, so both
grow together on the polling thread the first time a size is reached.
The zero-allocation suite ran on every backend except IOCP, so nothing
checked that accept, connect, read, write, close, timers, random-access
file I/O and tcp_server churn stay allocation-free on Windows. It is
now registered there, along with the post(continuation&) check, which
IOCP has satisfied since it began posting the continuation's address
as the completion packet.

A new test covers readiness waits on every backend. It waits in both
directions because IOCP serves a read wait with a zero-byte WSARecv and
a write wait through the wait reactor.

A Windows executable cannot count what a corosio DLL allocates, so the
suites skip with a notice in shared builds there instead of passing
without looking.
Every TCP socket and acceptor close called CancelIoEx before
closesocket. closesocket() already aborts the overlapped I/O pending on
a socket when it closes the last handle to it, so the extra call only
matters while an inherited or duplicated handle keeps the socket open,
yet it cost every close a system call: two per connection on a server
that churns connections.

close_socket() now asks the kernel to cancel only when one of the
object's embedded ops is still pending there, which the op's OVERLAPPED
reports by holding STATUS_PENDING. An op never issued, or already
completed, reads as not pending. A request that failed synchronously
can leave STATUS_PENDING behind, which costs only a needless cancel.

testCloseCancelsWithSecondHandle closes a socket and an acceptor while
a duplicated handle keeps them open, once for each op that can be left
in the kernel, and checks that the op ends canceled.
Every post and every completion used to cross the completion port,
including the ones a loop thread made for itself and the operations
the kernel had already finished during the call.

Scheduler: a thread in run() or poll() that is the only loop running
keeps its own posts and already-finished completions on a private
queue, and takes up to 64 packets per dequeue with
GetQueuedCompletionStatusEx. Its part of the work count is published
when the queue runs empty. With more than one loop, and in run_one(),
poll_one() and wait_one(), work goes through the port as before. The
deferred queue now carries continuations as well as operations, so a
failed post no longer allocates or re-posts.

TCP: sockets the library opens or accepts are put in
skip-completion-port-on-success mode. A read or write the kernel
finishes during the call resumes its coroutine at once, up to
inline_budget_max times per handler; a transfer above 64 KiB goes
through the loop behind what the port already holds. A socket left
pending is armed after the call, so an inline completion registers no
stop callback and counts no work.

Behavior changes:

- A TCP socket released after the library opened or accepted it stays
  in skip-on-success mode, which Windows cannot clear. assign() now
  adopts TCP sockets already in that mode and never sets it on one
  adopted without it.
- inline_budget_max applies to the IOCP backend, as a fixed budget.
- A handler that throws gives its work count back.
- A handler's own posts run ahead of older packets in the port, which
  is looked at every 32 handlers or inline completions at the latest.

The fault harness hooks GetQueuedCompletionStatusEx and
SetFileCompletionNotificationModes. Fault tests that fail a post made
from a handler drive the loop with run_one(), which still posts
through the port.

Against the previous commit on a 4-core ARM64 VM, 85 benchmarks: median
+31%. Posting on one thread +87% to +91%, socket latency +38% to +47%,
throughput at 1 to 16 KiB chunks +33% to +49%, fan-out +27% to +36%,
HTTP server +11% to +30%. Throughput at 256 KiB and above is level.
Accept churn is 0% to 6% slower: each socket pays one more system call
to enter the mode.
win_scheduler.hpp conflicted with upstream's fix that counts a throwing handler's work as finished. The run loop on this branch already does that through its own guard, so its version is kept.
The documentation lint gate rejects a sentence over 25 words, and five of the sentences that describe the inline budget and skip-on-success mode ran past it.
…e cancel

The scheduler's atomic counters sat outside the C4251 suppression, which
broke every MSVC shared build under /W4 /WX; they move inside it. The
fault test's plain socket pair returns the tuple must() now yields.

Close skips CancelIoEx only behind a provider known to hand out kernel
handles, the only kind known to mark a pending request in the
OVERLAPPED; sockets and acceptors record that when opened, accepted or
adopted, and are always cancelled otherwise.

BOOST_COROSIO_IOCP_NO_SKIP_ON_SUCCESS is now read in the compiled
library alone, behind iocp_skip_on_success_enabled(), so translation
units cannot disagree about an inline function's body.

read_some and write_some share the op-arming and call-classifying code.
@TheLingeringWill TheLingeringWill changed the title Improve IOCP performance perf: cut IOCP syscalls per connection, per post and per TCP transfer Nov 18, 2026
A lone loop thread took up to 64 packets into its private queue. A
second thread entering run() while the first handler of the batch ran
could not reach the rest, so a handler waiting on work queued behind it
deadlocked a pool that develop ran fine.

The batch now goes to the scheduler's shared queue, and a thread takes
one entry from it at a time, ahead of its own later posts, so order is
kept. That costs the dispatch lock and no system call. A wakeup is
posted for the queue only when another loop can be blocked in the port.
A context that guarantees a single run thread keeps the batch private.
The previous commit moved a batched dequeue to the shared queue but
left a handler's own posts and its stored-result completions on the
thread's private queue. A second thread entering run() while that
handler ran could not reach them, so a handler waiting on its own post
still deadlocked a starting pool.

All of it now goes on the shared queue, under the dispatch lock and
with no system call, and is counted when queued: another loop may run
it and publish its completion first. The thread's own queue is used
only by a context that guarantees a single run thread.

The queue's bit in dispatch_required_ now stands while the queue holds
work and is cleared under the lock, so taking an entry no longer
clears and sets it, and an exception from the timers cannot lose it. A
thread does not block while the bit is set. loop_threads_ counts
threads, not frames, so a loop nested in a handler costs no wakeups,
and handing a queue over wakes a loop only when one can be blocked.

A test starts a second loop behind a blocked handler, for a batch and
for the handler's own post.
A thread that dequeued the stop took the shared queue and the batch
ahead of the stop onto its private queue, and a restart moved what was
held back behind the stop there too. Another loop could not reach
either while the thread ran a handler.

The batch ahead of a stop now goes to the shared queue like any other,
a thread that has seen the stop finishes that queue one entry at a time
before it leaves, and work held back behind a stop returns to the
shared queue on a restart.

A wakeup for the shared queue is posted only while a thread is blocked
in the port, and only one at a time. A thread counts itself as blocked
before its last look at the queue, so work queued after that look
always finds it counted. Draining a long queue with several loops
running no longer fills the port with wakeups.
Packets taken in the same batch as a stop, after it, were held on the
dequeuing thread's private queue until its handler returned, so a
restart from that handler left them out of reach of a second loop.
They now go back to the port as they came, behind the stop's wakeup,
and only a packet the port refuses is held.

Queueing on the shared queue is one function for an entry and one for
a queue, in place of nine hand-written copies of the lock, the push and
the bit. The TCP service answers the per-family provider question from
one accessor.
Packets dequeued behind a stop were re-posted to the port one by one,
which put them behind packets that had not fit in the batch, and a
post made while stopped went to the port while one made after the
restart went to the shared queue and ran first.

Both now go on one queue of held work, under the dispatch lock, which
restart() moves to the head of the shared queue. A stopped scheduler
dequeues one packet at a time, so little is ever taken behind the stop.
The per-frame queue for such packets is gone.

A thread that has seen the stop notices a restart at its next pass and
goes back to the port and the timers, instead of running on from its
queue for as long as that holds work. A packet dequeued on its own no
longer runs ahead of older work on the shared queue.

A test posts on both sides of a restart and checks the order.
restart() put the held work at the head of the shared queue, ahead of
work queued before the stop. It now follows that work. On the
single-thread tier the thread keeps its own held posts and appends
them to its queue once the scheduler is restarted, so they come after
what it queued before the stop and ahead of what it queues next.

An entry was put on the held queue on an unlocked read of the stopped
flag, so a restart from another thread in between left it there with
its work counted and nothing to release it. The flag is read again
under the lock, and an entry that finds the scheduler restarted goes on
the shared queue.

Arming the waitable timer takes a lock of its own instead of the
dispatch lock, which every queued handler now takes. The hand-over
before each handler could no longer fire and is removed.

The restart-order test covers work queued before the stop, on both
tiers.
Work held behind a stop lived on two queues on the single-thread tier,
the scheduler's and the frame's, and a restart from a handler put the
frame's first, ahead of an older packet on the scheduler's. It is one
queue on both tiers again. On the single-thread tier a post made after
a restart first takes over what the restart released, which was queued
before it.

The packets of a batch behind a stop were put on the shared queue, when
a restart raced the batch, before the part of the batch ahead of the
stop. The caller now queues that part first.

The rule that the held queue is only added to while the scheduler is
stopped, under the lock, is in one function, and the two functions that
queued a loop thread's work are one.

A stopped scheduler no longer completes TCP reads and writes inline:
their results queue behind the stop, as every completion did before.
The batched dequeue read each operation's status from its OVERLAPPED,
which only a provider of kernel handles is known to write. The packet
carries the status GetQueuedCompletionStatus reported before, in
OVERLAPPED_ENTRY::Internal, so that is read instead.
A TCP socket this library opens is in skip-on-success mode for good,
so one released to become a listener was refused by
tcp_acceptor::assign(). The acceptor now adopts such a socket on the
terms tcp_socket does, and completes an AcceptEx that succeeds during
the call itself, since no packet is queued for it.
The scheduler puts work on the shared queue through share_locked(),
takes it whole through take_shared(), and destroys what is queued at
teardown through destroy_queued(), where each was written out at
every site. completion_error() uses the existing ntdll lookup.

The TCP service adopts a socket or a listener through one adopt(),
and connect, accept, read, write and wait(read) ask one
overlapped_queued() whether a packet will carry the outcome.

claim() takes a batch off the pending count in one step, and a read
or write that transferred data arms no stop callback on its way
through the loop, as a stop cannot change its outcome.

The two AcceptEx endpoint tests share a body, and the wait
allocation test builds its pair with make_socket_pair.
@sgerbino sgerbino added the benchmark Triggers benchmark suite label Nov 19, 2026
@github-actions github-actions Bot removed the benchmark Triggers benchmark suite label Nov 19, 2026
@sgerbino

Copy link
Copy Markdown
Collaborator

There is something weird with the unit tests in the CI:

https://github.com/cppalliance/corosio/actions/runs/43557619651/job/132334044957?pr=420#step:31:1168

          Start  87: boost.corosio.wolfssl_engine
   84/245 Test  #87: boost.corosio.wolfssl_engine ...............................   Passed    0.21 sec
          Start  88: boost.corosio.wolfssl_stream
   85/245 Test  #78: boost.corosio.udp_socket.iocp ..............................   Passed    1.49 sec
          Start  89: fault
   86/245 Test  #89: fault ......................................................   Passed    0.01 sec
          Start  90: harness:
   87/245 Test  #90: harness: ...................................................   Passed    0.01 sec
          Start  91: pthread_create
   88/245 Test  #91: pthread_create .............................................   Passed    0.01 sec

This should be patched in capy now.

Every queued handler used to take dispatch_mutex_, and with more than
one loop running every post went through the completion port. The
scheduler now has one rule for where work goes, the same for one
loop and for several:

- A loop that is the only one keeps work on a queue of its own.
- Loops share a lock-free queue otherwise. A loop that is about to
  block counts itself first and then looks at the queue, so work
  added after that comes with a wakeup.
- Work goes through the port when a peer loop is waiting there, and
  when a packet posted earlier is still in the port, so it cannot
  overtake that packet.
- Work queued behind a stop stays on the held queue, which keeps its
  mutex.

A thread outside the loops is counted while it adds to the shared
queue, and the destructor waits for that count, so the scheduler is
not destroyed under it.

TCP transfers:

- A transfer that completes during the call resumes its coroutine at
  once below 8 KiB. With several loops a read does so up to 64 KiB,
  and the result of a large write is queued behind what the port
  holds.
- A read that follows a write on the same socket is issued after the
  port has had its turn, so it finds the peer's reply waiting. A
  socket whose reads keep missing backs off from this.
- The first transfer after an accept or connect waits its turn.
- cancel() sets the flags before CancelIoEx, so it cannot lose
  against a read that is still to be issued.
The corosio burst accept-churn benchmarks opened each client socket
and started its connect in one loop. Both Asio suites open all the
clients first and start the connects in a second loop. A socket
opened while connects are in flight costs more in the kernel, so the
two orders did not measure the same work: on Windows the corosio rows
read about 6% lower than with the Asio order.
Work that a handler of a lone run() posted while the context was
stopped was held behind the stop, whatever the port still held. A
restart queues held work ahead of the port, so it ran before a post
made earlier whose packet was still there. While a posted packet is
in the port such work now goes to the port as well, as work queued
outside a stop already does.

The queue_batch() comment covers an empty batch, and the comments at
the two give_way() calls say what is deferred: the result of the
first transfer, not its request.
iocp_paths.cpp included win_tcp_service.hpp for
iocp_skip_on_success_enabled(). That header's shutdown() calls
win_tcp_acceptor::close_socket(), which win_tcp_acceptor_service.hpp
defines, so an optimized MinGW build left the test with an undefined
reference. The test includes the acceptor header now, as
lazy_services.cpp does.

The configuration page's sentence on large transfers ran to 39 words,
over the documentation lint's limit of 25.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

4 participants