Skip to content

[rails] Mark async-db calls as IO bound#850

Draft
p8 wants to merge 1 commit into
MDA2AV:mainfrom
p8:rails/mark-async-db-call-as-io-bound
Draft

[rails] Mark async-db calls as IO bound#850
p8 wants to merge 1 commit into
MDA2AV:mainfrom
p8:rails/mark-async-db-call-as-io-bound

Conversation

@p8

@p8 p8 commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@p8

p8 commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

/benchmark -f rails -t async-db

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Benchmark Results

Framework: rails | Test: async-db

Test Conn RPS CPU Mem Δ RPS Δ Mem
async-db 1024 68,058 6121.5% 3.7GiB -7.4% +5.7%
Full log
[info] available CPUs: 128
[info] framework: rails (rails, Ruby)
[info] subscribed tests: baseline,pipelined,limited-conn,json,json-comp,json-tls,upload,api-4,api-16,async-db,crud,static
[info] building image: httparena-rails
#0 building with "default" instance using docker driver

#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 605B done
#1 DONE 0.0s

#2 [internal] load metadata for docker.io/library/ruby:4.0-slim
#2 DONE 0.9s

#3 [internal] load .dockerignore
#3 transferring context: 2B done
#3 DONE 0.0s

#4 [1/7] FROM docker.io/library/ruby:4.0-slim@sha256:86a2ff44ce474c1c9bd11dfb2fd7fe5408a5bfe8236b9bc6013e2c6ef4c02d39
#4 resolve docker.io/library/ruby:4.0-slim@sha256:86a2ff44ce474c1c9bd11dfb2fd7fe5408a5bfe8236b9bc6013e2c6ef4c02d39 0.0s done
#4 DONE 0.0s

#5 [internal] load build context
#5 transferring context: 23.73kB done
#5 DONE 0.1s

#6 [3/7] WORKDIR /app
#6 CACHED

#7 [2/7] RUN apt-get update &&     apt-get install -y --no-install-recommends build-essential libpq-dev libyaml-dev libjemalloc2 libpq5 &&     rm -rf /var/lib/apt/lists/*
#7 CACHED

#8 [6/7] RUN bundle install --jobs=$(nproc)
#8 CACHED

#9 [5/7] RUN bundle config set deployment 'true'
#9 CACHED

#10 [4/7] COPY Gemfile* .
#10 CACHED

#11 [7/7] COPY . .
#11 CACHED

#12 exporting to image
#12 exporting layers done
#12 exporting manifest sha256:92edbc9d190d896b7f0532cea11b2d1108bca71379a53d140780a9d2990d40b4 done
#12 exporting config sha256:6f966b4810b0447869efcfdd01ae1abe1a97807d1fd08d1cbc0bdda69d45e42b done
#12 exporting attestation manifest sha256:b475d112e78f08329d8127d029658d031b2a4e83c407dc2462ccf1e50a217e1a 0.0s done
#12 exporting manifest list sha256:32f7b50ecb9a34ce64fd21bbdf86fe1c29d74ff8fd04944bcb0e843e6eb11488 0.0s done
#12 naming to docker.io/library/httparena-rails:latest
#12 naming to docker.io/library/httparena-rails:latest done
#12 unpacking to docker.io/library/httparena-rails:latest done
#12 DONE 0.1s
[info] tuning host for benchmark runs
[info] CPU governor → performance
[info] setting kernel socket limits
[info] setting UDP buffer sizes for QUIC
[info] setting loopback MTU to 1500 (realistic Ethernet)
[info] restarting docker daemon
[info] dropping kernel caches
[info] starting postgres sidecar
[info] postgres ready (seeded)
[info] starting redis sidecar (cpuset=0,64)
[info] redis ready

==============================================
=== 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   59.02ms   52.80ms   130.40ms   487.10ms   835.20ms

  170497 requests in 10.00s, 170497 responses
  Throughput: 17.05K req/s
  Bandwidth:  63.86MB/s
  Status codes: 2xx=153261, 3xx=0, 4xx=0, 5xx=17236
  Latency samples: 170497 / 170497 responses (100.0%)
  Reconnects: 6405
  Per-template: 33934,34130,34103,34119,34211
  Per-template-ok: 30484,30780,30624,30585,30788

  WARNING: 17236/170497 responses (10.1%) had unexpected status (expected 2xx)
[info] CPU 2756.7% | Mem 3.2GiB

[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.09ms   8.09ms   16.60ms   125.80ms   157.70ms

  690935 requests in 10.00s, 690936 responses
  Throughput: 69.08K req/s
  Bandwidth:  283.12MB/s
  Status codes: 2xx=680582, 3xx=0, 4xx=0, 5xx=10354
  Latency samples: 690936 / 690936 responses (100.0%)
  Reconnects: 27340
  Per-template: 137992,138185,138284,138315,138160
  Per-template-ok: 135990,136011,135983,136302,136296

  WARNING: 10354/690936 responses (1.5%) had unexpected status (expected 2xx)
[info] CPU 6121.5% | Mem 3.7GiB

[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.39ms   8.16ms   17.00ms   130.50ms   171.90ms

  677803 requests in 10.00s, 677803 responses
  Throughput: 67.76K req/s
  Bandwidth:  277.86MB/s
  Status codes: 2xx=667599, 3xx=0, 4xx=0, 5xx=10204
  Latency samples: 677803 / 677803 responses (100.0%)
  Reconnects: 26815
  Per-template: 134961,135579,135826,136000,135437
  Per-template-ok: 132724,133451,133837,134201,133386

  WARNING: 10204/677803 responses (1.5%) had unexpected status (expected 2xx)
[info] CPU 6107.9% | Mem 3.7GiB

=== Best: 68058 req/s (CPU: 6121.5%, Mem: 3.7GiB) ===
[info] input BW: 4.54MB/s (avg template: 70 bytes)
[info] saved results/async-db/1024/rails.json
httparena-bench-rails
httparena-bench-rails
[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/async-db-1024.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/current.json
[info] done
httparena-postgres
httparena-redis
[info] restoring loopback MTU to 65536

@p8 p8 marked this pull request as draft June 10, 2026 13:57
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.

1 participant