Skip to content

Zix 0.4.x rc3 ws#886

Merged
MDA2AV merged 6 commits into
MDA2AV:mainfrom
prothegee:zix-0.4.x-rc3-ws
Jun 19, 2026
Merged

Zix 0.4.x rc3 ws#886
MDA2AV merged 6 commits into
MDA2AV:mainfrom
prothegee:zix-0.4.x-rc3-ws

Conversation

@prothegee

@prothegee prothegee commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Description

Bump the zix entry to 0.4.x-rc3 (WebSocket scope).

Update:

  • Attempt to tune both the epoll and io_uring dispatch models (connection teardown and response buffering) ahead of the 0.4.x release. Handlers and routes unchanged.

Required to call from HttpArena:

  • /benchmark -f zix-ws
  • /benchmark -f zix-ws --save

Result benchmark:

  • epoll
  • io_uring

Submitting:

  • io_uring.

Important:

  • double check before submitting final result for meta info.

PR Commands — comment on this PR to trigger (requires collaborator approval):

Command Description
/benchmark -f <framework> Run all benchmark tests
/benchmark -f <framework> -t <test> Run a specific test
/benchmark -f <framework> --save Run and save results (updates leaderboard on merge)

Always specify -f <framework>. Results are automatically compared against the current leaderboard.


Run benchmarks locally

You can validate and benchmark your framework locally with the lite script — no CPU pinning, fixed connection counts, all load generators run in Docker.

./scripts/validate.sh <framework>
./scripts/benchmark-lite.sh <framework> baseline
./scripts/benchmark-lite.sh --load-threads 4 <framework>

Requirements: Docker Engine on Linux. Load generators (gcannon, h2load, h2load-h3, wrk, ghz) are built as self-contained Docker images on first run.

@prothegee prothegee marked this pull request as draft June 17, 2026 19:05
@prothegee

prothegee commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

Hold until submission checked & submitted:

This was referenced Jun 17, 2026
@prothegee

Copy link
Copy Markdown
Contributor Author

Plan:
Not many changed on zix-ws. So submission only use io_uring.

@prothegee prothegee marked this pull request as ready for review June 17, 2026 20:27
@prothegee

Copy link
Copy Markdown
Contributor Author

Choosing io_uring model.

Direct test and submit after sync main branch.

@prothegee

Copy link
Copy Markdown
Contributor Author

/benchmark -f zix-ws

@github-actions

Copy link
Copy Markdown
Contributor

👋 /benchmark request received. A collaborator will review and approve the run.

@github-actions

Copy link
Copy Markdown
Contributor

Benchmark Results

Framework: zix-ws | Test: all tests

Test Conn RPS CPU Mem Δ RPS Δ Mem
echo-ws 512 4,374,430 6414.1% 190MiB +2.2% +0.5%
echo-ws 4096 4,573,522 6418.6% 246MiB +1.3% +1.2%
echo-ws 16384 4,375,492 6402.6% 418MiB +3.4% +0.5%
echo-ws-pipeline 512 61,275,410 6291.8% 195MiB +1.9% +0.5%
echo-ws-pipeline 4096 66,861,180 6148.9% 243MiB +2.0% -0.4%
echo-ws-pipeline 16384 62,291,153 6412.5% 416MiB +16.2% -5.9%
Full log
  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency    133us    126us    192us    298us    462us

  305242838 frames sent in 5.00s, 305358583 frames received
  Throughput: 61.05M req/s
  Bandwidth:  407.40MB/s
  WS upgrades: 512
  WS frames:   305358583
  Latency samples: 305335806 / 305358583 responses (100.0%)
[info] CPU 6446.0% | Mem 196MiB

[run 3/3]
gcannon v0.5.3 [WS]
  Target:    localhost:8080/ws
  Threads:   64
  Conns:     512 (8/thread)
  Pipeline:  16
  Req/conn:  unlimited (keep-alive)
  Expected:  200
  Duration:  5s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency    134us    127us    189us    315us    466us

  303288828 frames sent in 5.00s, 303288812 frames received
  Throughput: 60.64M req/s
  Bandwidth:  404.82MB/s
  WS upgrades: 512
  WS frames:   303288812
  Latency samples: 303287782 / 303288812 responses (100.0%)
[info] CPU 6313.4% | Mem 196MiB

=== Best: 61275410 req/s (CPU: 6291.8%, Mem: 195MiB) ===
[info] saved results/echo-ws-pipeline/512/zix-ws.json
httparena-bench-zix-ws
httparena-bench-zix-ws

==============================================
=== zix-ws / echo-ws-pipeline / 4096c (tool=gcannon) ===
==============================================
[info] ws-only framework — skipping HTTP probe (sleep 2s for startup)

[run 1/3]
gcannon v0.5.3 [WS]
  Target:    localhost:8080/ws
  Threads:   64
  Conns:     4096 (64/thread)
  Pipeline:  16
  Req/conn:  unlimited (keep-alive)
  Expected:  200
  Duration:  5s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency    974us    929us   1.18ms   1.97ms   2.67ms

  334367344 frames sent in 5.00s, 334305904 frames received
  Throughput: 66.83M req/s
  Bandwidth:  446.26MB/s
  WS upgrades: 4096
  WS frames:   334305904
  Latency samples: 334305904 / 334305904 responses (100.0%)
[info] CPU 6148.9% | Mem 243MiB

[run 2/3]
gcannon v0.5.3 [WS]
  Target:    localhost:8080/ws
  Threads:   64
  Conns:     4096 (64/thread)
  Pipeline:  16
  Req/conn:  unlimited (keep-alive)
  Expected:  200
  Duration:  5s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency    986us    959us   1.14ms   2.03ms   2.59ms

  332279092 frames sent in 5.00s, 332277908 frames received
  Throughput: 66.41M req/s
  Bandwidth:  443.32MB/s
  WS upgrades: 4096
  WS frames:   332277908
  Latency samples: 332301490 / 332277908 responses (100.0%)
[info] CPU 6430.2% | Mem 247MiB

[run 3/3]
gcannon v0.5.3 [WS]
  Target:    localhost:8080/ws
  Threads:   64
  Conns:     4096 (64/thread)
  Pipeline:  16
  Req/conn:  unlimited (keep-alive)
  Expected:  200
  Duration:  5s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency    984us    963us   1.14ms   2.02ms   2.41ms

  332875692 frames sent in 5.00s, 332875229 frames received
  Throughput: 66.54M req/s
  Bandwidth:  444.22MB/s
  WS upgrades: 4096
  WS frames:   332875229
  Latency samples: 332873928 / 332875229 responses (100.0%)
[info] CPU 6239.7% | Mem 247MiB

=== Best: 66861180 req/s (CPU: 6148.9%, Mem: 243MiB) ===
[info] saved results/echo-ws-pipeline/4096/zix-ws.json
httparena-bench-zix-ws
httparena-bench-zix-ws

==============================================
=== zix-ws / echo-ws-pipeline / 16384c (tool=gcannon) ===
==============================================
[info] ws-only framework — skipping HTTP probe (sleep 2s for startup)

[run 1/3]
gcannon v0.5.3 [WS]
  Target:    localhost:8080/ws
  Threads:   64
  Conns:     16384 (256/thread)
  Pipeline:  16
  Req/conn:  unlimited (keep-alive)
  Expected:  200
  Duration:  5s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   5.38ms   4.72ms   7.72ms   8.62ms   11.70ms

  234181984 frames sent in 5.00s, 233919840 frames received
  Throughput: 46.76M req/s
  Bandwidth:  312.58MB/s
  WS upgrades: 16384
  WS frames:   233919840
  Latency samples: 233919840 / 233919840 responses (100.0%)
[info] CPU 5821.4% | Mem 441MiB

[run 2/3]
gcannon v0.5.3 [WS]
  Target:    localhost:8080/ws
  Threads:   64
  Conns:     16384 (256/thread)
  Pipeline:  16
  Req/conn:  unlimited (keep-alive)
  Expected:  200
  Duration:  5s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   4.19ms   4.04ms   4.48ms   8.31ms   10.80ms

  311713815 frames sent in 5.00s, 311455767 frames received
  Throughput: 62.27M req/s
  Bandwidth:  416.08MB/s
  WS upgrades: 16384
  WS frames:   311455767
  Latency samples: 311455767 / 311455767 responses (100.0%)
[info] CPU 6412.5% | Mem 416MiB

[run 3/3]
gcannon v0.5.3 [WS]
  Target:    localhost:8080/ws
  Threads:   64
  Conns:     16384 (256/thread)
  Pipeline:  16
  Req/conn:  unlimited (keep-alive)
  Expected:  200
  Duration:  5s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   5.29ms   4.62ms   7.88ms   8.83ms   12.00ms

  246533281 frames sent in 5.00s, 246271137 frames received
  Throughput: 49.23M req/s
  Bandwidth:  329.05MB/s
  WS upgrades: 16384
  WS frames:   246271137
  Latency samples: 246271137 / 246271137 responses (100.0%)
[info] CPU 6130.6% | Mem 449MiB

=== Best: 62291153 req/s (CPU: 6412.5%, Mem: 416MiB) ===
[info] saved results/echo-ws-pipeline/16384/zix-ws.json
httparena-bench-zix-ws
httparena-bench-zix-ws
[info] rebuilding site/data/*.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/frameworks.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/echo-ws-16384.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/echo-ws-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/echo-ws-512.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/echo-ws-pipeline-16384.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/echo-ws-pipeline-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/echo-ws-pipeline-512.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/current.json
[info] done
[info] restoring loopback MTU to 65536

@prothegee

Copy link
Copy Markdown
Contributor Author

Submitting result.

@prothegee

Copy link
Copy Markdown
Contributor Author

/benchmark -f zix-ws --save

@github-actions

Copy link
Copy Markdown
Contributor

👋 /benchmark request received. A collaborator will review and approve the run.

@github-actions

Copy link
Copy Markdown
Contributor

Benchmark Results

Framework: zix-ws | Test: all tests

Test Conn RPS CPU Mem Δ RPS Δ Mem
echo-ws 512 4,321,169 6412.5% 190MiB +1.0% +0.5%
echo-ws 4096 4,536,341 6404.1% 246MiB +0.5% +1.2%
echo-ws 16384 4,344,058 6407.8% 416MiB +2.6% ~0%
echo-ws-pipeline 512 60,116,442 6292.1% 196MiB ~0% +1.0%
echo-ws-pipeline 4096 66,163,871 6131.5% 241MiB +0.9% -1.2%
echo-ws-pipeline 16384 50,196,478 5798.4% 440MiB -6.4% -0.5%
Full log
  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency    136us    132us    187us    304us    442us

  299323467 frames sent in 5.00s, 299323426 frames received
  Throughput: 59.85M req/s
  Bandwidth:  399.66MB/s
  WS upgrades: 512
  WS frames:   299323426
  Latency samples: 299418816 / 299323426 responses (100.0%)
[info] CPU 6418.6% | Mem 195MiB

[run 3/3]
gcannon v0.5.3 [WS]
  Target:    localhost:8080/ws
  Threads:   64
  Conns:     512 (8/thread)
  Pipeline:  16
  Req/conn:  unlimited (keep-alive)
  Expected:  200
  Duration:  5s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency    135us    130us    189us    314us    482us

  300403988 frames sent in 5.00s, 300582211 frames received
  Throughput: 60.10M req/s
  Bandwidth:  401.03MB/s
  WS upgrades: 512
  WS frames:   300582211
  Latency samples: 300543315 / 300582211 responses (100.0%)
[info] CPU 6292.1% | Mem 196MiB

=== Best: 60116442 req/s (CPU: 6292.1%, Mem: 196MiB) ===
[info] saved results/echo-ws-pipeline/512/zix-ws.json
httparena-bench-zix-ws
httparena-bench-zix-ws

==============================================
=== zix-ws / echo-ws-pipeline / 4096c (tool=gcannon) ===
==============================================
[info] ws-only framework — skipping HTTP probe (sleep 2s for startup)

[run 1/3]
gcannon v0.5.3 [WS]
  Target:    localhost:8080/ws
  Threads:   64
  Conns:     4096 (64/thread)
  Pipeline:  16
  Req/conn:  unlimited (keep-alive)
  Expected:  200
  Duration:  5s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency    980us    945us   1.14ms   2.02ms   2.52ms

  331543462 frames sent in 5.01s, 331480998 frames received
  Throughput: 66.22M req/s
  Bandwidth:  442.17MB/s
  WS upgrades: 4096
  WS frames:   331480998
  Latency samples: 331480998 / 331480998 responses (100.0%)
[info] CPU 6131.5% | Mem 241MiB

[run 2/3]
gcannon v0.5.3 [WS]
  Target:    localhost:8080/ws
  Threads:   64
  Conns:     4096 (64/thread)
  Pipeline:  16
  Req/conn:  unlimited (keep-alive)
  Expected:  200
  Duration:  5s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency    991us    963us   1.16ms   2.07ms   2.46ms

  330323189 frames sent in 5.00s, 330301669 frames received
  Throughput: 66.04M req/s
  Bandwidth:  440.87MB/s
  WS upgrades: 4096
  WS frames:   330301669
  Latency samples: 330322725 / 330301669 responses (100.0%)
[info] CPU 6432.5% | Mem 245MiB

[run 3/3]
gcannon v0.5.3 [WS]
  Target:    localhost:8080/ws
  Threads:   64
  Conns:     4096 (64/thread)
  Pipeline:  16
  Req/conn:  unlimited (keep-alive)
  Expected:  200
  Duration:  5s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency    990us    967us   1.15ms   2.04ms   2.51ms

  330681476 frames sent in 5.00s, 330677361 frames received
  Throughput: 66.10M req/s
  Bandwidth:  441.25MB/s
  WS upgrades: 4096
  WS frames:   330677361
  Latency samples: 330678008 / 330677361 responses (100.0%)
[info] CPU 6251.9% | Mem 246MiB

=== Best: 66163871 req/s (CPU: 6131.5%, Mem: 241MiB) ===
[info] saved results/echo-ws-pipeline/4096/zix-ws.json
httparena-bench-zix-ws
httparena-bench-zix-ws

==============================================
=== zix-ws / echo-ws-pipeline / 16384c (tool=gcannon) ===
==============================================
[info] ws-only framework — skipping HTTP probe (sleep 2s for startup)

[run 1/3]
gcannon v0.5.3 [WS]
  Target:    localhost:8080/ws
  Threads:   64
  Conns:     16384 (256/thread)
  Pipeline:  16
  Req/conn:  unlimited (keep-alive)
  Expected:  200
  Duration:  5s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   5.00ms   4.43ms   7.52ms   8.55ms   11.50ms

  251244535 frames sent in 5.00s, 250982391 frames received
  Throughput: 50.15M req/s
  Bandwidth:  335.17MB/s
  WS upgrades: 16384
  WS frames:   250982391
  Latency samples: 250982391 / 250982391 responses (100.0%)
[info] CPU 5798.4% | Mem 440MiB

[run 2/3]
gcannon v0.5.3 [WS]
  Target:    localhost:8080/ws
  Threads:   64
  Conns:     16384 (256/thread)
  Pipeline:  16
  Req/conn:  unlimited (keep-alive)
  Expected:  200
  Duration:  5s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   5.43ms   5.01ms   7.58ms   8.63ms   11.70ms

  240112197 frames sent in 5.00s, 239850053 frames received
  Throughput: 47.95M req/s
  Bandwidth:  320.50MB/s
  WS upgrades: 16384
  WS frames:   239850053
  Latency samples: 239850053 / 239850053 responses (100.0%)
[info] CPU 6396.6% | Mem 445MiB

[run 3/3]
gcannon v0.5.3 [WS]
  Target:    localhost:8080/ws
  Threads:   64
  Conns:     16384 (256/thread)
  Pipeline:  16
  Req/conn:  unlimited (keep-alive)
  Expected:  200
  Duration:  5s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   5.53ms   5.06ms   7.76ms   8.48ms   11.70ms

  235803142 frames sent in 5.00s, 235540998 frames received
  Throughput: 47.09M req/s
  Bandwidth:  314.75MB/s
  WS upgrades: 16384
  WS frames:   235540998
  Latency samples: 235540998 / 235540998 responses (100.0%)
[info] CPU 6141.6% | Mem 451MiB

=== Best: 50196478 req/s (CPU: 5798.4%, Mem: 440MiB) ===
[info] saved results/echo-ws-pipeline/16384/zix-ws.json
httparena-bench-zix-ws
httparena-bench-zix-ws
[info] rebuilding site/data/*.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/frameworks.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/echo-ws-16384.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/echo-ws-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/echo-ws-512.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/echo-ws-pipeline-16384.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/echo-ws-pipeline-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/echo-ws-pipeline-512.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/current.json
[info] done
[info] restoring loopback MTU to 65536

@MDA2AV MDA2AV merged commit 5b3863f into MDA2AV:main Jun 19, 2026
@prothegee

Copy link
Copy Markdown
Contributor Author

Deleting branch.

@prothegee prothegee deleted the zix-0.4.x-rc3-ws branch June 19, 2026 08:43
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