Skip to content

[sinatra] Update puma to 8.0#674

Merged
MDA2AV merged 2 commits intoMDA2AV:mainfrom
p8:sinatra/puma-8-marks-as-io-bound
May 1, 2026
Merged

[sinatra] Update puma to 8.0#674
MDA2AV merged 2 commits intoMDA2AV:mainfrom
p8:sinatra/puma-8-marks-as-io-bound

Conversation

@p8
Copy link
Copy Markdown
Contributor

@p8 p8 commented Apr 30, 2026

No description provided.

@p8
Copy link
Copy Markdown
Contributor Author

p8 commented Apr 30, 2026

/benchmark -f sinatra

@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: sinatra | Test: all tests

Test Conn RPS CPU Mem Δ RPS Δ Mem
baseline 512 80,169 4422.3% 5.1GiB +0.4% -13.6%
baseline 4096 48,920 3321.8% 4.5GiB +5.1% -2.2%
pipelined 512 435,935 6451.9% 2.1GiB -13.0% +5.0%
pipelined 4096 418,234 6351.3% 2.1GiB -16.0% ~0%
limited-conn 512 35,525 3149.0% 3.7GiB -13.4% -11.9%
limited-conn 4096 38,786 3022.7% 4.1GiB -5.4% -8.9%
json 4096 197,654 6384.0% 4.5GiB -9.7% -16.7%
json-comp 512 114,531 6478.7% 4.4GiB -14.5% -13.7%
json-comp 4096 122,872 6501.8% 4.4GiB -13.1% -13.7%
json-comp 16384 121,523 6500.7% 4.7GiB -13.3% -9.6%
json-tls 4096 180,952 6524.9% 6.4GiB -8.8% -14.7%
upload 32 955 3152.8% 8.3GiB -0.1% -8.8%
upload 256 923 6346.3% 8.6GiB +7.0% +2.4%
api-4 256 16,703 396.6% 398MiB -4.0% -0.3%
api-16 1024 40,734 1630.6% 1.4GiB -6.4% -6.7%
static 1024 23,456 6506.4% 6.9GiB -88.7% -24.2%
static 4096 23,194 6499.5% 7.1GiB -88.7% -19.3%
static 6800 23,155 6481.0% 7.2GiB -88.6% -15.3%
async-db 1024 102,774 6337.9% 2.9GiB -8.1% -6.5%
Full log
[info] CPU 6466.2% | Mem 6.7GiB

[run 2/3]
Running 5s test @ http://localhost:8080
  64 threads and 4096 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   165.66ms   46.83ms 479.97ms   74.29%
    Req/Sec   366.40    111.82     2.35k    89.09%
  118241 requests in 5.10s, 2.06GB read
Requests/sec:  23175.86
Transfer/sec:    413.08MB
[info] CPU 6508.6% | Mem 6.8GiB

[run 3/3]
Running 5s test @ http://localhost:8080
  64 threads and 4096 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   164.61ms   48.79ms 555.73ms   75.83%
    Req/Sec   366.61    139.59     4.32k    90.47%
  118407 requests in 5.10s, 2.06GB read
Requests/sec:  23194.75
Transfer/sec:    413.29MB
[info] CPU 6499.5% | Mem 7.1GiB

=== Best: 23194 req/s (CPU: 6499.5%, Mem: 7.1GiB) ===
[info] saved results/static/4096/sinatra.json
httparena-bench-sinatra
httparena-bench-sinatra

==============================================
=== sinatra / static / 6800c (tool=wrk) ===
==============================================
[info] waiting for server...
[info] server ready

[run 1/3]
Running 5s test @ http://localhost:8080
  64 threads and 6800 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   273.85ms  120.53ms   1.42s    78.58%
    Req/Sec   348.63    143.00     0.98k    77.95%
  109190 requests in 5.10s, 1.90GB read
Requests/sec:  21396.52
Transfer/sec:    381.41MB
[info] CPU 6417.7% | Mem 6.7GiB

[run 2/3]
Running 5s test @ http://localhost:8080
  64 threads and 6800 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   261.44ms  103.91ms   1.01s    74.15%
    Req/Sec   363.15    166.47     3.14k    80.62%
  116653 requests in 5.10s, 2.03GB read
Requests/sec:  22870.16
Transfer/sec:    407.62MB
[info] CPU 6521.2% | Mem 6.8GiB

[run 3/3]
Running 5s test @ http://localhost:8080
  64 threads and 6800 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   255.65ms   81.50ms 700.94ms   71.50%
    Req/Sec   367.90    178.38     4.45k    79.47%
  118181 requests in 5.10s, 2.06GB read
Requests/sec:  23155.78
Transfer/sec:    412.62MB
[info] CPU 6481.0% | Mem 7.2GiB

=== Best: 23155 req/s (CPU: 6481.0%, Mem: 7.2GiB) ===
[info] saved results/static/6800/sinatra.json
httparena-bench-sinatra
httparena-bench-sinatra

==============================================
=== sinatra / async-db / 1024c (tool=gcannon) ===
==============================================
[info] waiting for server...
[info] server ready

[run 1/3]
gcannon v0.5.3
  Target:    localhost:8080/
  Threads:   64
  Conns:     1024 (16/thread)
  Pipeline:  1
  Req/conn:  25
  Templates: 5
  Expected:  200
  Duration:  10s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   9.27ms   8.80ms   15.40ms   23.50ms   108.60ms

  1018679 requests in 10.00s, 1018679 responses
  Throughput: 101.84K req/s
  Bandwidth:  413.36MB/s
  Status codes: 2xx=1018679, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 1018679 / 1018679 responses (100.0%)
  Reconnects: 40241
  Per-template: 203003,204014,204474,204097,203091
  Per-template-ok: 203003,204014,204474,204097,203091
[info] CPU 6226.0% | Mem 3.0GiB

[run 2/3]
gcannon v0.5.3
  Target:    localhost:8080/
  Threads:   64
  Conns:     1024 (16/thread)
  Pipeline:  1
  Req/conn:  25
  Templates: 5
  Expected:  200
  Duration:  10s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   9.28ms   8.84ms   16.10ms   22.80ms   30.90ms

  1027749 requests in 10.00s, 1027749 responses
  Throughput: 102.75K req/s
  Bandwidth:  417.38MB/s
  Status codes: 2xx=1027749, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 1027747 / 1027749 responses (100.0%)
  Reconnects: 40875
  Per-template: 204741,205432,206158,206060,205356
  Per-template-ok: 204741,205432,206158,206060,205356
[info] CPU 6337.9% | Mem 2.9GiB

[run 3/3]
gcannon v0.5.3
  Target:    localhost:8080/
  Threads:   64
  Conns:     1024 (16/thread)
  Pipeline:  1
  Req/conn:  25
  Templates: 5
  Expected:  200
  Duration:  10s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   9.29ms   8.66ms   16.50ms   23.20ms   29.40ms

  1019979 requests in 10.00s, 1020023 responses
  Throughput: 101.98K req/s
  Bandwidth:  414.04MB/s
  Status codes: 2xx=1020023, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 1019979 / 1020023 responses (100.0%)
  Reconnects: 40516
  Per-template: 203424,203972,204639,204272,203672
  Per-template-ok: 203424,203972,204639,204272,203672
[info] CPU 6372.2% | Mem 3.0GiB

=== Best: 102774 req/s (CPU: 6337.9%, Mem: 2.9GiB) ===
[info] input BW: 6.86MB/s (avg template: 70 bytes)
[info] saved results/async-db/1024/sinatra.json
httparena-bench-sinatra
httparena-bench-sinatra
[info] skip: sinatra does not subscribe to crud
[info] skip: sinatra does not subscribe to baseline-h2
[info] skip: sinatra does not subscribe to static-h2
[info] skip: sinatra does not subscribe to baseline-h2c
[info] skip: sinatra does not subscribe to json-h2c
[info] skip: sinatra does not subscribe to baseline-h3
[info] skip: sinatra does not subscribe to static-h3
[info] skip: sinatra does not subscribe to gateway-64
[info] skip: sinatra does not subscribe to gateway-h3
[info] skip: sinatra does not subscribe to production-stack
[info] skip: sinatra does not subscribe to unary-grpc
[info] skip: sinatra does not subscribe to unary-grpc-tls
[info] skip: sinatra does not subscribe to stream-grpc
[info] skip: sinatra does not subscribe to stream-grpc-tls
[info] skip: sinatra does not subscribe to echo-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/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/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/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 → powersave

@p8
Copy link
Copy Markdown
Contributor Author

p8 commented Apr 30, 2026

/benchmark -f sinatra

@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: sinatra | Test: all tests

Test Conn RPS CPU Mem Δ RPS Δ Mem
baseline 512 79,714 4643.2% 4.8GiB -0.2% -18.6%
baseline 4096 49,594 3484.6% 4.2GiB +6.5% -8.7%
pipelined 512 436,061 6507.1% 2.1GiB -13.0% +5.0%
pipelined 4096 416,979 6445.0% 2.1GiB -16.3% ~0%
limited-conn 512 36,586 3157.2% 3.6GiB -10.8% -14.3%
limited-conn 4096 38,483 2805.1% 4.0GiB -6.1% -11.1%
json 4096 200,957 6439.3% 4.6GiB -8.1% -14.8%
json-comp 512 115,654 6493.1% 4.5GiB -13.6% -11.8%
json-comp 4096 121,786 6457.7% 4.4GiB -13.9% -13.7%
json-comp 16384 120,794 6518.3% 4.7GiB -13.8% -9.6%
json-tls 4096 181,822 6469.7% 6.5GiB -8.4% -13.3%
upload 32 958 3052.3% 8.7GiB +0.2% -4.4%
upload 256 921 6341.3% 8.6GiB +6.7% +2.4%
api-4 256 16,567 396.5% 427MiB -4.8% +7.0%
api-16 1024 42,081 1656.7% 1.4GiB -3.3% -6.7%
static 1024 23,300 6514.8% 7.0GiB -88.8% -23.1%
static 4096 23,190 6501.5% 7.1GiB -88.7% -19.3%
static 6800 23,186 6453.6% 7.0GiB -88.6% -17.6%
async-db 1024 102,100 6342.0% 3.0GiB -8.7% -3.2%
Full log
[info] CPU 6468.5% | Mem 6.7GiB

[run 2/3]
Running 5s test @ http://localhost:8080
  64 threads and 4096 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   165.97ms   47.28ms 519.03ms   74.67%
    Req/Sec   365.97    110.94     2.27k    88.78%
  118095 requests in 5.10s, 2.06GB read
Requests/sec:  23153.75
Transfer/sec:    412.70MB
[info] CPU 6516.6% | Mem 6.8GiB

[run 3/3]
Running 5s test @ http://localhost:8080
  64 threads and 4096 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   164.11ms   44.84ms 445.31ms   74.15%
    Req/Sec   368.51    133.01     4.01k    89.95%
  118862 requests in 5.13s, 2.07GB read
Requests/sec:  23190.47
Transfer/sec:    413.33MB
[info] CPU 6501.5% | Mem 7.1GiB

=== Best: 23190 req/s (CPU: 6501.5%, Mem: 7.1GiB) ===
[info] saved results/static/4096/sinatra.json
httparena-bench-sinatra
httparena-bench-sinatra

==============================================
=== sinatra / static / 6800c (tool=wrk) ===
==============================================
[info] waiting for server...
[info] server ready

[run 1/3]
Running 5s test @ http://localhost:8080
  64 threads and 6800 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   265.01ms   82.85ms 715.49ms   72.72%
    Req/Sec   349.81    141.27     0.89k    78.95%
  109741 requests in 5.12s, 1.91GB read
Requests/sec:  21435.35
Transfer/sec:    381.99MB
[info] CPU 6388.8% | Mem 6.7GiB

[run 2/3]
Running 5s test @ http://localhost:8080
  64 threads and 6800 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   259.73ms   90.45ms 916.93ms   75.14%
    Req/Sec   366.22    157.64     2.30k    78.12%
  117577 requests in 5.10s, 2.05GB read
Requests/sec:  23044.62
Transfer/sec:    410.71MB
[info] CPU 6525.8% | Mem 6.6GiB

[run 3/3]
Running 5s test @ http://localhost:8080
  64 threads and 6800 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   257.99ms   76.24ms 655.11ms   70.53%
    Req/Sec   367.98    157.29     3.99k    79.13%
  118241 requests in 5.10s, 2.06GB read
Requests/sec:  23186.62
Transfer/sec:    413.23MB
[info] CPU 6453.6% | Mem 7.0GiB

=== Best: 23186 req/s (CPU: 6453.6%, Mem: 7.0GiB) ===
[info] saved results/static/6800/sinatra.json
httparena-bench-sinatra
httparena-bench-sinatra

==============================================
=== sinatra / async-db / 1024c (tool=gcannon) ===
==============================================
[info] waiting for server...
[info] server ready

[run 1/3]
gcannon v0.5.3
  Target:    localhost:8080/
  Threads:   64
  Conns:     1024 (16/thread)
  Pipeline:  1
  Req/conn:  25
  Templates: 5
  Expected:  200
  Duration:  10s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   9.48ms   8.94ms   15.70ms   24.00ms   107.40ms

  1017633 requests in 10.00s, 1017634 responses
  Throughput: 101.74K req/s
  Bandwidth:  413.06MB/s
  Status codes: 2xx=1017634, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 1017634 / 1017634 responses (100.0%)
  Reconnects: 40212
  Per-template: 202940,203476,204121,204055,203042
  Per-template-ok: 202940,203476,204121,204055,203042
[info] CPU 6183.5% | Mem 3.1GiB

[run 2/3]
gcannon v0.5.3
  Target:    localhost:8080/
  Threads:   64
  Conns:     1024 (16/thread)
  Pipeline:  1
  Req/conn:  25
  Templates: 5
  Expected:  200
  Duration:  10s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   9.30ms   8.90ms   16.10ms   23.00ms   31.30ms

  1021002 requests in 10.00s, 1021000 responses
  Throughput: 102.08K req/s
  Bandwidth:  414.35MB/s
  Status codes: 2xx=1021000, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 1020997 / 1021000 responses (100.0%)
  Reconnects: 40593
  Per-template: 203703,204311,204833,204274,203876
  Per-template-ok: 203703,204311,204833,204274,203876
[info] CPU 6342.0% | Mem 3.0GiB

[run 3/3]
gcannon v0.5.3
  Target:    localhost:8080/
  Threads:   64
  Conns:     1024 (16/thread)
  Pipeline:  1
  Req/conn:  25
  Templates: 5
  Expected:  200
  Duration:  10s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   9.44ms   9.00ms   16.30ms   22.80ms   30.00ms

  1014378 requests in 10.00s, 1014378 responses
  Throughput: 101.41K req/s
  Bandwidth:  411.71MB/s
  Status codes: 2xx=1014378, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 1014378 / 1014378 responses (100.0%)
  Reconnects: 40329
  Per-template: 202392,202829,203434,203274,202449
  Per-template-ok: 202392,202829,203434,203274,202449
[info] CPU 6375.7% | Mem 3.0GiB

=== Best: 102100 req/s (CPU: 6342.0%, Mem: 3.0GiB) ===
[info] input BW: 6.82MB/s (avg template: 70 bytes)
[info] saved results/async-db/1024/sinatra.json
httparena-bench-sinatra
httparena-bench-sinatra
[info] skip: sinatra does not subscribe to crud
[info] skip: sinatra does not subscribe to baseline-h2
[info] skip: sinatra does not subscribe to static-h2
[info] skip: sinatra does not subscribe to baseline-h2c
[info] skip: sinatra does not subscribe to json-h2c
[info] skip: sinatra does not subscribe to baseline-h3
[info] skip: sinatra does not subscribe to static-h3
[info] skip: sinatra does not subscribe to gateway-64
[info] skip: sinatra does not subscribe to gateway-h3
[info] skip: sinatra does not subscribe to production-stack
[info] skip: sinatra does not subscribe to unary-grpc
[info] skip: sinatra does not subscribe to unary-grpc-tls
[info] skip: sinatra does not subscribe to stream-grpc
[info] skip: sinatra does not subscribe to stream-grpc-tls
[info] skip: sinatra does not subscribe to echo-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/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/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/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 → powersave

@p8 p8 force-pushed the sinatra/puma-8-marks-as-io-bound branch from 9ece901 to a872a1c Compare April 30, 2026 18:14
@p8
Copy link
Copy Markdown
Contributor Author

p8 commented Apr 30, 2026

/benchmark -f sinatra

@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: sinatra | Test: all tests

Test Conn RPS CPU Mem Δ RPS Δ Mem
baseline 512 91,876 4544.8% 6.2GiB +15.1% +5.1%
baseline 4096 55,513 3640.4% 4.4GiB +19.3% -4.3%
pipelined 512 427,724 6443.4% 2.1GiB -14.7% +5.0%
pipelined 4096 424,292 6435.8% 2.1GiB -14.8% ~0%
limited-conn 512 38,687 3041.0% 3.6GiB -5.7% -14.3%
limited-conn 4096 39,590 2948.8% 4.0GiB -3.4% -11.1%
json 4096 196,871 6348.2% 4.4GiB -10.0% -18.5%
json-comp 512 115,600 6457.5% 4.5GiB -13.7% -11.8%
json-comp 4096 123,216 6493.8% 4.4GiB -12.8% -13.7%
json-comp 16384 121,941 6518.5% 4.7GiB -13.0% -9.6%
json-tls 4096 182,460 6462.8% 6.1GiB -8.1% -18.7%
upload 32 945 3104.5% 8.3GiB -1.2% -8.8%
upload 256 895 6512.1% 7.6GiB +3.7% -9.5%
api-4 256 16,195 393.6% 427MiB -6.9% +7.0%
api-16 1024 40,827 1631.2% 1.2GiB -6.2% -20.0%
static 1024 23,287 6510.6% 7.1GiB -88.8% -22.0%
static 4096 23,307 6512.1% 6.9GiB -88.6% -21.6%
static 6800 22,995 6476.0% 7.3GiB -88.7% -14.1%
async-db 1024 100,257 6316.3% 2.9GiB -10.4% -6.5%
Full log
[info] CPU 6499.3% | Mem 7.2GiB

[run 2/3]
Running 5s test @ http://localhost:8080
  64 threads and 4096 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   162.33ms   45.00ms 490.17ms   72.75%
    Req/Sec   368.91    126.40     2.48k    84.84%
  118944 requests in 5.10s, 2.07GB read
Requests/sec:  23307.87
Transfer/sec:    415.39MB
[info] CPU 6512.1% | Mem 6.9GiB

[run 3/3]
Running 5s test @ http://localhost:8080
  64 threads and 4096 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   164.25ms   51.50ms 596.41ms   75.07%
    Req/Sec   364.66    132.38     4.51k    85.48%
  117520 requests in 5.13s, 2.05GB read
Requests/sec:  22916.34
Transfer/sec:    408.36MB
[info] CPU 6492.4% | Mem 7.2GiB

=== Best: 23307 req/s (CPU: 6512.1%, Mem: 6.9GiB) ===
[info] saved results/static/4096/sinatra.json
httparena-bench-sinatra
httparena-bench-sinatra

==============================================
=== sinatra / static / 6800c (tool=wrk) ===
==============================================
[info] waiting for server...
[info] server ready

[run 1/3]
Running 5s test @ http://localhost:8080
  64 threads and 6800 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   282.41ms  136.40ms   1.40s    80.86%
    Req/Sec   335.92    159.88     1.02k    77.49%
  105229 requests in 5.10s, 1.83GB read
Requests/sec:  20629.81
Transfer/sec:    367.48MB
[info] CPU 6449.5% | Mem 7.2GiB

[run 2/3]
Running 5s test @ http://localhost:8080
  64 threads and 6800 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   256.70ms   89.54ms 949.62ms   71.43%
    Req/Sec   365.54    167.00     2.38k    79.67%
  117310 requests in 5.11s, 2.04GB read
Requests/sec:  22969.68
Transfer/sec:    409.44MB
[info] CPU 6517.6% | Mem 6.9GiB

[run 3/3]
Running 5s test @ http://localhost:8080
  64 threads and 6800 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   252.47ms   86.91ms 794.82ms   71.93%
    Req/Sec   365.11    172.59     3.05k    78.32%
  117300 requests in 5.10s, 2.04GB read
Requests/sec:  22995.63
Transfer/sec:    409.88MB
[info] CPU 6476.0% | Mem 7.3GiB

=== Best: 22995 req/s (CPU: 6476.0%, Mem: 7.3GiB) ===
[info] saved results/static/6800/sinatra.json
httparena-bench-sinatra
httparena-bench-sinatra

==============================================
=== sinatra / async-db / 1024c (tool=gcannon) ===
==============================================
[info] waiting for server...
[info] server ready

[run 1/3]
gcannon v0.5.3
  Target:    localhost:8080/
  Threads:   64
  Conns:     1024 (16/thread)
  Pipeline:  1
  Req/conn:  25
  Templates: 5
  Expected:  200
  Duration:  10s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   9.62ms   8.74ms   14.80ms   24.40ms   93.80ms

  997848 requests in 10.00s, 997849 responses
  Throughput: 99.76K req/s
  Bandwidth:  404.98MB/s
  Status codes: 2xx=997849, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 997849 / 997849 responses (100.0%)
  Reconnects: 39419
  Per-template: 199133,199702,199974,199789,199251
  Per-template-ok: 199133,199702,199974,199789,199251
[info] CPU 6249.4% | Mem 3.0GiB

[run 2/3]
gcannon v0.5.3
  Target:    localhost:8080/
  Threads:   64
  Conns:     1024 (16/thread)
  Pipeline:  1
  Req/conn:  25
  Templates: 5
  Expected:  200
  Duration:  10s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   9.46ms   8.89ms   14.70ms   21.30ms   28.90ms

  1002570 requests in 10.00s, 1002573 responses
  Throughput: 100.23K req/s
  Bandwidth:  407.06MB/s
  Status codes: 2xx=1002573, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 1002569 / 1002573 responses (100.0%)
  Reconnects: 39890
  Per-template: 200045,200550,200644,200968,200362
  Per-template-ok: 200045,200550,200644,200968,200362
[info] CPU 6316.3% | Mem 2.9GiB

[run 3/3]
gcannon v0.5.3
  Target:    localhost:8080/
  Threads:   64
  Conns:     1024 (16/thread)
  Pipeline:  1
  Req/conn:  25
  Templates: 5
  Expected:  200
  Duration:  10s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   9.67ms   9.08ms   15.10ms   21.70ms   29.30ms

  984698 requests in 10.00s, 984698 responses
  Throughput: 98.44K req/s
  Bandwidth:  399.75MB/s
  Status codes: 2xx=984698, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 984696 / 984698 responses (100.0%)
  Reconnects: 39169
  Per-template: 196002,197045,197757,197423,196469
  Per-template-ok: 196002,197045,197757,197423,196469
[info] CPU 6369.2% | Mem 2.9GiB

=== Best: 100257 req/s (CPU: 6316.3%, Mem: 2.9GiB) ===
[info] input BW: 6.69MB/s (avg template: 70 bytes)
[info] saved results/async-db/1024/sinatra.json
httparena-bench-sinatra
httparena-bench-sinatra
[info] skip: sinatra does not subscribe to crud
[info] skip: sinatra does not subscribe to baseline-h2
[info] skip: sinatra does not subscribe to static-h2
[info] skip: sinatra does not subscribe to baseline-h2c
[info] skip: sinatra does not subscribe to json-h2c
[info] skip: sinatra does not subscribe to baseline-h3
[info] skip: sinatra does not subscribe to static-h3
[info] skip: sinatra does not subscribe to gateway-64
[info] skip: sinatra does not subscribe to gateway-h3
[info] skip: sinatra does not subscribe to production-stack
[info] skip: sinatra does not subscribe to unary-grpc
[info] skip: sinatra does not subscribe to unary-grpc-tls
[info] skip: sinatra does not subscribe to stream-grpc
[info] skip: sinatra does not subscribe to stream-grpc-tls
[info] skip: sinatra does not subscribe to echo-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/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/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/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 → powersave

Use Puma 8's new 'mark_as_io_bound' option allow more threads on the IO
heavy upload call.
It seems only the baseline call benefits from this.
Reduce default threads to 3.
@p8 p8 force-pushed the sinatra/puma-8-marks-as-io-bound branch from a872a1c to 3955d81 Compare April 30, 2026 18:32
@p8
Copy link
Copy Markdown
Contributor Author

p8 commented Apr 30, 2026

/benchmark -f sinatra

@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: sinatra | Test: all tests

Test Conn RPS CPU Mem Δ RPS Δ Mem
baseline 512 97,599 4586.1% 6.5GiB +22.2% +10.2%
baseline 4096 62,892 3607.1% 4.9GiB +35.1% +6.5%
pipelined 512 432,670 6442.0% 2.1GiB -13.7% +5.0%
pipelined 4096 420,290 6416.2% 2.1GiB -15.6% ~0%
limited-conn 512 38,198 2883.8% 3.5GiB -6.9% -16.7%
limited-conn 4096 39,880 3105.6% 4.3GiB -2.7% -4.4%
json 4096 200,495 6366.8% 4.4GiB -8.4% -18.5%
json-comp 512 118,161 6495.2% 4.2GiB -11.8% -17.6%
json-comp 4096 121,361 6459.6% 4.0GiB -14.2% -21.6%
json-comp 16384 123,668 6514.6% 4.6GiB -11.7% -11.5%
json-tls 4096 180,871 6522.0% 6.2GiB -8.9% -17.3%
upload 32 960 3053.2% 8.6GiB +0.4% -5.5%
upload 256 913 6360.0% 8.2GiB +5.8% -2.4%
api-4 256 16,231 392.1% 434MiB -6.7% +8.8%
api-16 1024 40,906 1692.0% 1.4GiB -6.0% -6.7%
static 1024 23,509 6509.8% 6.8GiB -88.7% -25.3%
static 4096 23,281 6486.5% 7.0GiB -88.6% -20.5%
static 6800 23,123 6525.1% 6.7GiB -88.6% -21.2%
async-db 1024 100,289 6234.3% 3.0GiB -10.3% -3.2%
Full log
[info] CPU 6467.8% | Mem 6.5GiB

[run 2/3]
Running 5s test @ http://localhost:8080
  64 threads and 4096 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   162.83ms   48.48ms 516.78ms   73.61%
    Req/Sec   368.12    124.70     2.52k    84.83%
  118630 requests in 5.10s, 2.07GB read
Requests/sec:  23257.57
Transfer/sec:    414.72MB
[info] CPU 6509.7% | Mem 6.8GiB

[run 3/3]
Running 5s test @ http://localhost:8080
  64 threads and 4096 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   163.60ms   46.75ms 490.16ms   74.48%
    Req/Sec   368.06    108.45     1.44k    83.93%
  118745 requests in 5.10s, 2.07GB read
Requests/sec:  23281.09
Transfer/sec:    415.02MB
[info] CPU 6486.5% | Mem 7.0GiB

=== Best: 23281 req/s (CPU: 6486.5%, Mem: 7.0GiB) ===
[info] saved results/static/4096/sinatra.json
httparena-bench-sinatra
httparena-bench-sinatra

==============================================
=== sinatra / static / 6800c (tool=wrk) ===
==============================================
[info] waiting for server...
[info] server ready

[run 1/3]
Running 5s test @ http://localhost:8080
  64 threads and 6800 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   263.00ms   96.94ms   1.20s    77.59%
    Req/Sec   356.91    157.21     0.97k    77.20%
  111812 requests in 5.13s, 1.95GB read
Requests/sec:  21786.87
Transfer/sec:    388.49MB
[info] CPU 6419.8% | Mem 6.7GiB

[run 2/3]
Running 5s test @ http://localhost:8080
  64 threads and 6800 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   254.85ms   86.42ms 887.88ms   70.76%
    Req/Sec   367.47    158.07     2.26k    79.02%
  117980 requests in 5.10s, 2.05GB read
Requests/sec:  23123.05
Transfer/sec:    412.12MB
[info] CPU 6525.1% | Mem 6.7GiB

[run 3/3]
Running 5s test @ http://localhost:8080
  64 threads and 6800 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   254.32ms   83.77ms 833.81ms   72.37%
    Req/Sec   369.96    173.66     5.35k    79.48%
  118714 requests in 5.16s, 2.07GB read
Requests/sec:  23015.72
Transfer/sec:    410.29MB
[info] CPU 6436.7% | Mem 7.1GiB

=== Best: 23123 req/s (CPU: 6525.1%, Mem: 6.7GiB) ===
[info] saved results/static/6800/sinatra.json
httparena-bench-sinatra
httparena-bench-sinatra

==============================================
=== sinatra / async-db / 1024c (tool=gcannon) ===
==============================================
[info] waiting for server...
[info] server ready

[run 1/3]
gcannon v0.5.3
  Target:    localhost:8080/
  Threads:   64
  Conns:     1024 (16/thread)
  Pipeline:  1
  Req/conn:  25
  Templates: 5
  Expected:  200
  Duration:  10s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   9.56ms   9.24ms   14.20ms   22.10ms   93.20ms

  1002887 requests in 10.00s, 1002891 responses
  Throughput: 100.26K req/s
  Bandwidth:  407.06MB/s
  Status codes: 2xx=1002891, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 1002891 / 1002891 responses (100.0%)
  Reconnects: 39621
  Per-template: 200009,200641,201105,200978,200158
  Per-template-ok: 200009,200641,201105,200978,200158
[info] CPU 6234.3% | Mem 3.0GiB

[run 2/3]
gcannon v0.5.3
  Target:    localhost:8080/
  Threads:   64
  Conns:     1024 (16/thread)
  Pipeline:  1
  Req/conn:  25
  Templates: 5
  Expected:  200
  Duration:  10s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   9.49ms   9.33ms   14.50ms   20.80ms   29.20ms

  1001849 requests in 10.00s, 1001851 responses
  Throughput: 100.16K req/s
  Bandwidth:  406.82MB/s
  Status codes: 2xx=1001851, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 1001846 / 1001851 responses (100.0%)
  Reconnects: 39800
  Per-template: 199728,200123,201061,200817,200116
  Per-template-ok: 199728,200123,201061,200817,200116
[info] CPU 6336.0% | Mem 2.8GiB

[run 3/3]
gcannon v0.5.3
  Target:    localhost:8080/
  Threads:   64
  Conns:     1024 (16/thread)
  Pipeline:  1
  Req/conn:  25
  Templates: 5
  Expected:  200
  Duration:  10s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   9.79ms   9.50ms   15.20ms   21.80ms   30.90ms

  977187 requests in 10.00s, 977186 responses
  Throughput: 97.70K req/s
  Bandwidth:  396.51MB/s
  Status codes: 2xx=977186, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 977185 / 977186 responses (100.0%)
  Reconnects: 38803
  Per-template: 195197,195519,195821,195538,195110
  Per-template-ok: 195197,195519,195821,195538,195110
[info] CPU 6342.6% | Mem 2.9GiB

=== Best: 100289 req/s (CPU: 6234.3%, Mem: 3.0GiB) ===
[info] input BW: 6.70MB/s (avg template: 70 bytes)
[info] saved results/async-db/1024/sinatra.json
httparena-bench-sinatra
httparena-bench-sinatra
[info] skip: sinatra does not subscribe to crud
[info] skip: sinatra does not subscribe to baseline-h2
[info] skip: sinatra does not subscribe to static-h2
[info] skip: sinatra does not subscribe to baseline-h2c
[info] skip: sinatra does not subscribe to json-h2c
[info] skip: sinatra does not subscribe to baseline-h3
[info] skip: sinatra does not subscribe to static-h3
[info] skip: sinatra does not subscribe to gateway-64
[info] skip: sinatra does not subscribe to gateway-h3
[info] skip: sinatra does not subscribe to production-stack
[info] skip: sinatra does not subscribe to unary-grpc
[info] skip: sinatra does not subscribe to unary-grpc-tls
[info] skip: sinatra does not subscribe to stream-grpc
[info] skip: sinatra does not subscribe to stream-grpc-tls
[info] skip: sinatra does not subscribe to echo-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/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/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/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 → powersave

@MDA2AV MDA2AV merged commit 696ac97 into MDA2AV:main May 1, 2026
4 checks passed
@p8 p8 deleted the sinatra/puma-8-marks-as-io-bound branch May 1, 2026 11:55
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