[C#] Add minima-sync - synchronous io_uring HTTP/1.1 (NativeAOT)#824
Merged
Conversation
A synchronous single-issuer io_uring server built on Minima's io_uring bindings (Native.cs/Ring.cs) with zeemo's reactor architecture, for maximum throughput on the H1-isolated profiles: one pinned reactor thread per core (SO_REUSEPORT, SINGLE_ISSUER|DEFER_TASKRUN), multishot accept + single-shot recv into per-connection buffers (parse-in-place), responses serialized straight into the send buffer, recv/send alternating fully inline. No async/IValueTaskSource, no MPSC queues, no eventfd; zero hot-path allocation. NativeAOT-compiled (native binary, no .NET runtime). JSON serialized per request from the model. Subscribes to baseline, pipelined, limited-conn, json. Verified against the full contract (sum/CL/chunked, pipeline, keep-alive, fragmented reads, connection churn, json count/total) under JIT and as the NativeAOT container.
Owner
Author
|
/benchmark -f minima-sync |
Contributor
|
👋 |
Contributor
Benchmark ResultsFramework:
Full log |
Owner
Author
|
/benchmark -f minima-sync --save |
Contributor
|
👋 |
Contributor
|
|
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.
Description
A synchronous single-issuer io_uring HTTP/1.1 server — the maximum-performance adaptation of Minima toward zeemo's architecture.
engine-tier,baseline/pipelined/limited-conn/json. It reuses Minima's io_uring bindings (Native.cs/Ring.cs,SINGLE_ISSUER | DEFER_TASKRUN) but replaces the async engine with a zeemo-style synchronous reactor, and is NativeAOT-compiled.Design (every choice for max throughput on CPU-bound HTTP)
IValueTaskSource, no MPSC queues, no eventfd — with a synchronous handler there's never an off-reactor caller, so it's pure single-issuer.sched_setaffinity), own ring + ownSO_REUSEPORTlistener.NativeMemory) recv/write buffers.vs
minimaminimais the general async engine (keepsasync-db/crudcapability).minima-synctrades that away — a synchronous reactor blocks the core on any slow handler — for raw throughput on the CPU-only profiles. So it's a separate entry.Tests
baseline,pipelined,limited-conn,json. Verified against the full contract (GET/CL/chunked sum,/pipeline, 16× pipelining, keep-alive, fragmented reads,Connection: close, 200-connection churn, json count +total = price*quantity*mfor 12/22/31/50) under JIT and as the NativeAOT container.