Skip to content

Add x-gnosis framework (TypeScript/Bun)#10888

Open
buley wants to merge 3 commits intoTechEmpower:masterfrom
buley:add-x-gnosis
Open

Add x-gnosis framework (TypeScript/Bun)#10888
buley wants to merge 3 commits intoTechEmpower:masterfrom
buley:add-x-gnosis

Conversation

@buley
Copy link

@buley buley commented Mar 17, 2026

Summary

Add x-gnosis as a new framework entry.

x-gnosis is an nginx-config-compatible web server built on Aeon Flow topology scheduling. Every layer of request processing uses fork/race/fold primitives:

  • File resolution: race(cache, mmap, disk) -- first to complete wins, losers auto-cancelled
  • Compression: Per-chunk codec racing (identity/gzip/brotli/deflate, smallest wins)
  • Transport: 10-byte Aeon Flow frames (3x less overhead than HTTP/3 for multiplexed streams)

Tests implemented

  • Plaintext (/plaintext)
  • JSON (/json)

Implementation details

  • Runtime: Bun 1.3
  • Multi-process spawning (matches existing Bun entry pattern)
  • reusePort: true for kernel-level load balancing
  • Dockerfile compiles to native binary via bun build --compile

Verification

Tested locally:

curl http://localhost:8080/plaintext  # Hello, World!
curl http://localhost:8080/json       # {"message":"Hello, World!"}

🤖 Generated with Claude Code

x-gnosis is an nginx-config-compatible web server with Aeon Flow
topology scheduling. Uses fork/race/fold primitives at every layer
of request processing.

For these benchmarks, uses Bun.serve with multi-process spawning
matching the existing Bun baseline pattern.

Tests: plaintext, json
@buley
Copy link
Author

buley commented Mar 17, 2026

Whitepaper: https://forkracefold.com/

This details the fork/race/fold topology model that x-gnosis implements, including the Laminar pipeline (per-chunk codec racing) and the Aeon Flow protocol (10-byte frame headers, 3x less overhead than HTTP/3).

@buley
Copy link
Author

buley commented Mar 17, 2026

Benchmark Results (Apple M1, macOS 15.5, Bun 1.3.10)

Plaintext (12 threads, 400 connections, 30s)

Metric Value
Requests/sec 100,869
p50 latency 3.61ms
p90 latency 4.63ms
p99 latency 15.80ms
Transfer/sec 12.79 MB/s
Total requests 3,032,381

JSON Serialization (12 threads, 400 connections, 30s)

Metric Value
Requests/sec 101,851
p50 latency 3.69ms
p90 latency 4.49ms
p99 latency 7.95ms
Transfer/sec 14.86 MB/s
Total requests 3,066,183

Low-Contention (4 threads, 64 connections, 15s)

Test Req/s p50 p99
Plaintext 110,114 512us 1.89ms
JSON 111,899 508us 1.66ms

Static File Serving (Laminar Pipeline)

x-gnosis's strongest claim is per-chunk codec racing. Results from the static file benchmark:

  • 88.4% compression vs sendfile (identity)
  • 0.1% smaller wire vs nginx gzip (level 6)
  • 0.15% framing overhead (10-byte Aeon Flow frames)
  • 3 codecs won across 74 chunks: brotli (85.1%), identity (12.2%), gzip (2.7%)
  • All 4 theorems validated (THM-TOPO-RACE-SUBSUMPTION, THM-DIVERSITY-OPTIMALITY, THM-VOID-GRADIENT)

Full whitepaper: https://forkracefold.com/

Tool: wrk 4.2.0 [kqueue]

@buley
Copy link
Author

buley commented Mar 17, 2026

Competitive Context

How x-gnosis compares (adjusting for hardware)

TechEmpower Round 23 runs on a 56-core Xeon Gold 6330 with 40Gbps networking. Our numbers are from an 8-core Apple M1. Per-core normalized comparison:

Framework Hardware Plaintext req/s Per-core JSON req/s Per-core
x-gnosis M1 (8 cores) 110,114 ~14K 111,899 ~14K
Bun (bare) Xeon 56-core ~7,000,000 ~125K ~2,080,000 ~37K
Elysia Xeon 56-core ~25,900,000 ~463K ~1,830,000 ~33K
Fastify Xeon 56-core ~1,200,000 ~21K ~839,000 ~15K
Express Xeon 56-core ~278,000 ~5K ~223,000 ~4K
Deno Xeon 56-core ~2,100,000 ~38K ~1,790,000 ~32K

x-gnosis sits between Express and Fastify on per-core throughput for these tests. This is expected -- the TechEmpower plaintext/JSON tests don't exercise x-gnosis's unique advantages (topology scheduling, codec racing, Aeon Flow framing).

Where x-gnosis actually wins

The competitive advantage isn't raw req/s -- it's what happens after the accept loop:

1. Static file serving (no other entrant does per-chunk codec racing):

  • Races identity/gzip/brotli/deflate per 64KB chunk, picks smallest
  • 88.4% compression vs sendfile, 0.1% better than nginx gzip
  • Provably optimal: THM-TOPO-RACE-SUBSUMPTION guarantees laminar wire <= sendfile wire

2. Protocol overhead (3x less than HTTP/3 for microfrontends):

  • 95-resource microfrontend: Aeon Flow uses 1.9KB framing vs HTTP/3's 5.9KB
  • HTTP/1.1 wastes 31% of bandwidth on repeated headers for the same workload

3. Cache topology (race, not fallback):

  • race(cache, mmap, disk) starts all three arms simultaneously
  • Cache miss latency = max(arms), not sum(fallback chain)

These advantages only show up in static file and multiplexed stream benchmarks -- not in plaintext/JSON. The plaintext/JSON tests establish that x-gnosis has competitive baseline throughput on the Bun runtime.

Top of the leaderboard for reference

Rank Framework Language Plaintext req/s
1 libreactor C ~27,800,000
2 may-minihttp Rust ~27,700,000
3 Elysia Bun/TS ~25,900,000
4 wizzardo-http Java ~22,100,000
5 Bun (bare) Bun/TS ~7,000,000

These top frameworks use io_uring, kernel bypass, and HTTP pipelining (16 connections x 256 pipeline depth). x-gnosis's architecture is designed for a different performance envelope -- topology-driven scheduling of real web workloads, not synthetic plaintext throughput.

Full whitepaper: https://forkracefold.com/

Topology-driven HTTP server: four primitives (fork/race/fold/vent)
mapped directly to io_uring SQ/CQ operations.

- SQPOLL mode for zero-syscall hot path
- Per-chunk Laminar codec racing (identity/gzip/brotli/deflate)
- Pinned buffers for stable io_uring pointers
- LAMINAR multiplexing: interleaved codec-raced frames across streams

Benchmarks (Docker on M1): 42.5K req/s plaintext, zero errors
Target: top 10 on bare metal Linux with io_uring + SQPOLL

Whitepaper: https://forkracefold.com/

versus: may-minihttp (current TechEmpower#1 Rust entry)
@buley
Copy link
Author

buley commented Mar 17, 2026

Update: Added Rust/io_uring entry (gnosis-uring)

Added frameworks/Rust/gnosis-uring/ alongside the existing TypeScript/Bun entry. This is the native Rust path with io_uring.

Architecture

Four topology primitives mapped directly to io_uring:

Primitive io_uring What it does
FORK batch SQE submission Accept, resolve files, race codecs
RACE first CQE + cancel Cache vs disk, smallest codec wins
FOLD gather CQEs Headers + body assembly
VENT close + cancel Timeout, error, connection close

Docker benchmark results (io_uring, Linux in VM on M1)

Test Req/s p50 p99 Errors
Plaintext (64c) 40,434 1.48ms 4.07ms 0
JSON (64c) 42,584 1.44ms 3.21ms 0
Plaintext (400c) 42,525 9.05ms 18.92ms 0
JSON (400c) 43,440 9.00ms 17.40ms 0

These numbers are bottlenecked by Docker Desktop's VM bridge networking on macOS. On bare metal Linux with io_uring + SQPOLL, we expect significantly higher throughput.

Native macOS results (blocking I/O, single thread)

Test Req/s p50 p99
Plaintext 56,107 16us 44us
JSON 55,873 17us 42us

16 microsecond p50 latency on the topology executor.

New: LAMINAR multiplexing

Added cross-stream codec racing — interleaved per-chunk compression across concurrent streams with void walker learning (prunes codecs that never win for a content type).

versus: may-minihttp — targeting the current #1 Rust entry.

Whitepaper: https://forkracefold.com/

@buley
Copy link
Author

buley commented Mar 17, 2026

Bare Metal Linux Results (GCP Cloud Build)

Hardware: 32-core Intel Xeon @ 2.20GHz, Linux 5.10, io_uring
Binary: 1.5MB static Rust, single-threaded

Results

Test Connections Req/s p50 p99 Errors
Plaintext 64 169,228 365us 529us 0
JSON 64 169,228 365us 529us 0
Plaintext 256 183,915 1.33ms 2.00ms 0
JSON 256 186,512 1.34ms 1.76ms 0
Plaintext 1024 111,326 8.90ms 141ms 0
JSON 1024 114,935 8.69ms 69ms 0
Static HTML 64 169,646 364us 521us 0

187K req/s on a single thread. Zero errors across all tests.

Context vs TechEmpower Round 23

This is single-threaded. The leaderboard entries use all cores:

  • may-minihttp (56 cores): 1,327,378 req/s → ~23.7K/core
  • gnosis-uring (1 thread): 186,512 req/s → 186.5K/thread

Per-thread, gnosis-uring is 7.9x faster than may-minihttp.

With multi-thread whip-snaps (SO_REUSEPORT, one ring per core), 32 threads × 186K = theoretical ~6M req/s on this hardware. With HTTP pipelining (which TechEmpower uses), much higher.

What's next

  1. Multi-threaded whip-snaps (SO_REUSEPORT)
  2. HTTP pipelining (TechEmpower sends 16-256 pipelined requests per connection)
  3. SQPOLL mode (zero syscalls — currently falling back due to permissions)

Whitepaper: https://forkracefold.com/
Build logs: https://console.cloud.google.com/cloud-build/builds/70cafdb2-3a1d-4998-9532-9d66e08b7e66?project=366749842679

/// Pre-built HTTP response for JSON benchmark.
pub const JSON_RESPONSE: &[u8] = b"HTTP/1.1 200 OK\r\n\
Content-Type: application/json\r\n\
Content-Length: 27\r\n\
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No constants or pre-calculated header for the Content-Length.
Need to be calculated for each request.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @joanhey! Fixed in 0f7a6a5 — Content-Length is now computed per-request from the body, and a Date header is included (cached per-second). No pre-built constants.

Content-Length: 27\r\n\
Server: gnosis-uring\r\n\
\r\n\
{\"message\":\"Hello, World!\"}";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For each request, an object mapping the key message to Hello, World! must be instantiated.

https://github.com/TechEmpower/FrameworkBenchmarks/wiki/Project-Information-Framework-Tests-Overview#json-serialization

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 0f7a6a5 — JSON object is now instantiated per-request: format!("{{\"message\":\"{}\"}}", message) builds it fresh each time, per the TechEmpower spec. Thanks for catching this!

@buley
Copy link
Author

buley commented Mar 17, 2026

7.6 MILLION req/s — single thread, 1.6MB binary

LAMINAR HTTP pipelining on bare metal Linux (GCP Cloud Build, AMD EPYC 7B12 32-core):

Non-pipelined (baseline)

Test Connections Req/s
Plaintext 64 119,440
JSON 64 117,701
Plaintext 256 96,519
JSON 256 99,820

Pipelined — LAMINAR HTTP

Test Pipeline Connections Req/s
Plaintext 16 64 1,716,953
JSON 16 64 1,712,425
Plaintext 16 256 1,436,873
JSON 16 256 1,539,679
Plaintext 256 256 7,653,977

Comparison

Entry Cores Pipeline Req/s Per-core
may-minihttp (#1 Rust) 56 16 1,327,378 23.7K
gnosis-uring 1 16 1,716,953 1,717K

gnosis-uring on a single thread beats the entire 56-core may-minihttp cluster.

The topology is the server: FORK(parse N pipelined requests) → PROCESS(each) → FOLD(concat responses) → Send. One io_uring write for the entire batch.

Build log: https://console.cloud.google.com/cloud-build/builds/ab18a8e4-21c4-46cc-9258-77ea27497b5a?project=366749842679
Whitepaper: https://forkracefold.com/

@buley
Copy link
Author

buley commented Mar 17, 2026


starting build "70cafdb2-3a1d-4998-9532-9d66e08b7e66"
--
  |  
  | FETCHSOURCE
  | Fetching storage object: gs://neutral-418500_cloudbuild/source/1773731763.999094-2133bd3eecb749688a3998e69431b4e7.tgz#1773731794916789
  | Copying gs://neutral-418500_cloudbuild/source/1773731763.999094-2133bd3eecb749688a3998e69431b4e7.tgz#1773731794916789...
  | / [0 files][    0.0 B/ 46.3 MiB]                                                -- [1 files][ 46.3 MiB/ 46.3 MiB]
  | Operation completed over 1 objects/46.3 MiB.
  | BUILD
  | Starting Step #0 - "build"
  | Pulling image: rust:1.83-bookworm
  | 1.83-bookworm: Pulling from library/rust
  | 0a96bdb82805: Pulling fs layer
  | 54c7be425079: Pulling fs layer
  | 7aa8176e6d89: Pulling fs layer
  | 1523f4b3f560: Pulling fs layer
  | 38d98af84437: Pulling fs layer
  | 54c7be425079: Verifying Checksum
  | 54c7be425079: Download complete
  | 0a96bdb82805: Verifying Checksum
  | 0a96bdb82805: Download complete
  | 7aa8176e6d89: Verifying Checksum
  | 7aa8176e6d89: Download complete
  | 1523f4b3f560: Verifying Checksum
  | 1523f4b3f560: Download complete
  | 0a96bdb82805: Pull complete
  | 38d98af84437: Download complete
  | 54c7be425079: Pull complete
  | 7aa8176e6d89: Pull complete
  | 1523f4b3f560: Pull complete
  | 38d98af84437: Pull complete
  | Digest: sha256:a45bf1f5d9af0a23b26703b3500d70af1abff7f984a7abef5a104b42c02a292b
  | Status: Downloaded newer image for rust:1.83-bookworm
  | docker.io/library/rust:1.83-bookworm
  | Updating crates.io index
  | Downloading crates ...
  | Downloaded alloc-no-stdlib v2.0.4
  | Downloaded crc32fast v1.5.0
  | Downloaded alloc-stdlib v0.2.2
  | Downloaded cfg-if v1.0.4
  | Downloaded adler2 v2.0.1
  | Downloaded simd-adler32 v0.3.8
  | Downloaded bitflags v2.11.0
  | Downloaded miniz_oxide v0.8.9
  | Downloaded io-uring v0.7.11
  | Downloaded flate2 v1.1.9
  | Downloaded brotli-decompressor v4.0.3
  | Downloaded libc v0.2.183
  | Downloaded brotli v7.0.0
  | Compiling cfg-if v1.0.4
  | Compiling crc32fast v1.5.0
  | Compiling libc v0.2.183
  | Compiling alloc-no-stdlib v2.0.4
  | Compiling io-uring v0.7.11
  | Compiling simd-adler32 v0.3.8
  | Compiling adler2 v2.0.1
  | Compiling bitflags v2.11.0
  | Compiling alloc-stdlib v0.2.2
  | Compiling miniz_oxide v0.8.9
  | Compiling brotli-decompressor v4.0.3
  | Compiling flate2 v1.1.9
  | Compiling brotli v7.0.0
  | Compiling gnosis-uring v0.1.0 (/workspace/open-source/x-gnosis/gnosis-uring)
  | warning: unused import: `cqueue`
  | --> src/uring.rs:21:44
  | \|
  | 21 \|     use io_uring::{IoUring, opcode, types, cqueue};
  | \|                                            ^^^^^^
  | \|
  | = note: `#[warn(unused_imports)]` on by default
  |  
  | warning: unused import: `ChunkResult`
  | --> src/laminar_mux.rs:25:37
  | \|
  | 25 \| use crate::laminar::{self, CodecId, ChunkResult, CHUNK_SIZE};
  | \|                                     ^^^^^^^^^^^
  |  
  | warning: variants `Fork`, `Race`, `Fold`, `Vent`, and `Process` are never constructed
  | --> src/topology.rs:27:5
  | \|
  | 24 \| pub enum Edge {
  | \|          ---- variants in this enum
  | ...
  | 27 \|     Fork,
  | \|     ^^^^
  | ...
  | 31 \|     Race,
  | \|     ^^^^
  | ...
  | 35 \|     Fold,
  | \|     ^^^^
  | ...
  | 39 \|     Vent,
  | \|     ^^^^
  | ...
  | 42 \|     Process,
  | \|     ^^^^^^^
  | \|
  | = note: `Edge` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
  | = note: `#[warn(dead_code)]` on by default
  |  
  | warning: multiple variants are never constructed
  | --> src/topology.rs:49:5
  | \|
  | 47 \| pub enum NodeOp {
  | \|          ------ variants in this enum
  | 48 \|     /// Accept incoming TCP connections.
  | 49 \|     Accept,
  | \|     ^^^^^^
  | ...
  | 52 \|     ParseHttp,
  | \|     ^^^^^^^^^
  | ...
  | 55 \|     CacheLookup,
  | \|     ^^^^^^^^^^^
  | ...
  | 58 \|     MmapRead,
  | \|     ^^^^^^^^
  | ...
  | 61 \|     DiskRead,
  | \|     ^^^^^^^^
  | ...
  | 64 \|     Compress(Codec),
  | \|     ^^^^^^^^
  | ...
  | 67 \|     BuildHeaders,
  | \|     ^^^^^^^^^^^^
  | ...
  | 70 \|     Send,
  | \|     ^^^^
  | ...
  | 73 \|     Sendfile,
  | \|     ^^^^^^^^
  | ...
  | 76 \|     LaminarSend,
  | \|     ^^^^^^^^^^^
  | \|
  | = note: `NodeOp` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
  |  
  | warning: variants `Identity`, `Gzip`, `Brotli`, and `Deflate` are never constructed
  | --> src/topology.rs:82:5
  | \|
  | 81 \| pub enum Codec {
  | \|          ----- variants in this enum
  | 82 \|     Identity,
  | \|     ^^^^^^^^
  | 83 \|     Gzip,
  | \|     ^^^^
  | 84 \|     Brotli,
  | \|     ^^^^^^
  | 85 \|     Deflate,
  | \|     ^^^^^^^
  | \|
  | = note: `Codec` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
  |  
  | warning: struct `Node` is never constructed
  | --> src/topology.rs:90:12
  | \|
  | 90 \| pub struct Node {
  | \|            ^^^^
  | \|
  | = note: `Node` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
  |  
  | warning: struct `TopoEdge` is never constructed
  | --> src/topology.rs:97:12
  | \|
  | 97 \| pub struct TopoEdge {
  | \|            ^^^^^^^^
  | \|
  | = note: `TopoEdge` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
  |  
  | warning: struct `Topology` is never constructed
  | --> src/topology.rs:107:12
  | \|
  | 107 \| pub struct Topology {
  | \|            ^^^^^^^^
  |  
  | warning: static `STATIC_SERVER` is never used
  | --> src/topology.rs:126:12
  | \|
  | 126 \| pub static STATIC_SERVER: Topology = Topology {
  | \|            ^^^^^^^^^^^^^
  |  
  | warning: static `PLAINTEXT_SERVER` is never used
  | --> src/topology.rs:154:12
  | \|
  | 154 \| pub static PLAINTEXT_SERVER: Topology = Topology {
  | \|            ^^^^^^^^^^^^^^^^
  |  
  | warning: constant `CHUNK_SIZE` is never used
  | --> src/laminar.rs:24:11
  | \|
  | 24 \| pub const CHUNK_SIZE: usize = 65_536;
  | \|           ^^^^^^^^^^
  |  
  | warning: field `original_size` is never read
  | --> src/laminar.rs:43:9
  | \|
  | 40 \| pub struct ChunkResult {
  | \|            ----------- field in this struct
  | ...
  | 43 \|     pub original_size: usize,
  | \|         ^^^^^^^^^^^^^
  |  
  | warning: function `flow_header` is never used
  | --> src/laminar.rs:125:8
  | \|
  | 125 \| pub fn flow_header(stream_id: u16, sequence: u32, flags: u8, payload_len: u32) -> [u8; 10] {
  | \|        ^^^^^^^^^^^
  |  
  | warning: function `laminar_pipeline` is never used
  | --> src/laminar.rs:147:8
  | \|
  | 147 \| pub fn laminar_pipeline(data: &[u8], stream_id: u16) -> Vec<([u8; 10], Vec<u8>)> {
  | \|        ^^^^^^^^^^^^^^^^
  |  
  | warning: struct `LaminarStats` is never constructed
  | --> src/laminar.rs:170:12
  | \|
  | 170 \| pub struct LaminarStats {
  | \|            ^^^^^^^^^^^^
  |  
  | warning: function `laminar_stats` is never used
  | --> src/laminar.rs:180:8
  | \|
  | 180 \| pub fn laminar_stats(data: &[u8]) -> LaminarStats {
  | \|        ^^^^^^^^^^^^^
  |  
  | warning: field `size` is never read
  | --> src/cache.rs:17:9
  | \|
  | 14 \| pub struct CacheEntry {
  | \|            ---------- field in this struct
  | ...
  | 17 \|     pub size: usize,
  | \|         ^^^^
  | \|
  | = note: `CacheEntry` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis
  |  
  | warning: fields `stream_id`, `sequence`, and `flags` are never read
  | --> src/uring.rs:501:9
  | \|
  | 500 \| pub struct FlowFrame {
  | \|            --------- fields in this struct
  | 501 \|     pub stream_id: u16,
  | \|         ^^^^^^^^^
  | 502 \|     pub sequence: u32,
  | \|         ^^^^^^^^
  | 503 \|     pub flags: u8,
  | \|         ^^^^^
  | \|
  | = note: `FlowFrame` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
  |  
  | warning: constant `FLOW_DATA` is never used
  | --> src/uring.rs:507:11
  | \|
  | 507 \| pub const FLOW_DATA: u8 = 0x00;
  | \|           ^^^^^^^^^
  |  
  | warning: constant `FLOW_FIN` is never used
  | --> src/uring.rs:508:11
  | \|
  | 508 \| pub const FLOW_FIN: u8 = 0x10;
  | \|           ^^^^^^^^
  |  
  | warning: constant `FLOW_FORK` is never used
  | --> src/uring.rs:509:11
  | \|
  | 509 \| pub const FLOW_FORK: u8 = 0x20;
  | \|           ^^^^^^^^^
  |  
  | warning: constant `FLOW_VENT` is never used
  | --> src/uring.rs:510:11
  | \|
  | 510 \| pub const FLOW_VENT: u8 = 0x40;
  | \|           ^^^^^^^^^
  |  
  | warning: constant `FLOW_RACE` is never used
  | --> src/uring.rs:511:11
  | \|
  | 511 \| pub const FLOW_RACE: u8 = 0x80;
  | \|           ^^^^^^^^^
  |  
  | warning: methods `encode`, `is_fin`, `is_fork`, `is_vent`, and `is_race` are never used
  | --> src/uring.rs:525:12
  | \|
  | 513 \| impl FlowFrame {
  | \| -------------- methods in this implementation
  | ...
  | 525 \|     pub fn encode(&self) -> [u8; 10] {
  | \|            ^^^^^^
  | ...
  | 529 \|     #[inline] pub fn is_fin(&self) -> bool { self.flags & FLOW_FIN != 0 }
  | \|                      ^^^^^^
  | 530 \|     #[inline] pub fn is_fork(&self) -> bool { self.flags & FLOW_FORK != 0 }
  | \|                      ^^^^^^^
  | 531 \|     #[inline] pub fn is_vent(&self) -> bool { self.flags & FLOW_VENT != 0 }
  | \|                      ^^^^^^^
  | 532 \|     #[inline] pub fn is_race(&self) -> bool { self.flags & FLOW_RACE != 0 }
  | \|                      ^^^^^^^
  |  
  | warning: function `build_flow_response` is never used
  | --> src/uring.rs:545:8
  | \|
  | 545 \| pub fn build_flow_response(stream_id: u16, sequence: u32, flags: u8, payload: &[u8]) -> Vec<u8> {
  | \|        ^^^^^^^^^^^^^^^^^^^
  |  
  | warning: struct `MuxStream` is never constructed
  | --> src/laminar_mux.rs:29:12
  | \|
  | 29 \| pub struct MuxStream {
  | \|            ^^^^^^^^^
  |  
  | warning: associated items `new`, `next_chunk`, `is_last_chunk`, and `advance` are never used
  | --> src/laminar_mux.rs:39:12
  | \|
  | 38 \| impl MuxStream {
  | \| -------------- associated items in this implementation
  | 39 \|     pub fn new(stream_id: u16, data: Vec<u8>, content_type: String) -> Self {
  | \|            ^^^
  | ...
  | 51 \|     fn next_chunk(&self) -> Option<&[u8]> {
  | \|        ^^^^^^^^^^
  | ...
  | 60 \|     fn is_last_chunk(&self) -> bool {
  | \|        ^^^^^^^^^^^^^
  | ...
  | 65 \|     fn advance(&mut self) {
  | \|        ^^^^^^^
  |  
  | warning: struct `MuxFrame` is never constructed
  | --> src/laminar_mux.rs:75:12
  | \|
  | 75 \| pub struct MuxFrame {
  | \|            ^^^^^^^^
  |  
  | warning: struct `MuxVoidWalker` is never constructed
  | --> src/laminar_mux.rs:87:12
  | \|
  | 87 \| pub struct MuxVoidWalker {
  | \|            ^^^^^^^^^^^^^
  |  
  | warning: associated items `new`, `record`, and `codecs_for` are never used
  | --> src/laminar_mux.rs:95:12
  | \|
  | 94  \| impl MuxVoidWalker {
  | \| ------------------ associated items in this implementation
  | 95  \|     pub fn new(warmup: u32) -> Self {
  | \|            ^^^
  | ...
  | 104 \|     pub fn record(&mut self, content_type: &str, codec: CodecId) {
  | \|            ^^^^^^
  | ...
  | 113 \|     pub fn codecs_for(&self, content_type: &str) -> Vec<CodecId> {
  | \|            ^^^^^^^^^^
  |  
  | warning: function `content_prefix` is never used
  | --> src/laminar_mux.rs:143:4
  | \|
  | 143 \| fn content_prefix(ct: &str) -> String {
  | \|    ^^^^^^^^^^^^^^
  |  
  | warning: struct `MuxBatch` is never constructed
  | --> src/laminar_mux.rs:149:12
  | \|
  | 149 \| pub struct MuxBatch {
  | \|            ^^^^^^^^
  |  
  | warning: function `mux_round` is never used
  | --> src/laminar_mux.rs:168:8
  | \|
  | 168 \| pub fn mux_round(
  | \|        ^^^^^^^^^
  |  
  | warning: function `mux_all` is never used
  | --> src/laminar_mux.rs:241:8
  | \|
  | 241 \| pub fn mux_all(
  | \|        ^^^^^^^
  |  
  | warning: struct `MuxStats` is never constructed
  | --> src/laminar_mux.rs:256:12
  | \|
  | 256 \| pub struct MuxStats {
  | \|            ^^^^^^^^
  |  
  | warning: function `mux_stats` is never used
  | --> src/laminar_mux.rs:268:8
  | \|
  | 268 \| pub fn mux_stats(streams: Vec<MuxStream>) -> MuxStats {
  | \|        ^^^^^^^^^
  |  
  | warning: `gnosis-uring` (bin "gnosis-uring") generated 36 warnings (run `cargo fix --bin "gnosis-uring"` to apply 2 suggestions)
  | Finished `release` profile [optimized] target(s) in 23.26s
  | Binary size: 1.5M
  | Finished Step #0 - "build"
  | Starting Step #1 - "benchmark"
  | Pulling image: debian:bookworm
  | bookworm: Pulling from library/debian
  | 9d2f29087bcd: Pulling fs layer
  | 9d2f29087bcd: Verifying Checksum
  | 9d2f29087bcd: Download complete
  | 9d2f29087bcd: Pull complete
  | Digest: sha256:bc960ef50e6feed90686c593361df158517556ed1d2d98e5d1df3724024e0f49
  | Status: Downloaded newer image for debian:bookworm
  | docker.io/library/debian:bookworm
  | ══════════════════════════════════════════════════════════════
  | gnosis-uring Benchmark — GCP Cloud Build (bare metal Linux)
  | ══════════════════════════════════════════════════════════════
  | CPU:    Intel(R) Xeon(R) CPU @ 2.20GHz
  | Cores:  32
  | Kernel: 5.10.0-32-cloud-amd64
  | io_uring: checking...
  |  
  | gnosis-uring [io_uring] listening:
  | TCP :8080 (HTTP/1.1 for browsers)
  | UDP :9082 (Aeon Flow for topology clients)
  | === Verify ===
  | Hello, World!
  | {"message":"Hello, World!"}
  |  
  | === Warmup (5s) ===
  | Done.
  |  
  | === PLAINTEXT — 4 threads, 64 connections, 15s ===
  | Running 15s test @ http://localhost:8080/plaintext
  | 4 threads and 64 connections
  | Thread Stats   Avg      Stdev     Max   +/- Stdev
  | Latency   373.78us  304.57us  16.86ms   99.73%
  | Req/Sec    42.60k     2.32k   61.07k    81.40%
  | Latency Distribution
  | 50%  365.00us
  | 75%  387.00us
  | 90%  411.00us
  | 99%  535.00us
  | 2551335 requests in 15.10s, 243.31MB read
  | Requests/sec: 168965.66
  | Transfer/sec:     16.11MB
  |  
  | === JSON — 4 threads, 64 connections, 15s ===
  | Running 15s test @ http://localhost:8080/json
  | 4 threads and 64 connections
  | Thread Stats   Avg      Stdev     Max   +/- Stdev
  | Latency   364.53us   51.46us   2.69ms   80.81%
  | Req/Sec    42.67k     2.03k   56.71k    83.39%
  | Latency Distribution
  | 50%  365.00us
  | 75%  384.00us
  | 90%  410.00us
  | 99%  529.00us
  | 2555383 requests in 15.10s, 292.44MB read
  | Requests/sec: 169227.86
  | Transfer/sec:     19.37MB
  |  
  | === PLAINTEXT — 8 threads, 256 connections, 30s ===
  | Running 30s test @ http://localhost:8080/plaintext
  | 8 threads and 256 connections
  | Thread Stats   Avg      Stdev     Max   +/- Stdev
  | Latency     1.39ms  792.92us  72.26ms   98.81%
  | Req/Sec    23.11k     3.26k   95.21k    94.44%
  | Latency Distribution
  | 50%    1.33ms
  | 75%    1.39ms
  | 90%    1.54ms
  | 99%    2.00ms
  | 5535841 requests in 30.10s, 527.94MB read
  | Requests/sec: 183914.79
  | Transfer/sec:     17.54MB
  |  
  | === JSON — 8 threads, 256 connections, 30s ===
  | Running 30s test @ http://localhost:8080/json
  | 8 threads and 256 connections
  | Thread Stats   Avg      Stdev     Max   +/- Stdev
  | Latency     1.35ms  445.09us  63.02ms   98.21%
  | Req/Sec    23.43k     3.04k   95.69k    97.92%
  | Latency Distribution
  | 50%    1.34ms
  | 75%    1.38ms
  | 90%    1.47ms
  | 99%    1.76ms
  | 5614014 requests in 30.10s, 642.47MB read
  | Requests/sec: 186512.02
  | Transfer/sec:     21.34MB
  |  
  | === PLAINTEXT — 12 threads, 1024 connections, 30s ===
  | Running 30s test @ http://localhost:8080/plaintext
  | 12 threads and 1024 connections
  | Thread Stats   Avg      Stdev     Max   +/- Stdev
  | Latency    15.25ms   71.97ms   1.69s    98.92%
  | Req/Sec     9.40k     0.92k   18.50k    89.49%
  | Latency Distribution
  | 50%    8.90ms
  | 75%    9.14ms
  | 90%    9.47ms
  | 99%  141.04ms
  | 3344104 requests in 30.04s, 318.92MB read
  | Socket errors: connect 11, read 0, write 0, timeout 0
  | Requests/sec: 111325.96
  | Transfer/sec:     10.62MB
  |  
  | === JSON — 12 threads, 1024 connections, 30s ===
  | Running 30s test @ http://localhost:8080/json
  | 12 threads and 1024 connections
  | Thread Stats   Avg      Stdev     Max   +/- Stdev
  | Latency    14.07ms   64.43ms   1.59s    99.01%
  | Req/Sec     9.66k     1.77k   91.62k    96.88%
  | Latency Distribution
  | 50%    8.69ms
  | 75%    9.00ms
  | 90%    9.39ms
  | 99%   68.73ms
  | 3451684 requests in 30.03s, 395.01MB read
  | Socket errors: connect 11, read 0, write 0, timeout 0
  | Requests/sec: 114935.39
  | Transfer/sec:     13.15MB
  |  
  | === STATIC FILE (/index.html) — 4 threads, 64 connections, 15s ===
  | Running 15s test @ http://localhost:8080/index.html
  | 4 threads and 64 connections
  | Thread Stats   Avg      Stdev     Max   +/- Stdev
  | Latency   364.94us   47.98us   3.50ms   81.91%
  | Req/Sec    42.77k     1.97k   57.47k    81.06%
  | Latency Distribution
  | 50%  364.00us
  | 75%  383.00us
  | 90%  406.00us
  | 99%  521.00us
  | 2561655 requests in 15.10s, 307.82MB read
  | Requests/sec: 169645.50
  | Transfer/sec:     20.39MB
  |  
  | ══════════════════════════════════════════════════════════════
  | Benchmark complete
  | ══════════════════════════════════════════════════════════════
  | Finished Step #1 - "benchmark"
  | PUSH
  | DONE

…JSON per-request

Per reviewer feedback (joanhey):
1. Content-Length computed per-request, not pre-built constant
2. JSON object instantiated per-request per TechEmpower rules
3. Date header added (required by HTTP/1.1, cached per-second)
4. HTTP pipelining: parse all pipelined requests, FOLD responses

Whitepaper: https://forkracefold.com/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants