Repository navigation
Add cweb frameworkfeat(frameworks): add cweb (C / io_uring) - #1682
Conversation
519c742 to
ac5892e
Compare
ac5892e to
51ee47e
Compare
|
/benchmark --save |
|
👋 Benchmark request received. A collaborator will review and approve the run. |
Benchmark ResultsFramework:
Composite score, main against this run, in the board's default view:
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 |
|
Hi @MDA2AV — thank you for running the benchmark! Looking at the latency-500k-8cpu log (rate_ratio = 0.9015, p99 = 6.48s), I realized cweb was using sysconf(_SC_NPROCESSORS_ONLN) instead of sched_getaffinity(), which caused it to fork 128 worker processes onto the 8-core cpuset (and 128 workers onto the 64-core cpuset). I just pushed an update that: Uses sched_getaffinity() (CPU_COUNT) so cweb spawns the exact number of workers allowed by the container's --cpuset-cpus mask. Reduces MAX_BUFFER_SIZE to 16 KB to cut container RSS memory. Batches pipelined responses in READ / WS_READ and adds the json-comp profile. Could we please trigger one more benchmark run before merging? Thank you! |
e51385f to
df76c34
Compare
|
/benchmark --save |
|
👋 Benchmark request received. A collaborator will review and approve the run. |
Benchmark ResultsFramework:
Composite score, main against this run, in the board's default view:
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 |
|
Please set the "type" to experimental |
|
The type in meta.json has been updated to experimental |
…pelined responses, add json-comp
c794e72 to
770e779
Compare
|
/benchmark --save |
|
👋 Benchmark request received. A collaborator will review and approve the run. |
Benchmark ResultsFramework:
Composite score, main against this run, in the board's default view:
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 |
Summary
Adds cweb (
type: emerging, Language:C), a zero-copy asynchronous HTTP/1.1 and WebSocket framework built from scratch in C99 on top of Linuxio_uring, pre-forkedSO_REUSEPORTworkers, and non-blockinglibpq.SO_REUSEPORTworker model with independent per-coreio_uringrings (IORING_SETUP_SINGLE_ISSUER | IORING_SETUP_COOP_TASKRUN).calloccontext pool).Transfer-Encoding: chunkeddecoding, RFC 6455 WebSocket frame coalescing, and non-blocking PostgreSQL (libpq+io_uringPOLLIN) state machine.Subscribed Profiles (10)
baseline,pipelined,limited-connzrk):latency-10k,latency-500k-8cpu,latency-1mecho-ws,echo-ws-pipeline,echo-ws-limitedasync-db(PostgreSQLlibpqasync state machine)Local Validation & Benchmark Summary (20-thread host)
./scripts/validate.sh cweb: 33 passed, 0 failed (including all 1,047 TCP fragmentation split offsets, chunked encoding, anti-cheat randomized checks,async-dbschema/empty-range checks, andvalidate-ws.py).benchmark.shhighlights (20 logical cores):baseline(4096c): 1.59M req/spipelined(4096c): 7.01M req/slimited-conn(4096c): 1.11M req/s (553k reconnects / 5s, 0 errors)async-db(1024c): 40.5K req/secho-ws(512c / 4096c / 16384c): 1.98M / 1.86M / 1.26M frames/secho-ws-pipeline(512c / 4096c / 16384c): 10.07M / 9.50M / 7.11M frames/secho-ws-limited(512c / 4096c): 1.12M / 1.13M frames/slatency-10k: p50 27µs | p99 141µs (cpu/req: 16.62µs,rate_ratio: 0.9987)latency-500k-8cpu: p50 63µs | p99 298µs (cpu/req: 6.00µs,rate_ratio: 0.9981)latency-1m: p50 365µs | p99 6.35ms (cpu/req: 6.05µs,rate_ratio: 0.9980)