Skip to content

[rails] Let Rails enable YJIT#704

Merged
MDA2AV merged 2 commits into
MDA2AV:mainfrom
p8:rails/delay-yjit
May 12, 2026
Merged

[rails] Let Rails enable YJIT#704
MDA2AV merged 2 commits into
MDA2AV:mainfrom
p8:rails/delay-yjit

Conversation

@p8
Copy link
Copy Markdown
Contributor

@p8 p8 commented May 12, 2026

This makes sure no methods get jitted that are only used for startup.

This makes sure no methods get jitted that are only used for startup.
@p8
Copy link
Copy Markdown
Contributor Author

p8 commented May 12, 2026

/benchmark -f rails

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

Test Conn RPS CPU Mem Δ RPS Δ Mem
baseline 512 78,626 5594.0% 6.6GiB +31.8% +1.5%
baseline 4096 34,495 5081.8% 6.6GiB +10.6% +6.5%
pipelined 512 309,711 6465.2% 2.2GiB -1.6% -12.0%
pipelined 4096 301,536 6508.8% 2.2GiB -3.9% -15.4%
limited-conn 512 27,753 4578.1% 5.0GiB ~0% -16.7%
limited-conn 4096 27,688 4685.5% 5.6GiB ~0% -8.2%
json 4096 119,450 6394.9% 3.6GiB -2.6% -18.2%
json-comp 512 78,613 6400.5% 3.1GiB -7.1% -22.5%
json-comp 4096 82,045 6382.3% 4.4GiB -2.5% +7.3%
json-comp 16384 82,540 6255.9% 4.2GiB -0.2% -2.3%
json-tls 4096 111,256 6452.0% 4.3GiB -5.2% -20.4%
upload 32 937 2999.4% 11.2GiB +0.4% +2.8%
upload 256 905 6321.2% 8.5GiB +0.9% +18.1%
api-4 256 9,946 393.8% 314MiB -2.0% -17.6%
api-16 1024 24,409 1739.9% 907MiB -5.9% -19.5%
static 1024 125,568 6513.9% 6.1GiB +5.4% -14.1%
static 4096 119,296 6487.5% 5.9GiB -0.6% -34.4%
static 6800 121,783 6452.7% 5.9GiB ~0% -37.2%
async-db 1024 68,404 6391.5% 2.9GiB +0.5% -3.3%
Full log
[run 2/3]
Running 5s test @ http://localhost:8080
  64 threads and 4096 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    32.86ms    9.55ms 274.85ms   84.11%
    Req/Sec     1.87k   455.46     8.39k    83.06%
  607867 requests in 5.10s, 9.32GB read
Requests/sec: 119102.03
Transfer/sec:      1.83GB
[info] CPU 6498.1% | Mem 5.9GiB

[run 3/3]
Running 5s test @ http://localhost:8080
  64 threads and 4096 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    32.61ms    9.32ms 251.66ms   82.41%
    Req/Sec     1.88k   479.77    10.76k    80.56%
  608494 requests in 5.10s, 9.33GB read
Requests/sec: 119296.90
Transfer/sec:      1.83GB
[info] CPU 6487.5% | Mem 5.9GiB

=== Best: 119296 req/s (CPU: 6487.5%, Mem: 5.9GiB) ===
[info] saved results/static/4096/rails.json
httparena-bench-rails
httparena-bench-rails

==============================================
=== rails / 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    52.94ms   27.42ms 560.71ms   88.28%
    Req/Sec     1.77k   819.25     4.84k    77.49%
  566636 requests in 5.12s, 8.69GB read
Requests/sec: 110650.20
Transfer/sec:      1.70GB
[info] CPU 6415.8% | Mem 6.1GiB

[run 2/3]
Running 5s test @ http://localhost:8080
  64 threads and 6800 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    50.73ms   18.41ms 348.09ms   83.99%
    Req/Sec     1.92k   721.07    10.88k    80.25%
  620698 requests in 5.10s, 9.52GB read
Requests/sec: 121700.50
Transfer/sec:      1.87GB
[info] CPU 6533.7% | Mem 5.9GiB

[run 3/3]
Running 5s test @ http://localhost:8080
  64 threads and 6800 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    50.88ms   19.37ms 391.64ms   84.90%
    Req/Sec     1.92k   709.22     9.76k    80.33%
  621171 requests in 5.10s, 9.53GB read
Requests/sec: 121783.26
Transfer/sec:      1.87GB
[info] CPU 6452.7% | Mem 5.9GiB

=== Best: 121783 req/s (CPU: 6452.7%, Mem: 5.9GiB) ===
[info] saved results/static/6800/rails.json
httparena-bench-rails
httparena-bench-rails

==============================================
=== rails / 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   14.88ms   14.00ms   21.80ms   34.40ms   212.30ms

  665217 requests in 10.00s, 665217 responses
  Throughput: 66.50K req/s
  Bandwidth:  277.27MB/s
  Status codes: 2xx=665217, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 665217 / 665217 responses (100.0%)
  Reconnects: 26115
  Per-template: 132816,133172,133403,133214,132612
  Per-template-ok: 132816,133172,133403,133214,132612
[info] CPU 6317.8% | Mem 2.8GiB

[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   14.34ms   14.20ms   21.10ms   29.90ms   57.50ms

  684048 requests in 10.00s, 684048 responses
  Throughput: 68.39K req/s
  Bandwidth:  285.35MB/s
  Status codes: 2xx=684048, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 684048 / 684048 responses (100.0%)
  Reconnects: 27059
  Per-template: 136379,136757,137241,137159,136512
  Per-template-ok: 136379,136757,137241,137159,136512
[info] CPU 6391.5% | 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   14.34ms   14.20ms   21.60ms   30.10ms   52.00ms

  679145 requests in 10.00s, 679148 responses
  Throughput: 67.90K req/s
  Bandwidth:  283.51MB/s
  Status codes: 2xx=679148, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 679148 / 679148 responses (100.0%)
  Reconnects: 26874
  Per-template: 135260,135618,136167,136397,135706
  Per-template-ok: 135260,135618,136167,136397,135706
[info] CPU 6406.5% | Mem 2.9GiB

=== Best: 68404 req/s (CPU: 6391.5%, Mem: 2.9GiB) ===
[info] input BW: 4.57MB/s (avg template: 70 bytes)
[info] saved results/async-db/1024/rails.json
httparena-bench-rails
httparena-bench-rails
[info] skip: rails does not subscribe to crud
[info] skip: rails does not subscribe to fortunes
[info] skip: rails does not subscribe to baseline-h2
[info] skip: rails does not subscribe to static-h2
[info] skip: rails does not subscribe to baseline-h2c
[info] skip: rails does not subscribe to json-h2c
[info] skip: rails does not subscribe to baseline-h3
[info] skip: rails does not subscribe to static-h3
[info] skip: rails does not subscribe to gateway-64
[info] skip: rails does not subscribe to gateway-h3
[info] skip: rails does not subscribe to production-stack
[info] skip: rails does not subscribe to unary-grpc
[info] skip: rails does not subscribe to unary-grpc-tls
[info] skip: rails does not subscribe to stream-grpc
[info] skip: rails does not subscribe to stream-grpc-tls
[info] skip: rails does not subscribe to echo-ws
[info] skip: rails does not subscribe to echo-ws-pipeline
[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 May 12, 2026

/benchmark -f rails --save

@github-actions
Copy link
Copy Markdown
Contributor

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

@github-actions
Copy link
Copy Markdown
Contributor

Benchmark Results

Framework: rails | Test: all tests

Test Conn RPS CPU Mem Δ RPS Δ Mem
baseline 512 77,800 5704.5% 6.8GiB +30.4% +4.6%
baseline 4096 34,370 4988.7% 6.5GiB +10.2% +4.8%
pipelined 512 304,348 6489.6% 2.2GiB -3.3% -12.0%
pipelined 4096 286,715 6366.0% 2.3GiB -8.6% -11.5%
limited-conn 512 27,507 4585.2% 5.0GiB -0.9% -16.7%
limited-conn 4096 27,361 4699.5% 5.7GiB -1.2% -6.6%
json 4096 121,954 6386.9% 3.7GiB -0.6% -15.9%
json-comp 512 81,405 6484.1% 3.0GiB -3.8% -25.0%
json-comp 4096 80,772 6387.8% 3.9GiB -4.0% -4.9%
json-comp 16384 84,182 6497.3% 5.0GiB +1.8% +16.3%
json-tls 4096 110,489 6468.5% 4.1GiB -5.9% -24.1%
upload 32 938 3062.7% 10.9GiB +0.5% ~0%
upload 256 888 6333.8% 8.4GiB -1.0% +16.7%
api-4 256 9,791 393.4% 309MiB -3.5% -18.9%
api-16 1024 24,502 1732.7% 911MiB -5.6% -19.1%
static 1024 125,531 6526.3% 6.0GiB +5.3% -15.5%
static 4096 121,768 6516.3% 5.9GiB +1.5% -34.4%
static 6800 119,299 6509.8% 5.9GiB -2.0% -37.2%
async-db 1024 68,747 6394.8% 2.8GiB +1.0% -6.7%
Full log
[run 2/3]
Running 5s test @ http://localhost:8080
  64 threads and 4096 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    32.07ms    8.86ms 270.74ms   82.32%
    Req/Sec     1.92k   467.06     7.90k    82.56%
  621032 requests in 5.10s, 9.52GB read
Requests/sec: 121768.31
Transfer/sec:      1.87GB
[info] CPU 6516.3% | Mem 5.9GiB

[run 3/3]
Running 5s test @ http://localhost:8080
  64 threads and 4096 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    32.89ms    9.73ms 278.55ms   84.11%
    Req/Sec     1.87k   483.89    10.52k    86.67%
  605595 requests in 5.10s, 9.29GB read
Requests/sec: 118740.30
Transfer/sec:      1.82GB
[info] CPU 6479.1% | Mem 5.9GiB

=== Best: 121768 req/s (CPU: 6516.3%, Mem: 5.9GiB) ===
[info] saved results/static/4096/rails.json
httparena-bench-rails
httparena-bench-rails

==============================================
=== rails / 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    55.21ms   31.03ms 551.45ms   87.59%
    Req/Sec     1.76k   793.65     4.96k    79.76%
  561276 requests in 5.10s, 8.61GB read
Requests/sec: 109989.68
Transfer/sec:      1.69GB
[info] CPU 6383.5% | Mem 6.0GiB

[run 2/3]
Running 5s test @ http://localhost:8080
  64 threads and 6800 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    52.09ms   19.72ms 480.26ms   85.36%
    Req/Sec     1.88k   657.77     8.21k    80.53%
  608755 requests in 5.10s, 9.33GB read
Requests/sec: 119299.07
Transfer/sec:      1.83GB
[info] CPU 6509.8% | Mem 5.9GiB

[run 3/3]
Running 5s test @ http://localhost:8080
  64 threads and 6800 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    55.01ms   37.08ms 596.08ms   96.26%
    Req/Sec     1.86k   685.88     8.68k    78.81%
  602018 requests in 5.10s, 9.23GB read
Requests/sec: 117938.50
Transfer/sec:      1.81GB
[info] CPU 6424.9% | Mem 5.9GiB

=== Best: 119299 req/s (CPU: 6509.8%, Mem: 5.9GiB) ===
[info] saved results/static/6800/rails.json
httparena-bench-rails
httparena-bench-rails

==============================================
=== rails / 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   14.65ms   13.90ms   21.80ms   34.90ms   204.90ms

  666090 requests in 10.00s, 666090 responses
  Throughput: 66.58K req/s
  Bandwidth:  277.66MB/s
  Status codes: 2xx=666090, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 666090 / 666090 responses (100.0%)
  Reconnects: 26163
  Per-template: 132636,133361,134047,133398,132648
  Per-template-ok: 132636,133361,134047,133398,132648
[info] CPU 6288.2% | Mem 2.8GiB

[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   14.28ms   14.00ms   21.50ms   31.20ms   50.60ms

  687478 requests in 10.00s, 687479 responses
  Throughput: 68.72K req/s
  Bandwidth:  286.57MB/s
  Status codes: 2xx=687479, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 687479 / 687479 responses (100.0%)
  Reconnects: 27192
  Per-template: 137284,137664,137792,137439,137300
  Per-template-ok: 137284,137664,137792,137439,137300
[info] CPU 6394.8% | 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   14.21ms   14.00ms   21.60ms   30.20ms   42.70ms

  686546 requests in 10.00s, 686548 responses
  Throughput: 68.62K req/s
  Bandwidth:  286.38MB/s
  Status codes: 2xx=686548, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 686546 / 686548 responses (100.0%)
  Reconnects: 27188
  Per-template: 136784,137449,137600,137529,137184
  Per-template-ok: 136784,137449,137600,137529,137184
[info] CPU 6422.9% | Mem 2.9GiB

=== Best: 68747 req/s (CPU: 6394.8%, Mem: 2.8GiB) ===
[info] input BW: 4.59MB/s (avg template: 70 bytes)
[info] saved results/async-db/1024/rails.json
httparena-bench-rails
httparena-bench-rails
[info] skip: rails does not subscribe to crud
[info] skip: rails does not subscribe to fortunes
[info] skip: rails does not subscribe to baseline-h2
[info] skip: rails does not subscribe to static-h2
[info] skip: rails does not subscribe to baseline-h2c
[info] skip: rails does not subscribe to json-h2c
[info] skip: rails does not subscribe to baseline-h3
[info] skip: rails does not subscribe to static-h3
[info] skip: rails does not subscribe to gateway-64
[info] skip: rails does not subscribe to gateway-h3
[info] skip: rails does not subscribe to production-stack
[info] skip: rails does not subscribe to unary-grpc
[info] skip: rails does not subscribe to unary-grpc-tls
[info] skip: rails does not subscribe to stream-grpc
[info] skip: rails does not subscribe to stream-grpc-tls
[info] skip: rails does not subscribe to echo-ws
[info] skip: rails does not subscribe to echo-ws-pipeline
[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 c5410c0 into MDA2AV:main May 12, 2026
@p8 p8 deleted the rails/delay-yjit branch May 13, 2026 13:41
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