Skip to content

Update Ktor framework#781

Merged
MDA2AV merged 6 commits into
MDA2AV:mainfrom
ktorio:bjhham/ktor-updates
Jun 2, 2026
Merged

Update Ktor framework#781
MDA2AV merged 6 commits into
MDA2AV:mainfrom
ktorio:bjhham/ktor-updates

Conversation

@bjhham
Copy link
Copy Markdown
Contributor

@bjhham bjhham commented Jun 2, 2026

  • Updated Ktor framework to 3.5.0, gradle, and introduced version catalogs
  • Added Exposed with r2dbc for async database connection support
  • Changed "tuned" to "production" in the meta and leveraged standard plugin behaviours
  • Added SSL connector on the appropriate ports
  • Added websocket endpoint
  • Added test profile coverage

@Kaliumhexacyanoferrat
Copy link
Copy Markdown
Collaborator

Looks good, just the LeakPresenceDetector.java does not seem to be production grade to me.

@MDA2AV
Copy link
Copy Markdown
Owner

MDA2AV commented Jun 2, 2026

/benchmark -f ktor

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 2, 2026

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

@MDA2AV
Copy link
Copy Markdown
Owner

MDA2AV commented Jun 2, 2026

running a benchmark for initial smoke tests

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 2, 2026

Benchmark Results

Framework: ktor | Test: all tests

Test Conn RPS CPU Mem Δ RPS Δ Mem
baseline 512 871,431 6233.8% 14.8GiB NEW NEW
baseline 4096 769,211 5778.1% 4.9GiB NEW NEW
pipelined 512 829,561 4683.5% 14.8GiB NEW NEW
pipelined 4096 842,675 4806.0% 17.2GiB NEW NEW
limited-conn 512 718,413 6195.6% 4.7GiB NEW NEW
limited-conn 4096 719,747 6026.7% 4.8GiB NEW NEW
json 4096 450,401 4811.6% 5.2GiB NEW NEW
json-comp 512 187,069 6316.7% 4.8GiB NEW NEW
json-comp 4096 196,124 6302.6% 5.5GiB NEW NEW
json-comp 16384 201,901 6076.5% 20.2GiB NEW NEW
json-tls 4096 390,783 4610.1% 9.4GiB NEW NEW
upload 32 449 2763.9% 21.4GiB NEW NEW
upload 256 414 3896.3% 26.5GiB NEW NEW
api-4 256 8,691 414.7% 1.2GiB NEW NEW
api-16 1024 8,509 607.1% 2.1GiB NEW NEW
static 1024 165,349 6247.7% 3.1GiB NEW NEW
static 4096 164,906 6239.6% 4.1GiB NEW NEW
static 6800 171,409 6264.6% 5.0GiB NEW NEW
async-db 1024 2,150 457.2% 3.5GiB NEW NEW
baseline-h2 256 517,847 5786.5% 29.8GiB NEW NEW
baseline-h2 1024 384,364 5731.9% 31.2GiB NEW NEW
static-h2 256 134,358 6077.1% 22.1GiB NEW NEW
static-h2 1024 130,392 6088.1% 21.3GiB NEW NEW
echo-ws 512 1,032,031 3437.2% 2.5GiB NEW NEW
echo-ws 4096 1,006,567 3455.6% 3.3GiB NEW NEW
echo-ws 16384 731,327 3297.8% 14.9GiB NEW NEW
echo-ws-pipeline 512 11,540,765 3378.7% 5.7GiB NEW NEW
echo-ws-pipeline 4096 10,864,065 3389.5% 14.0GiB NEW NEW
echo-ws-pipeline 16384 9,888,295 3409.9% 21.3GiB NEW NEW
Full log
  Bandwidth:  77.02MB/s
  WS upgrades: 512
  WS frames:   57703827
  Latency samples: 57703747 / 57703827 responses (100.0%)
[info] CPU 3378.7% | Mem 5.7GiB

=== Best: 11540765 req/s (CPU: 3378.7%, Mem: 5.7GiB) ===
[info] saved results/echo-ws-pipeline/512/ktor.json
httparena-bench-ktor
httparena-bench-ktor

==============================================
=== ktor / echo-ws-pipeline / 4096c (tool=gcannon) ===
==============================================
[info] waiting for server...
[info] server ready

[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   7.75ms   5.68ms   9.37ms   39.80ms   267.40ms

  40074107 frames sent in 5.00s, 40012651 frames received
  Throughput: 8.00M req/s
  Bandwidth:  53.54MB/s
  WS upgrades: 4096
  WS frames:   40012651
  Latency samples: 40012651 / 40012651 responses (100.0%)
[info] CPU 3733.8% | Mem 13.9GiB

[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   6.14ms   5.53ms   9.95ms   14.40ms   27.50ms

  52645484 frames sent in 5.00s, 52590620 frames received
  Throughput: 10.52M req/s
  Bandwidth:  70.32MB/s
  WS upgrades: 4093
  WS frames:   52590620
  Latency samples: 52590604 / 52590620 responses (100.0%)
[info] CPU 3398.4% | Mem 14.0GiB

[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   6.02ms   5.51ms   9.11ms   14.70ms   19.50ms

  54365718 frames sent in 5.00s, 54320326 frames received
  Throughput: 10.86M req/s
  Bandwidth:  72.60MB/s
  WS upgrades: 4093
  WS frames:   54320326
  Latency samples: 54320310 / 54320326 responses (100.0%)
[info] CPU 3389.5% | Mem 14.0GiB

=== Best: 10864065 req/s (CPU: 3389.5%, Mem: 14.0GiB) ===
[info] saved results/echo-ws-pipeline/4096/ktor.json
httparena-bench-ktor
httparena-bench-ktor

==============================================
=== ktor / echo-ws-pipeline / 16384c (tool=gcannon) ===
==============================================
[info] waiting for server...
[info] server ready

[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   37.64ms   27.00ms   52.60ms   352.00ms   398.20ms

  28975594 frames sent in 5.00s, 28713450 frames received
  Throughput: 5.74M req/s
  Bandwidth:  38.89MB/s
  WS upgrades: 16384
  WS frames:   28713450
  Latency samples: 28713450 / 28713450 responses (100.0%)
[info] CPU 3665.5% | Mem 21.2GiB

[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   25.71ms   24.70ms   32.80ms   58.80ms   76.70ms

  49699525 frames sent in 5.00s, 49441477 frames received
  Throughput: 9.89M req/s
  Bandwidth:  66.55MB/s
  WS upgrades: 16384
  WS frames:   49441477
  Latency samples: 49441477 / 49441477 responses (100.0%)
[info] CPU 3409.9% | Mem 21.3GiB

[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   25.83ms   24.90ms   33.30ms   59.90ms   72.60ms

  49386087 frames sent in 5.00s, 49123943 frames received
  Throughput: 9.82M req/s
  Bandwidth:  66.12MB/s
  WS upgrades: 16384
  WS frames:   49123943
  Latency samples: 49123943 / 49123943 responses (100.0%)
[info] CPU 3298.2% | Mem 21.3GiB

=== Best: 9888295 req/s (CPU: 3409.9%, Mem: 21.3GiB) ===
[info] saved results/echo-ws-pipeline/16384/ktor.json
httparena-bench-ktor
httparena-bench-ktor
[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/api-16-1024.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/api-4-256.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/async-db-1024.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/baseline-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/baseline-512.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/baseline-h2-1024.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/baseline-h2-256.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/json-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/json-comp-16384.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/json-comp-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/json-comp-512.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/json-tls-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/limited-conn-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/limited-conn-512.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/pipelined-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/pipelined-512.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/static-1024.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/static-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/static-6800.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/static-h2-1024.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/static-h2-256.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/upload-256.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/upload-32.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/current.json
[info] done
httparena-postgres
[info] restoring loopback MTU to 65536
[info] restoring CPU governor → performance

@bjhham
Copy link
Copy Markdown
Contributor Author

bjhham commented Jun 2, 2026

/benchmark -f ktor

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 2, 2026

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

@bjhham bjhham marked this pull request as ready for review June 2, 2026 12:29
@bjhham
Copy link
Copy Markdown
Contributor Author

bjhham commented Jun 2, 2026

I'll create a follow up PR with some other test implementations so that this doesn't get too huge 😄

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 2, 2026

Benchmark Results

Framework: ktor | Test: all tests

Test Conn RPS CPU Mem Δ RPS Δ Mem
baseline 512 849,906 6151.9% 14.9GiB NEW NEW
baseline 4096 782,520 5854.4% 10.0GiB NEW NEW
pipelined 512 675,440 4537.0% 14.1GiB NEW NEW
pipelined 4096 944,860 4968.4% 7.9GiB NEW NEW
limited-conn 512 719,021 6177.8% 4.7GiB NEW NEW
limited-conn 4096 731,323 6094.6% 4.9GiB NEW NEW
json 4096 419,766 4557.2% 9.4GiB NEW NEW
json-comp 512 187,851 6338.4% 4.9GiB NEW NEW
json-comp 4096 194,422 6332.0% 6.0GiB NEW NEW
json-comp 16384 194,209 6066.3% 13.9GiB NEW NEW
json-tls 4096 387,090 4622.9% 6.8GiB NEW NEW
upload 32 1,644 2888.6% 1.4GiB NEW NEW
upload 256 1,954 4727.0% 1.5GiB NEW NEW
api-4 256 11,592 368.2% 788MiB NEW NEW
api-16 1024 27,425 1559.1% 1.9GiB NEW NEW
static 1024 166,474 6236.3% 3.3GiB NEW NEW
static 4096 163,824 6234.7% 4.8GiB NEW NEW
static 6800 167,144 6247.6% 5.3GiB NEW NEW
async-db 1024 45,035 5693.9% 5.5GiB NEW NEW
baseline-h2 256 418,753 5921.3% 29.6GiB NEW NEW
baseline-h2 1024 469,369 5824.9% 29.9GiB NEW NEW
static-h2 256 132,626 6094.7% 21.0GiB NEW NEW
static-h2 1024 133,490 6016.4% 20.5GiB NEW NEW
echo-ws 512 1,067,599 3444.5% 2.5GiB NEW NEW
echo-ws 4096 1,015,077 3454.1% 3.2GiB NEW NEW
echo-ws 16384 810,204 3324.4% 15.2GiB NEW NEW
echo-ws-pipeline 512 11,714,052 3380.4% 9.2GiB NEW NEW
echo-ws-pipeline 4096 11,048,022 3406.0% 15.4GiB NEW NEW
echo-ws-pipeline 16384 8,875,211 3298.9% 21.4GiB NEW NEW
Full log
  WS frames:   58570261
  Latency samples: 58570086 / 58570260 responses (100.0%)

  WARNING: 18446744073709551615/58570260 responses (31495069466499.8%) had unexpected status (expected 2xx)
[info] CPU 3380.4% | Mem 9.2GiB

=== Best: 11714052 req/s (CPU: 3380.4%, Mem: 9.2GiB) ===
[info] saved results/echo-ws-pipeline/512/ktor.json
httparena-bench-ktor
httparena-bench-ktor

==============================================
=== ktor / echo-ws-pipeline / 4096c (tool=gcannon) ===
==============================================
[info] waiting for server...
[info] server ready

[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   7.85ms   5.66ms   10.70ms   35.70ms   303.70ms

  39121227 frames sent in 5.00s, 39057355 frames received
  Throughput: 7.81M req/s
  Bandwidth:  52.27MB/s
  WS upgrades: 4096
  WS frames:   39057355
  Latency samples: 39057355 / 39057355 responses (100.0%)
[info] CPU 3659.8% | Mem 15.4GiB

[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   5.89ms   5.55ms   7.89ms   14.10ms   37.70ms

  55036137 frames sent in 5.00s, 54975145 frames received
  Throughput: 10.99M req/s
  Bandwidth:  73.51MB/s
  WS upgrades: 4095
  WS frames:   54975145
  Latency samples: 54975081 / 54975145 responses (100.0%)
[info] CPU 3398.0% | Mem 15.4GiB

[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   5.92ms   5.55ms   7.95ms   14.00ms   23.80ms

  55284831 frames sent in 5.00s, 55240111 frames received
  Throughput: 11.05M req/s
  Bandwidth:  73.83MB/s
  WS upgrades: 4094
  WS frames:   55240111
  Latency samples: 55240079 / 55240111 responses (100.0%)
[info] CPU 3406.0% | Mem 15.4GiB

=== Best: 11048022 req/s (CPU: 3406.0%, Mem: 15.4GiB) ===
[info] saved results/echo-ws-pipeline/4096/ktor.json
httparena-bench-ktor
httparena-bench-ktor

==============================================
=== ktor / echo-ws-pipeline / 16384c (tool=gcannon) ===
==============================================
[info] waiting for server...
[info] server ready

[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   41.28ms   29.60ms   56.10ms   363.10ms   410.20ms

  26726931 frames sent in 5.00s, 26464787 frames received
  Throughput: 5.29M req/s
  Bandwidth:  35.88MB/s
  WS upgrades: 16384
  WS frames:   26464787
  Latency samples: 26464787 / 26464787 responses (100.0%)
[info] CPU 3796.7% | Mem 21.4GiB

[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   31.93ms   30.10ms   46.00ms   79.20ms   107.80ms

  40305282 frames sent in 5.00s, 40047234 frames received
  Throughput: 8.01M req/s
  Bandwidth:  54.01MB/s
  WS upgrades: 16384
  WS frames:   40047234
  Latency samples: 40047234 / 40047234 responses (100.0%)
[info] CPU 3396.0% | Mem 21.4GiB

[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   28.80ms   27.20ms   40.70ms   63.20ms   78.10ms

  44638200 frames sent in 5.00s, 44376056 frames received
  Throughput: 8.87M req/s
  Bandwidth:  59.79MB/s
  WS upgrades: 16384
  WS frames:   44376056
  Latency samples: 44376056 / 44376056 responses (100.0%)
[info] CPU 3298.9% | Mem 21.4GiB

=== Best: 8875211 req/s (CPU: 3298.9%, Mem: 21.4GiB) ===
[info] saved results/echo-ws-pipeline/16384/ktor.json
httparena-bench-ktor
httparena-bench-ktor
[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/api-16-1024.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/api-4-256.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/async-db-1024.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/baseline-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/baseline-512.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/baseline-h2-1024.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/baseline-h2-256.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/json-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/json-comp-16384.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/json-comp-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/json-comp-512.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/json-tls-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/limited-conn-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/limited-conn-512.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/pipelined-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/pipelined-512.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/static-1024.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/static-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/static-6800.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/static-h2-1024.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/static-h2-256.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/upload-256.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/upload-32.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/current.json
[info] done
httparena-postgres
[info] restoring loopback MTU to 65536
[info] restoring CPU governor → performance

@MDA2AV
Copy link
Copy Markdown
Owner

MDA2AV commented Jun 2, 2026

I'll create a follow up PR with some other test implementations so that this doesn't get too huge 😄

I can merge this but results on leaderboard will only show when you do a run with --save
Feel free to create as many PRs and benchmarks as needed until results are good enough to be published

@bjhham
Copy link
Copy Markdown
Contributor Author

bjhham commented Jun 2, 2026

/benchmark -f ktor --save

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 2, 2026

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

@bjhham
Copy link
Copy Markdown
Contributor Author

bjhham commented Jun 2, 2026

Like that? ^^ 😄

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 2, 2026

⚠️ /benchmark --save cannot start: main has diverged and cannot be auto-merged into this branch. Please merge or rebase main manually, push, and re-run /benchmark --save.

@MDA2AV
Copy link
Copy Markdown
Owner

MDA2AV commented Jun 2, 2026

Like that? ^^ 😄

yep, seems you need to rebase because something was merged that conflicts with the same files results will be written to

@bjhham bjhham force-pushed the bjhham/ktor-updates branch from b06f618 to 98c42e2 Compare June 2, 2026 13:18
@bjhham
Copy link
Copy Markdown
Contributor Author

bjhham commented Jun 2, 2026

/benchmark -f ktor --save

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 2, 2026

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 2, 2026

Benchmark Results

Framework: ktor | Test: all tests

Test Conn RPS CPU Mem Δ RPS Δ Mem
baseline 512 847,484 6201.9% 10.5GiB NEW NEW
baseline 4096 734,766 5718.8% 9.4GiB NEW NEW
pipelined 512 552,854 4409.8% 10.6GiB NEW NEW
pipelined 4096 576,009 4481.7% 16.8GiB NEW NEW
limited-conn 512 706,852 6197.4% 4.7GiB NEW NEW
limited-conn 4096 714,901 6189.5% 4.5GiB NEW NEW
json 4096 424,688 4524.0% 5.3GiB NEW NEW
json-comp 512 189,391 6365.5% 4.9GiB NEW NEW
json-comp 4096 198,031 6329.7% 8.5GiB NEW NEW
json-comp 16384 196,354 6119.1% 19.8GiB NEW NEW
json-tls 4096 360,386 4437.8% 5.8GiB NEW NEW
upload 32 1,658 2878.5% 1.4GiB NEW NEW
upload 256 1,992 4432.3% 1.5GiB NEW NEW
api-4 256 11,609 371.1% 797MiB NEW NEW
api-16 1024 27,192 1556.4% 1.7GiB NEW NEW
static 1024 166,700 6336.2% 3.3GiB NEW NEW
static 4096 164,189 6235.9% 4.4GiB NEW NEW
static 6800 168,163 6240.2% 6.5GiB NEW NEW
async-db 1024 45,063 5665.1% 5.5GiB NEW NEW
baseline-h2 256 478,099 5712.0% 31.1GiB NEW NEW
baseline-h2 1024 453,756 5699.1% 31.1GiB NEW NEW
static-h2 256 133,096 6183.9% 18.5GiB NEW NEW
static-h2 1024 131,104 5879.0% 22.3GiB NEW NEW
echo-ws 512 1,038,791 3433.3% 2.5GiB NEW NEW
echo-ws 4096 1,017,589 3450.5% 3.2GiB NEW NEW
echo-ws 16384 708,005 3282.4% 15.0GiB NEW NEW
echo-ws-pipeline 512 11,252,199 3395.2% 5.6GiB NEW NEW
echo-ws-pipeline 4096 11,070,743 3437.5% 13.8GiB NEW NEW
echo-ws-pipeline 16384 8,811,379 3295.2% 21.2GiB NEW NEW
Full log
  Throughput: 11.25M req/s
  Bandwidth:  75.10MB/s
  WS upgrades: 512
  WS frames:   56260996
  Latency samples: 56260852 / 56260996 responses (100.0%)
[info] CPU 3395.2% | Mem 5.6GiB

=== Best: 11252199 req/s (CPU: 3395.2%, Mem: 5.6GiB) ===
[info] saved results/echo-ws-pipeline/512/ktor.json
httparena-bench-ktor
httparena-bench-ktor

==============================================
=== ktor / echo-ws-pipeline / 4096c (tool=gcannon) ===
==============================================
[info] waiting for server...
[info] server ready

[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   7.76ms   5.67ms   10.30ms   40.70ms   272.60ms

  40074596 frames sent in 5.00s, 40011716 frames received
  Throughput: 8.00M req/s
  Bandwidth:  53.54MB/s
  WS upgrades: 4096
  WS frames:   40011716
  Latency samples: 40011716 / 40011716 responses (100.0%)
[info] CPU 3730.2% | Mem 13.7GiB

[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   5.94ms   5.58ms   7.99ms   14.30ms   27.30ms

  54757874 frames sent in 5.00s, 54702002 frames received
  Throughput: 10.94M req/s
  Bandwidth:  73.14MB/s
  WS upgrades: 4095
  WS frames:   54702002
  Latency samples: 54701986 / 54702002 responses (100.0%)
[info] CPU 3404.3% | Mem 13.8GiB

[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   5.91ms   5.52ms   8.15ms   14.40ms   18.80ms

  55388966 frames sent in 5.00s, 55353718 frames received
  Throughput: 11.07M req/s
  Bandwidth:  73.96MB/s
  WS upgrades: 4095
  WS frames:   55353718
  Latency samples: 55353670 / 55353718 responses (100.0%)
[info] CPU 3437.5% | Mem 13.8GiB

=== Best: 11070743 req/s (CPU: 3437.5%, Mem: 13.8GiB) ===
[info] saved results/echo-ws-pipeline/4096/ktor.json
httparena-bench-ktor
httparena-bench-ktor

==============================================
=== ktor / echo-ws-pipeline / 16384c (tool=gcannon) ===
==============================================
[info] waiting for server...
[info] server ready

[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   41.08ms   29.80ms   56.80ms   368.70ms   397.60ms

  26704121 frames sent in 5.00s, 26441977 frames received
  Throughput: 5.29M req/s
  Bandwidth:  35.86MB/s
  WS upgrades: 16384
  WS frames:   26441977
  Latency samples: 26441977 / 26441977 responses (100.0%)
[info] CPU 3795.9% | Mem 21.1GiB

[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   28.92ms   27.70ms   40.60ms   58.90ms   75.00ms

  44137279 frames sent in 5.00s, 43875135 frames received
  Throughput: 8.77M req/s
  Bandwidth:  59.12MB/s
  WS upgrades: 16384
  WS frames:   43875135
  Latency samples: 43875135 / 43875135 responses (100.0%)
[info] CPU 3402.3% | Mem 21.2GiB

[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   28.90ms   27.50ms   40.10ms   60.10ms   74.20ms

  44319039 frames sent in 5.00s, 44056895 frames received
  Throughput: 8.81M req/s
  Bandwidth:  59.37MB/s
  WS upgrades: 16384
  WS frames:   44056895
  Latency samples: 44056895 / 44056895 responses (100.0%)
[info] CPU 3295.2% | Mem 21.2GiB

=== Best: 8811379 req/s (CPU: 3295.2%, Mem: 21.2GiB) ===
[info] saved results/echo-ws-pipeline/16384/ktor.json
httparena-bench-ktor
httparena-bench-ktor
[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/api-16-1024.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/api-4-256.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/async-db-1024.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/baseline-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/baseline-512.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/baseline-h2-1024.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/baseline-h2-256.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/json-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/json-comp-16384.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/json-comp-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/json-comp-512.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/json-tls-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/limited-conn-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/limited-conn-512.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/pipelined-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/pipelined-512.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/static-1024.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/static-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/static-6800.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/static-h2-1024.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/static-h2-256.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/upload-256.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/upload-32.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/current.json
[info] done
httparena-postgres
[info] restoring loopback MTU to 65536

@bjhham
Copy link
Copy Markdown
Contributor Author

bjhham commented Jun 2, 2026

Results look good, feel free to merge 👍

@MDA2AV
Copy link
Copy Markdown
Owner

MDA2AV commented Jun 2, 2026

Ah, Ill merge this but Ill have to rerun the benchmark later to update website results because this is a PR from an org and the bot gets a 403 trying to post results here to be merged. That is fine, we had some similar cases.

@MDA2AV MDA2AV merged commit 4ac38f6 into MDA2AV:main Jun 2, 2026
4 checks passed
@bjhham
Copy link
Copy Markdown
Contributor Author

bjhham commented Jun 2, 2026

Oh, I can add write perms to the github-actions on the fork if that helps for next time?

@MDA2AV
Copy link
Copy Markdown
Owner

MDA2AV commented Jun 2, 2026

We had this issue before and a member posted:

Hello all.
The Warning: could not push to fork (permissions) in the benchmark workflow is caused by GitHub's known limitation with org-owned forks — maintainer_can_modify is set to true in the API but GITHUB_TOKEN still can't push to org forks (only user forks).
A simple solution is to submit the PR from a private fork.

So not sure if that will help, Ill need to find a workaround for this, maybe posting results in a new branch. For now Ill just rerun directly on server, it is only needed to update the website

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.

3 participants