Skip to content

[WTX] WebSocket evaluation#953

Closed
c410-f3r wants to merge 6 commits into
MDA2AV:mainfrom
c410-f3r:misc
Closed

[WTX] WebSocket evaluation#953
c410-f3r wants to merge 6 commits into
MDA2AV:mainfrom
c410-f3r:misc

Conversation

@c410-f3r

@c410-f3r c410-f3r commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Do you guys mind if an execute a couple of perf runs?

Tokio, the canonical Rust's runtime, is not scalable when a single runtime is involved. See https://medium.com/@fujita.tomonori/scalable-server-design-in-rust-with-tokio-4c81a5f350a3.

Therefore, the following scenarios will be reproduced to evaluate the best outcome.

  • Runtime per thread created in a spawn, build, new_current_thread
  • Runtime per thread created in a spawn, build, new_multi_thread
  • Runtime per thread created in a spawn, build_local, new_current_thread
  • Runtime per thread created in a thread, build, new_current_thread
  • Runtime per thread created in a thread, build, new_multi_thread
  • Runtime per thread created in a thread, build_local, new_current_thread

It will probably take less than a hour to finish everything.

@MDA2AV

MDA2AV commented Jun 29, 2026

Copy link
Copy Markdown
Owner

No problem but do one benchmark command at a time(only fire the next after the previous one finished) because a new run prompt cancels any previous pending

@c410-f3r

Copy link
Copy Markdown
Contributor Author

Thank you @MDA2AV !

@c410-f3r

Copy link
Copy Markdown
Contributor Author
  • Runtime per thread created in a thread, build_local, new_current_thread

/benchmark -f wtx-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: wtx-ws | Test: all tests

Test Conn RPS CPU Mem Δ RPS Δ Mem
echo-ws 512 4,041,238 6375.1% 43MiB ~0% +26.5%
echo-ws 4096 4,052,778 6179.1% 110MiB -2.8% +34.1%
echo-ws 16384 3,663,086 6476.0% 358MiB -4.0% +47.9%
echo-ws-pipeline 512 5,532,242 6526.3% 42MiB -1.8% +50.0%
echo-ws-pipeline 4096 5,944,497 6633.9% 112MiB -1.2% +45.5%
echo-ws-pipeline 16384 5,733,603 6622.5% 354MiB -1.7% +50.0%
Full log
  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   1.48ms   1.47ms   2.31ms   3.03ms   3.25ms

  27540461 frames sent in 5.00s, 27540545 frames received
  Throughput: 5.51M req/s
  Bandwidth:  36.76MB/s
  WS upgrades: 512
  WS frames:   27540545
  Latency samples: 27540466 / 27540545 responses (100.0%)
[info] CPU 6566.3% | Mem 39MiB

[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   1.48ms   1.44ms   2.24ms   2.98ms   3.26ms

  27661159 frames sent in 5.00s, 27661214 frames received
  Throughput: 5.53M req/s
  Bandwidth:  36.92MB/s
  WS upgrades: 512
  WS frames:   27661214
  Latency samples: 27661122 / 27661214 responses (100.0%)
[info] CPU 6526.3% | Mem 42MiB

=== Best: 5532242 req/s (CPU: 6526.3%, Mem: 42MiB) ===
[info] saved results/echo-ws-pipeline/512/wtx-ws.json
httparena-bench-wtx-ws
httparena-bench-wtx-ws

==============================================
=== wtx-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   11.24ms   10.90ms   12.80ms   22.80ms   29.60ms

  28856076 frames sent in 5.00s, 28793694 frames received
  Throughput: 5.76M req/s
  Bandwidth:  38.53MB/s
  WS upgrades: 4096
  WS frames:   28793694
  Latency samples: 28793694 / 28793694 responses (100.0%)
[info] CPU 6061.7% | Mem 106MiB

[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   11.02ms   11.00ms   12.50ms   13.40ms   13.70ms

  29725515 frames sent in 5.00s, 29722487 frames received
  Throughput: 5.94M req/s
  Bandwidth:  39.68MB/s
  WS upgrades: 4096
  WS frames:   29722487
  Latency samples: 29722399 / 29722487 responses (100.0%)
[info] CPU 6633.9% | Mem 112MiB

[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   11.26ms   10.90ms   12.60ms   22.70ms   27.20ms

  29090416 frames sent in 5.00s, 29084648 frames received
  Throughput: 5.82M req/s
  Bandwidth:  38.83MB/s
  WS upgrades: 4096
  WS frames:   29084648
  Latency samples: 29084588 / 29084648 responses (100.0%)
[info] CPU 6195.3% | Mem 113MiB

=== Best: 5944497 req/s (CPU: 6633.9%, Mem: 112MiB) ===
[info] saved results/echo-ws-pipeline/4096/wtx-ws.json
httparena-bench-wtx-ws
httparena-bench-wtx-ws

==============================================
=== wtx-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   46.40ms   45.40ms   50.10ms   89.40ms   103.90ms

  27435792 frames sent in 5.00s, 27173730 frames received
  Throughput: 5.43M req/s
  Bandwidth:  36.67MB/s
  WS upgrades: 16384
  WS frames:   27173730
  Latency samples: 27173730 / 27173730 responses (100.0%)
[info] CPU 5842.9% | Mem 350MiB

[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   45.28ms   45.70ms   50.20ms   52.60ms   53.30ms

  28930077 frames sent in 5.00s, 28668018 frames received
  Throughput: 5.73M req/s
  Bandwidth:  38.67MB/s
  WS upgrades: 16384
  WS frames:   28668018
  Latency samples: 28668018 / 28668018 responses (100.0%)
[info] CPU 6622.5% | Mem 354MiB

[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   45.41ms   45.70ms   48.80ms   52.00ms   52.80ms

  28826656 frames sent in 5.00s, 28564594 frames received
  Throughput: 5.71M req/s
  Bandwidth:  38.53MB/s
  WS upgrades: 16384
  WS frames:   28564594
  Latency samples: 28564594 / 28564594 responses (100.0%)
[info] CPU 6363.0% | Mem 356MiB

=== Best: 5733603 req/s (CPU: 6622.5%, Mem: 354MiB) ===
[info] saved results/echo-ws-pipeline/16384/wtx-ws.json
httparena-bench-wtx-ws
httparena-bench-wtx-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

@c410-f3r

Copy link
Copy Markdown
Contributor Author
  • Runtime per thread created in a thread, build, new_multi_thread

/benchmark -f wtx-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: wtx-ws | Test: all tests

Test Conn RPS CPU Mem Δ RPS Δ Mem
echo-ws 512 3,853,307 6409.9% 239MiB -4.7% +602.9%
echo-ws 4096 4,063,085 6324.8% 306MiB -2.6% +273.2%
echo-ws 16384 3,735,800 6225.1% 609MiB -2.1% +151.7%
echo-ws-pipeline 512 5,485,623 6538.2% 231MiB -2.6% +725.0%
echo-ws-pipeline 4096 5,719,510 6425.2% 339MiB -4.9% +340.3%
echo-ws-pipeline 16384 5,675,472 6593.2% 621MiB -2.7% +163.1%
Full log
  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   1.49ms    388us   1.59ms   23.70ms   33.10ms

  27369483 frames sent in 5.00s, 27369528 frames received
  Throughput: 5.47M req/s
  Bandwidth:  36.53MB/s
  WS upgrades: 512
  WS frames:   27369528
  Latency samples: 27369456 / 27369528 responses (100.0%)
[info] CPU 6528.7% | Mem 235MiB

[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   1.49ms    389us   1.59ms   23.20ms   32.20ms

  27370899 frames sent in 5.00s, 27370949 frames received
  Throughput: 5.47M req/s
  Bandwidth:  36.53MB/s
  WS upgrades: 512
  WS frames:   27370949
  Latency samples: 27370846 / 27370949 responses (100.0%)
[info] CPU 6488.3% | Mem 238MiB

=== Best: 5485623 req/s (CPU: 6538.2%, Mem: 231MiB) ===
[info] saved results/echo-ws-pipeline/512/wtx-ws.json
httparena-bench-wtx-ws
httparena-bench-wtx-ws

==============================================
=== wtx-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   11.23ms   4.47ms   19.50ms   120.60ms   155.30ms

  28650783 frames sent in 5.00s, 28597550 frames received
  Throughput: 5.72M req/s
  Bandwidth:  38.25MB/s
  WS upgrades: 4096
  WS frames:   28597550
  Latency samples: 28597142 / 28597550 responses (100.0%)
[info] CPU 6425.2% | Mem 339MiB

[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   11.41ms   3.94ms   20.40ms   125.10ms   162.10ms

  28551648 frames sent in 5.00s, 28548626 frames received
  Throughput: 5.71M req/s
  Bandwidth:  38.11MB/s
  WS upgrades: 4096
  WS frames:   28548626
  Latency samples: 28548472 / 28548626 responses (100.0%)
[info] CPU 6559.8% | Mem 350MiB

[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   11.42ms   3.50ms   19.60ms   133.10ms   173.30ms

  28505759 frames sent in 5.00s, 28478162 frames received
  Throughput: 5.69M req/s
  Bandwidth:  38.06MB/s
  WS upgrades: 4096
  WS frames:   28478162
  Latency samples: 28478055 / 28478162 responses (100.0%)
[info] CPU 6406.0% | Mem 357MiB

=== Best: 5719510 req/s (CPU: 6425.2%, Mem: 339MiB) ===
[info] saved results/echo-ws-pipeline/4096/wtx-ws.json
httparena-bench-wtx-ws
httparena-bench-wtx-ws

==============================================
=== wtx-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   38.77ms   24.70ms   93.30ms   211.40ms   341.90ms

  28598800 frames sent in 5.00s, 28336749 frames received
  Throughput: 5.67M req/s
  Bandwidth:  38.23MB/s
  WS upgrades: 16382
  WS frames:   28336749
  Latency samples: 28336749 / 28336749 responses (100.0%)
[info] CPU 6354.6% | Mem 594MiB

[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   45.58ms   28.90ms   110.00ms   236.00ms   361.30ms

  28639442 frames sent in 5.00s, 28377364 frames received
  Throughput: 5.67M req/s
  Bandwidth:  38.28MB/s
  WS upgrades: 16384
  WS frames:   28377364
  Latency samples: 28377364 / 28377364 responses (100.0%)
[info] CPU 6593.2% | Mem 621MiB

[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   45.64ms   28.90ms   110.20ms   233.90ms   363.30ms

  28567905 frames sent in 5.00s, 28305819 frames received
  Throughput: 5.66M req/s
  Bandwidth:  38.18MB/s
  WS upgrades: 16384
  WS frames:   28305819
  Latency samples: 28305819 / 28305819 responses (100.0%)
[info] CPU 6360.8% | Mem 639MiB

=== Best: 5675472 req/s (CPU: 6593.2%, Mem: 621MiB) ===
[info] saved results/echo-ws-pipeline/16384/wtx-ws.json
httparena-bench-wtx-ws
httparena-bench-wtx-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

@c410-f3r

Copy link
Copy Markdown
Contributor Author
  • Runtime per thread created in a thread, build, new_current_thread

/benchmark -f wtx-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: wtx-ws | Test: all tests

Test Conn RPS CPU Mem Δ RPS Δ Mem
echo-ws 512 4,033,988 6336.8% 40MiB -0.2% +17.6%
echo-ws 4096 4,088,350 6477.1% 116MiB -2.0% +41.5%
echo-ws 16384 3,694,075 6481.6% 357MiB -3.2% +47.5%
echo-ws-pipeline 512 5,537,457 6478.5% 34MiB -1.7% +21.4%
echo-ws-pipeline 4096 5,909,514 6655.3% 112MiB -1.7% +45.5%
echo-ws-pipeline 16384 5,598,118 6627.5% 354MiB -4.0% +50.0%
Full log
  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   1.49ms   1.47ms   2.29ms   3.30ms   5.26ms

  27493208 frames sent in 5.00s, 27493296 frames received
  Throughput: 5.50M req/s
  Bandwidth:  36.70MB/s
  WS upgrades: 512
  WS frames:   27493296
  Latency samples: 27506909 / 27493296 responses (100.0%)
[info] CPU 6564.7% | Mem 39MiB

[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   1.50ms   1.47ms   2.32ms   2.99ms   5.02ms

  27221937 frames sent in 5.00s, 27222005 frames received
  Throughput: 5.44M req/s
  Bandwidth:  36.34MB/s
  WS upgrades: 512
  WS frames:   27222005
  Latency samples: 27221881 / 27222005 responses (100.0%)
[info] CPU 6398.2% | Mem 42MiB

=== Best: 5537457 req/s (CPU: 6478.5%, Mem: 34MiB) ===
[info] saved results/echo-ws-pipeline/512/wtx-ws.json
httparena-bench-wtx-ws
httparena-bench-wtx-ws

==============================================
=== wtx-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   11.10ms   10.90ms   13.10ms   14.60ms   25.40ms

  29195377 frames sent in 5.00s, 29132976 frames received
  Throughput: 5.82M req/s
  Bandwidth:  38.98MB/s
  WS upgrades: 4096
  WS frames:   29132976
  Latency samples: 29132976 / 29132976 responses (100.0%)
[info] CPU 6287.2% | Mem 105MiB

[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   11.09ms   11.00ms   13.20ms   14.60ms   24.30ms

  29550464 frames sent in 5.00s, 29547574 frames received
  Throughput: 5.91M req/s
  Bandwidth:  39.44MB/s
  WS upgrades: 4094
  WS frames:   29547574
  Latency samples: 29547415 / 29547574 responses (100.0%)
[info] CPU 6655.3% | Mem 112MiB

[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   11.13ms   11.00ms   13.10ms   14.60ms   25.00ms

  29443758 frames sent in 5.00s, 29441753 frames received
  Throughput: 5.89M req/s
  Bandwidth:  39.30MB/s
  WS upgrades: 4096
  WS frames:   29441753
  Latency samples: 29441550 / 29441753 responses (100.0%)
[info] CPU 6397.8% | Mem 114MiB

=== Best: 5909514 req/s (CPU: 6655.3%, Mem: 112MiB) ===
[info] saved results/echo-ws-pipeline/4096/wtx-ws.json
httparena-bench-wtx-ws
httparena-bench-wtx-ws

==============================================
=== wtx-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   45.76ms   45.20ms   50.10ms   53.60ms   86.10ms

  27900038 frames sent in 5.00s, 27641743 frames received
  Throughput: 5.53M req/s
  Bandwidth:  37.29MB/s
  WS upgrades: 16384
  WS frames:   27641743
  Latency samples: 27641743 / 27641743 responses (100.0%)
[info] CPU 6163.6% | Mem 349MiB

[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   46.26ms   45.80ms   50.80ms   75.40ms   96.00ms

  28252653 frames sent in 5.00s, 27990591 frames received
  Throughput: 5.60M req/s
  Bandwidth:  37.76MB/s
  WS upgrades: 16384
  WS frames:   27990591
  Latency samples: 27990591 / 27990591 responses (100.0%)
[info] CPU 6627.5% | Mem 354MiB

[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   46.38ms   46.00ms   51.20ms   79.20ms   98.90ms

  28206846 frames sent in 5.00s, 27945175 frames received
  Throughput: 5.59M req/s
  Bandwidth:  37.70MB/s
  WS upgrades: 16384
  WS frames:   27945175
  Latency samples: 27945175 / 27945175 responses (100.0%)
[info] CPU 6238.9% | Mem 359MiB

=== Best: 5598118 req/s (CPU: 6627.5%, Mem: 354MiB) ===
[info] saved results/echo-ws-pipeline/16384/wtx-ws.json
httparena-bench-wtx-ws
httparena-bench-wtx-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

@c410-f3r

Copy link
Copy Markdown
Contributor Author
  • Runtime per thread created in a thread, build_local, new_current_thread (spawn_local)

/benchmark -f wtx-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: wtx-ws | Test: all tests

Test Conn RPS CPU Mem Δ RPS Δ Mem
echo-ws 512 4,057,881 6295.8% 42MiB +0.4% +23.5%
echo-ws 4096 4,125,126 6477.5% 117MiB -1.1% +42.7%
echo-ws 16384 3,628,785 6074.4% 359MiB -4.9% +48.3%
echo-ws-pipeline 512 5,509,412 6537.0% 35MiB -2.2% +25.0%
echo-ws-pipeline 4096 5,862,595 6298.8% 114MiB -2.5% +48.1%
echo-ws-pipeline 16384 5,713,723 6622.0% 357MiB -2.0% +51.3%
Full log

  27473203 frames sent in 5.00s, 27473261 frames received
  Throughput: 5.49M req/s
  Bandwidth:  36.67MB/s
  WS upgrades: 512
  WS frames:   27473261
  Latency samples: 27473196 / 27473261 responses (100.0%)
[info] CPU 6589.8% | Mem 39MiB

[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   1.50ms   1.52ms   2.22ms   2.72ms   4.85ms

  27343384 frames sent in 5.00s, 27343447 frames received
  Throughput: 5.47M req/s
  Bandwidth:  36.51MB/s
  WS upgrades: 512
  WS frames:   27343447
  Latency samples: 27343352 / 27343447 responses (100.0%)
[info] CPU 6424.4% | Mem 43MiB

=== Best: 5509412 req/s (CPU: 6537.0%, Mem: 35MiB) ===
[info] saved results/echo-ws-pipeline/512/wtx-ws.json
httparena-bench-wtx-ws
httparena-bench-wtx-ws

==============================================
=== wtx-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   11.26ms   10.90ms   13.00ms   24.00ms   37.50ms

  28920241 frames sent in 5.00s, 28856835 frames received
  Throughput: 5.77M req/s
  Bandwidth:  38.61MB/s
  WS upgrades: 4096
  WS frames:   28856835
  Latency samples: 28856835 / 28856835 responses (100.0%)
[info] CPU 6114.4% | Mem 106MiB

[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   11.24ms   11.00ms   13.20ms   23.50ms   28.30ms

  29131968 frames sent in 5.00s, 29127910 frames received
  Throughput: 5.82M req/s
  Bandwidth:  38.88MB/s
  WS upgrades: 4096
  WS frames:   29127911
  Latency samples: 29127814 / 29127910 responses (100.0%)

  WARNING: 18446744073709551615/29127910 responses (63330132761703.6%) had unexpected status (expected 2xx)
[info] CPU 6476.5% | Mem 113MiB

[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   11.17ms   11.00ms   13.30ms   19.20ms   26.30ms

  29318044 frames sent in 5.00s, 29312979 frames received
  Throughput: 5.86M req/s
  Bandwidth:  39.13MB/s
  WS upgrades: 4096
  WS frames:   29312979
  Latency samples: 29314331 / 29312979 responses (100.0%)
[info] CPU 6298.8% | Mem 114MiB

=== Best: 5862595 req/s (CPU: 6298.8%, Mem: 114MiB) ===
[info] saved results/echo-ws-pipeline/4096/wtx-ws.json
httparena-bench-wtx-ws
httparena-bench-wtx-ws

==============================================
=== wtx-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   45.07ms   45.20ms   49.90ms   52.10ms   62.70ms

  28297619 frames sent in 5.00s, 28035574 frames received
  Throughput: 5.61M req/s
  Bandwidth:  37.82MB/s
  WS upgrades: 16384
  WS frames:   28035574
  Latency samples: 28035574 / 28035574 responses (100.0%)
[info] CPU 6116.5% | Mem 349MiB

[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   45.58ms   45.00ms   49.00ms   67.20ms   95.30ms

  28830666 frames sent in 5.00s, 28568615 frames received
  Throughput: 5.71M req/s
  Bandwidth:  38.53MB/s
  WS upgrades: 16384
  WS frames:   28568615
  Latency samples: 28568615 / 28568615 responses (100.0%)
[info] CPU 6622.0% | Mem 357MiB

[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   46.33ms   45.60ms   50.40ms   86.60ms   98.20ms

  28248076 frames sent in 5.00s, 27990105 frames received
  Throughput: 5.60M req/s
  Bandwidth:  37.76MB/s
  WS upgrades: 16384
  WS frames:   27990105
  Latency samples: 27990105 / 27990105 responses (100.0%)
[info] CPU 6083.2% | Mem 359MiB

=== Best: 5713723 req/s (CPU: 6622.0%, Mem: 357MiB) ===
[info] saved results/echo-ws-pipeline/16384/wtx-ws.json
httparena-bench-wtx-ws
httparena-bench-wtx-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

@c410-f3r

Copy link
Copy Markdown
Contributor Author
  • Runtime per thread created in a thread, build_local, new_current_thread (core_affinity)

/benchmark -f wtx-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: wtx-ws | Test: all tests

Test Conn RPS CPU Mem Δ RPS Δ Mem
echo-ws 512 4,013,004 6399.1% 43MiB -0.7% +26.5%
echo-ws 4096 4,096,964 6465.0% 117MiB -1.8% +42.7%
echo-ws 16384 3,728,981 6468.1% 360MiB -2.3% +48.8%
echo-ws-pipeline 512 5,458,371 6597.2% 34MiB -3.1% +21.4%
echo-ws-pipeline 4096 5,929,358 6709.6% 111MiB -1.4% +44.2%
echo-ws-pipeline 16384 5,750,213 6709.1% 358MiB -1.4% +51.7%
Full log
  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   1.50ms   1.50ms   2.16ms   2.96ms   3.14ms

  27184762 frames sent in 5.00s, 27184806 frames received
  Throughput: 5.44M req/s
  Bandwidth:  36.29MB/s
  WS upgrades: 512
  WS frames:   27184806
  Latency samples: 27184682 / 27184806 responses (100.0%)
[info] CPU 6631.2% | Mem 39MiB

[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   1.51ms   1.48ms   2.54ms   2.97ms   3.15ms

  27141177 frames sent in 5.00s, 27141241 frames received
  Throughput: 5.43M req/s
  Bandwidth:  36.23MB/s
  WS upgrades: 512
  WS frames:   27141241
  Latency samples: 27141136 / 27141241 responses (100.0%)
[info] CPU 6602.3% | Mem 42MiB

=== Best: 5458371 req/s (CPU: 6597.2%, Mem: 34MiB) ===
[info] saved results/echo-ws-pipeline/512/wtx-ws.json
httparena-bench-wtx-ws
httparena-bench-wtx-ws

==============================================
=== wtx-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   11.03ms   11.00ms   12.60ms   14.40ms   14.70ms

  29450208 frames sent in 5.00s, 29387839 frames received
  Throughput: 5.88M req/s
  Bandwidth:  39.32MB/s
  WS upgrades: 4096
  WS frames:   29387839
  Latency samples: 29387839 / 29387839 responses (100.0%)
[info] CPU 6463.1% | Mem 106MiB

[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   11.05ms   11.00ms   13.00ms   13.90ms   14.20ms

  29648759 frames sent in 5.00s, 29646793 frames received
  Throughput: 5.93M req/s
  Bandwidth:  39.57MB/s
  WS upgrades: 4096
  WS frames:   29646793
  Latency samples: 29646690 / 29646793 responses (100.0%)
[info] CPU 6709.6% | Mem 111MiB

[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   11.06ms   11.00ms   12.90ms   14.60ms   14.90ms

  29608747 frames sent in 5.00s, 29602661 frames received
  Throughput: 5.92M req/s
  Bandwidth:  39.52MB/s
  WS upgrades: 4096
  WS frames:   29602661
  Latency samples: 29602559 / 29602661 responses (100.0%)
[info] CPU 6555.8% | Mem 113MiB

=== Best: 5929358 req/s (CPU: 6709.6%, Mem: 111MiB) ===
[info] saved results/echo-ws-pipeline/4096/wtx-ws.json
httparena-bench-wtx-ws
httparena-bench-wtx-ws

==============================================
=== wtx-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   45.02ms   45.20ms   49.20ms   53.20ms   54.00ms

  28212199 frames sent in 5.00s, 27950138 frames received
  Throughput: 5.59M req/s
  Bandwidth:  37.71MB/s
  WS upgrades: 16384
  WS frames:   27950138
  Latency samples: 27950138 / 27950138 responses (100.0%)
[info] CPU 6237.6% | Mem 350MiB

[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   44.96ms   45.40ms   48.70ms   52.80ms   53.60ms

  29013128 frames sent in 5.00s, 28751066 frames received
  Throughput: 5.75M req/s
  Bandwidth:  38.78MB/s
  WS upgrades: 16384
  WS frames:   28751066
  Latency samples: 28751066 / 28751066 responses (100.0%)
[info] CPU 6709.1% | Mem 358MiB

[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   45.19ms   45.40ms   49.20ms   53.10ms   53.90ms

  28931718 frames sent in 5.00s, 28669667 frames received
  Throughput: 5.73M req/s
  Bandwidth:  38.67MB/s
  WS upgrades: 16384
  WS frames:   28669667
  Latency samples: 28669667 / 28669667 responses (100.0%)
[info] CPU 6439.9% | Mem 358MiB

=== Best: 5750213 req/s (CPU: 6709.1%, Mem: 358MiB) ===
[info] saved results/echo-ws-pipeline/16384/wtx-ws.json
httparena-bench-wtx-ws
httparena-bench-wtx-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

@c410-f3r

Copy link
Copy Markdown
Contributor Author

OK. I guess this is it.

  • The creation of a new runtime inside an existing task creates conflict, which is expected.
  • The use of multi-thread runtimes in a per-thread runtime explodes memory usage and also doesn't help with performance, which is also expected

Thanks for lending a bit of computing power from your 64 cores machine :)

@c410-f3r c410-f3r closed this Jun 29, 2026
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