[C#] Add shrike-minima - epoll, SPSC recv ring (Minima model)#835
Open
MDA2AV wants to merge 1 commit into
Open
[C#] Add shrike-minima - epoll, SPSC recv ring (Minima model)#835MDA2AV wants to merge 1 commit into
MDA2AV wants to merge 1 commit into
Conversation
A C# epoll engine with an IVTS-backed, RCA=true async handler, fixed the Minima way: an SPSC recv ring decouples the worker from the handler. The worker recv's into pooled buffers and enqueues (ptr, len) on a per-connection single-producer / single-consumer ring; the handler resumes on the thread pool, dequeues the chunks into its own parse buffer, and returns the buffers. Worker and handler never share a buffer (no driver/handler race), and recv pipelines with parse. The epoll analogue of Minima's SpscRecvRing. Sibling of shrike-tokio (#832), which fixes the same race the Tokio way (the handler does its own recv). Serves baseline, pipelined, limited-conn; hand-rolled HTTP/1.1; Connection: close sends a FIN. Validated 14/14 (every TCP-fragmentation case), 0/100 fragmented POST, 8000 keep-alive with zero drops.
Owner
Author
|
/benchmark -f shrike-minima |
Contributor
|
👋 |
Contributor
Benchmark ResultsFramework:
Full log |
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
shrike-minima — a C# epoll engine with an IVTS-backed, RCA=true async handler, fixed the Minima way: an SPSC recv ring decouples the worker from the handler.
engine-tier;baseline/pipelined/limited-conn.The model (no driver/handler race)
(ptr, len)on a per-connection single-producer / single-consumer ring (SpscRing), then signals.Worker and handler touch disjoint ends of the ring (release/acquire) and each recv buffer is owned by one side at a time → the recv buffer is never shared. Unlike the Tokio-style sibling, recv pipelines with parse (the worker keeps pumping while the handler works); the cost is one extra copy (chunk → parse buffer) + the pool/ring bookkeeping. It's the epoll analogue of Minima's
SpscRecvRing.Siblings (same race, two fixes)
recv(Tokio/mio model). No copy, but recv can't overlap parse.Verification
validate.sh14/14 (every TCP-fragmentation case), 0/100 fragmented POST, 8000 keep-alive with 0 drops.