Skip to content

Morojs tls 1.8.21 - #1713

Open
M-Chris wants to merge 4 commits into
MDA2AV:mainfrom
M-Chris:morojs-tls-1.8.21
Open

M-Chris wants to merge 4 commits into
MDA2AV:mainfrom
M-Chris:morojs-tls-1.8.21

Conversation

@M-Chris

@M-Chris M-Chris commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Description


PR Commands — comment on this PR to trigger (requires collaborator approval):

Command Description
/benchmark -f <framework> Run every test the framework subscribes to
/benchmark -f <framework> -t <test> Run one test only
/benchmark -f <framework> -t <t1>,<t2>,... Run several tests in one job: one approval, one results commit, untouched tests keep their numbers
/benchmark -f <framework> --save Run and save results (updates the leaderboard on merge)
/benchmark -f <framework> -t <test> --save Run one test and save results
/benchmark -f <framework> --compare <other> Measure the deltas against another framework instead of this one
/benchmark-multiple -f <fw1>,<fw2>,... Benchmark several frameworks in one run — takes -t and --save too; saved results land in a single commit
/benchmark-multiple --save No -f needed: benchmark and save every framework the PR touches
/benchmark-test -t <test> Benchmark all enabled frameworks subscribed to <test> and save the results

For /benchmark, always specify -f <framework>; the flags combine in any order. Results come back as a comment with a per-profile table of RPS, p99, CPU and memory — one table per framework on multi runs. A new benchmark comment while a run is in flight queues behind it (one deep) instead of cancelling it. For multi-framework PRs (dependency bumps, same-language refactors) prefer /benchmark-multiple, which runs everything in a single job and commits all saved results together, so no run overwrites another. --compare works on single-framework runs only.

What the deltas are measured against. By default, this framework's own results published on main - answering "did this change help?". When you are tuning a variant or a successor entry, --compare re-bases them on another entry instead:

/benchmark -f genhttp --compare genhttp-kestrel

The reply states which baseline it used, and profiles the other framework does not run show n/a rather than a delta.


Run benchmarks locally

You can validate and benchmark your framework locally with the lite script — no CPU pinning, fixed connection counts, all load generators run in Docker.

./scripts/validate.sh <framework>
./scripts/benchmark-lite.sh <framework> baseline
./scripts/benchmark-lite.sh --load-threads 4 <framework>

Requirements: Docker Engine on Linux. Load generators (gcannon, h2load, h2load-h3, wrk) are built as self-contained Docker images on first run.

…own BIOs

The three TLS profiles were the entry's whole HTTP/1.1 deficit: json-tls
569 and 8gbit 771 of a thousand against 749 and 869 for the leading
uWebSockets.js entries, with every plaintext profile led or tied.

@morojs/engine 1.1.17 terminates TLS on its own BIOs instead of BIO_s_mem
pairs: the read side is a view over the transport's buffer (one copy in,
where the memory BIO added a second), the write side appends ciphertext
straight into the buffer the transport sends from (the memory BIO grew by
copying, was copied out of, and zeroed its capacity on every reset), and a
body over 8 KiB is encrypted from the caller's bytes rather than copied
behind the head first. The ciphertext scratch is kept between replies, so a
static file's worth of pages is no longer faulted in and zeroed per reply.

MoroJS 1.8.21 revalidates a cached static file once per window instead of
once per request crossing it: at 1024 keep-alive connections the old
behaviour stat'ed the file and both sidecar positions on the threadpool for
every request that crossed the second.

Measured at one worker, same machine, CPU per request from the cgroup:
the static-tls mix 39 us to 28, the json-tls mix 22.5 to 19, the 8gbit
echo 150 to 127; the leading uWebSockets.js entry measures 28-32, 19-20
and 132 on the same rig.

The dependency floor moves to 1.8.21 so a build never measures the older
path by resolving a cached package.
@M-Chris

M-Chris commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

/benchmark -f morojs -t json-tls,8gbit,static-tls --save

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

⚠️ /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.

@M-Chris

M-Chris commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

/benchmark -f morojs -t json-tls,8gbit,static-tls --save

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Benchmark Results

Framework: morojs | Test: json-tls,8gbit,static-tls

Test Conn RPS Rate CPU/req p99 p99.9 CPU Mem Δ RPS Δ Mem
json-tls 4096 1,045,809 — — — — 6580.6% 8.9GiB +12.9% -2.2%
8gbit 512 49,301 0.9860 66.02us 141.0us 7434.0us 298.7% 9.3GiB -0.1% ~0%
static-tls 1024 781,829 — — — — 6533.2% 8.6GiB +114.8% ~0%

Composite score, main against this run, in the board's default view:

Family main this run Δ
HTTP/1.1 6330.7 (8 of 104) 6427.8 (7 of 104) +97.1
HTTP/2 922.4 (17 of 38) 922.4 (17 of 38) +0.0
Gateway 2478.0 (1 of 9) 2478.0 (1 of 9) +0.0
WebSocket 2193.8 (9 of 36) 2193.8 (9 of 36) +0.0

The results on main were measured in another session, so a few points up or down can be the machine and not the change.

Full log
#12 naming to docker.io/library/httparena-morojs:latest
#12 naming to docker.io/library/httparena-morojs:latest done
#12 unpacking to docker.io/library/httparena-morojs:latest done
#12 DONE 0.1s
[info] zrk: docker mode (zrk:local)
[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)

==============================================
=== morojs / json-tls / 4096c (tool=wrk) ===
==============================================
[info] waiting for server...
[info] server ready

[run 1/3]
Running 5s test @ https://localhost:8081
  64 threads and 4096 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     4.33ms    2.60ms  84.96ms   93.29%
    Req/Sec    15.46k     2.63k   33.27k    90.67%
  5029473 requests in 5.10s, 17.00GB read
Requests/sec: 986538.52
Transfer/sec:      3.33GB
[info] CPU 6164.5% | Mem 8.9GiB

[run 2/3]
Running 5s test @ https://localhost:8081
  64 threads and 4096 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     3.89ms    1.02ms  42.10ms   87.10%
    Req/Sec    16.39k     1.79k   33.41k    95.41%
  5333484 requests in 5.10s, 18.03GB read
Requests/sec: 1045809.68
Transfer/sec:      3.53GB
[info] CPU 6580.6% | Mem 8.9GiB

[run 3/3]
Running 5s test @ https://localhost:8081
  64 threads and 4096 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     4.00ms    1.80ms  79.65ms   95.32%
    Req/Sec    16.22k     1.89k   31.59k    95.32%
  5276227 requests in 5.10s, 17.83GB read
Requests/sec: 1034716.22
Transfer/sec:      3.50GB
[info] CPU 6351.6% | Mem 8.8GiB

=== Best: 1045809 req/s (CPU: 6580.6%, Mem: 8.9GiB) ===
[info] saved results/json-tls/4096/morojs.json
httparena-bench-morojs
httparena-bench-morojs

==============================================
=== morojs / 8gbit / 512c (tool=zrk) ===
==============================================
[info] waiting for server...
[info] server ready

[run 1/3]
{
  "zrk_version": "2.3.0",
  "target": { "url": "https://localhost:8081/echo", "method": "POST" },
  "config": { "connections": 512, "launched": 512, "duration_s": 5.000, "closed": false, "target_rate": 50000, "timeout_ms": 2000, "deadline_ms": 0, "deadline_abort": false, "record_timeouts": true },
  "duration_s": 5.002,
  "requests": 246043,
  "bytes": 2548759437,
  "achieved_rate": 49191.01,
  "target_rate": 50000,
  "target_rate_end": 50000,
  "rate_ratio": 0.9838,
  "bytes_per_sec": 509569638.90,
  "error_rate": 0.000000,
  "max_schedule_lag_us": 21521,
  "latency_us": {
    "min": 60, "mean": 124.2, "stdev": 531.4, "max": 31775,
    "p50": 99, "p75": 112, "p90": 128, "p99": 186, "p99_9": 9532, "p99_99": 19944
  },
  "status_codes": { "1xx": 0, "2xx": 246043, "3xx": 0, "4xx": 0, "5xx": 0 },
  "errors": { "connect": 0, "read": 0, "write": 0, "timeout": 0, "deadline": 0, "non_2xx_3xx": 0 },
  "latency_histogram": "HISTFAAABGV4nDVUT2gcZRSfefO+b2ZnMzvZ3e5Oks022cQ0rTYmWdOGaJtUquKCqbFiKkW0KRq8VPDkRUSkYNBQoS0SSpESQhERDyVIKCGHkkNByKEUEQkSagkacuhBSgke/L036ybfzPve39/7N50XrxQdx/7ipD+v+Xb1cuVLZ+JR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p1PCq60VQOkGUSandFhECqrQxqrS4nwgkQgGgOAEuVZuu8wV/CqkYZKZAV0gXUPNIsqpdOOsaasrGGsiwkeA02JPNv8ejg6RpEUg///AvjaBKfJq2kVdLWd5sy1c7pwurM6uV7aOj/F2tw+8ZRJYRktichiNNEI3IjTXuXTQjqcT78Y+Db4nDZQeoG9g4QbuGa0OjUFYHSrZQAvYB4HdJzHkPaYfmSkdzFaXqJhzmjjv3FlUL4m+pPoP9TjoX0="
}
[info] CPU 409.0% | Mem 9.4GiB

[run 2/3]
{
  "zrk_version": "2.3.0",
  "target": { "url": "https://localhost:8081/echo", "method": "POST" },
  "config": { "connections": 512, "launched": 512, "duration_s": 5.000, "closed": false, "target_rate": 50000, "timeout_ms": 2000, "deadline_ms": 0, "deadline_abort": false, "record_timeouts": true },
  "duration_s": 5.001,
  "requests": 246633,
  "bytes": 2554871247,
  "achieved_rate": 49312.09,
  "target_rate": 50000,
  "target_rate_end": 50000,
  "rate_ratio": 0.9862,
  "bytes_per_sec": 510823925.05,
  "error_rate": 0.000000,
  "max_schedule_lag_us": 24735,
  "latency_us": {
    "min": 58, "mean": 114.3, "stdev": 562.0, "max": 34975,
    "p50": 91, "p75": 101, "p90": 113, "p99": 145, "p99_9": 8908, "p99_99": 23544
  },
  "status_codes": { "1xx": 0, "2xx": 246633, "3xx": 0, "4xx": 0, "5xx": 0 },
  "errors": { "connect": 0, "read": 0, "write": 0, "timeout": 0, "deadline": 0, "non_2xx_3xx": 0 },
  "latency_histogram": "HISTFAAAA714nC1US2gUaRD+//qru9Mz0850OpPJkInjOIkmRtEgMT6yK/jY9aCHXFwUTJYVxQd40JuwsKgkICHIBlYQUfAgEoKERcRDEJF42CEsrHiS4CEHCeJBFvGQk19V9/wzPdX1/Oqr6q7dmk2M8f4z6cdl/1ZvZqfMwS+p4hoxl/YcvzJn1+wKfXN3vJZ/K7dSWq19GPr48+T4/LV3N+z0lF2esp9u2oXrN66unF+YWBj/fGrx1Nz47XMPLjy6/Pni20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target": { "url": "https://localhost:8081/echo", "method": "POST" },
  "config": { "connections": 512, "launched": 512, "duration_s": 5.000, "closed": false, "target_rate": 50000, "timeout_ms": 2000, "deadline_ms": 0, "deadline_abort": false, "record_timeouts": true },
  "duration_s": 5.002,
  "requests": 246579,
  "bytes": 2554311861,
  "achieved_rate": 49300.85,
  "target_rate": 50000,
  "target_rate_end": 50000,
  "rate_ratio": 0.9860,
  "bytes_per_sec": 510707544.98,
  "error_rate": 0.000000,
  "max_schedule_lag_us": 17492,
  "latency_us": {
    "min": 53, "mean": 110.8, "stdev": 548.4, "max": 27743,
    "p50": 89, "p75": 99, "p90": 110, "p99": 141, "p99_9": 7434, "p99_99": 21912
  },
  "status_codes": { "1xx": 0, "2xx": 246579, "3xx": 0, "4xx": 0, "5xx": 0 },
  "errors": { "connect": 0, "read": 0, "write": 0, "timeout": 0, "deadline": 0, "non_2xx_3xx": 0 },
  "latency_histogram": "HISTFAAAA4B4nC1TTWhcVRR+97v3vXdnXl4mMy9jfZ1Mk+lkmOgUk1KG0IQ2xBp/F1bcKIiltRKM4kL8WxQsrcRasihN2k2ruHAVxUWRIBWykCJFSpGusigllFAkuOiilCxc+J0zzU3yzj3nO+c7f3fo6+UsCNzjoPdjn3yNXpa/CWYe9hQfAA7wvrhn6strZsf8g017xy1FK3472cn+bKxO/nH06sK1s+bmstm4apaumPXLZvtbs3Lqr09+nX94fOvdX46tn9h678LCvY/WP77+4cr85vHNt84dPf3qxpE7s4+mbh38t3t/4sH4mX0/tjdH7++9Pfx9fbV29+l71fPVjcqD8lppJ11P1pLTxf/8bf843opuRufCi+Et97O7a2/YRfuD/Rs3cB6LeGS2zW88S2bNrJpF8+k7C6c+P3ny5RMvTj0/9sLExHOH9+0de3Z0dM9IZWSs8tTYwNDI7qHBwUploBgN9vX7Sr/3vr/Y74ve91FCFFEqwvnIe+eLfcUIA4gQ8MgvGxM4XlwIWBcjdKK1rgBqbQ8UuB4+pQGxcwh55GqBmP/K9LLIqSoRm+INFMTUogEJpRb4k9KnioYjUQ0ZmdChs8RJNF5Kp5DgjF/RNyinPE1IHrEwDSuUYg05aVwNjBdTGeB1kuaujjm0UaAt0HRSgptMKsMhOmZkbGAX765ERZnifqUVKKNM4oCwxNTXCCeuQ+Yar4c0rxy/GyIzXDK01RirzNK+wjimaX+F/pJcSksTRFmC5iBtsOQYR50BcrpIMSVqpgmM+Q1Yl3SvgMRJKbH+hcS0mV+iWX6GLu1VSl38ZDBM4JxMx0mdlpDvDK1XDKTlZAq1lcIjCSVkaDGpBk8JBIZ4hmb23B0hCQ5iFzsi45ml+oDM621C23TLmEyBTsP0iHUXcIzXMmPupzFmGgleo19O7y+oIX+TJyNtzl1pschA+5LI2Eo62JgSgTVdjjLeZ+xZKtk/TrMuPCmz6MA1SdKC6DqK1W5Z3TNCJnV7cu5wVYfZ1qKrlIQ9wwzhNJfEMVShq+saa00FRk3o12EeFi9JW6qaf8CvsEDKjbXLfBRWg1PP1pd0CwKdJSkcX5fEs04AvYciFefsQ+oKXPjCkxcTw9W99oNqjVx2AR+cs3yGtJZ1ZPrieIkYW7fIarpWV3Ra5xnqnspc5/EmhGAGvUfcVXo+BvwPYZGIuA=="
}
[info] CPU 298.7% | Mem 9.3GiB
[info] run 3 wins on score

=== Best: 49301 req/s (CPU: 298.7%, Mem: 9.3GiB) ===
[info] exact CPU: 16.28 core-seconds | 66.016 us/req
=== Fixed-rate: cpu/req 66.02us | p99 141.0us | p99.9 7434.0us | rate_ratio 0.9860 ===
[info] input BW: 481.46MB/s (100 KB body x 49301 rps)
[info] saved results/8gbit/512/morojs.json
httparena-bench-morojs
httparena-bench-morojs

==============================================
=== morojs / static-tls / 1024c (tool=wrk) ===
==============================================
[info] waiting for server...
[info] server ready

[run 1/3]
Running 5s test @ https://localhost:8081
  64 threads and 1024 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     3.99ms   13.76ms 194.31ms   95.79%
    Req/Sec    11.40k     2.53k   22.15k    90.49%
  3699493 requests in 5.10s, 56.99GB read
Requests/sec: 725426.34
Transfer/sec:     11.17GB
[info] CPU 6259.1% | Mem 8.6GiB

[run 2/3]
Running 5s test @ https://localhost:8081
  64 threads and 1024 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     1.31ms  629.65us  18.52ms   81.23%
    Req/Sec    12.29k     1.14k   25.10k    72.30%
  3986968 requests in 5.10s, 61.42GB read
Requests/sec: 781829.87
Transfer/sec:     12.04GB
[info] CPU 6533.2% | Mem 8.6GiB

[run 3/3]
Running 5s test @ https://localhost:8081
  64 threads and 1024 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     1.31ms  639.61us  20.84ms   80.18%
    Req/Sec    12.27k     1.35k   22.83k    72.94%
  3979656 requests in 5.10s, 61.30GB read
Requests/sec: 780423.71
Transfer/sec:     12.02GB
[info] CPU 6496.2% | Mem 8.6GiB

=== Best: 781829 req/s (CPU: 6533.2%, Mem: 8.6GiB) ===
[info] saved results/static-tls/1024/morojs.json
httparena-bench-morojs
httparena-bench-morojs
[info] rebuilding site/data/*.json
[purged stale] pyronova.json (pyronova)
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/frameworks.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/results/morojs.json - 3 new, 37 total
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/current.json
[info] done
httparena-postgres
[info] restoring loopback MTU to 65536

This branch has not been deployed

No deployments
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