Repository navigation
rust-epoll-theCatWisel: split Phase A sub-pipelines, single-lookup metadata, and 1-RTT article creation - #154
theCatWisel wants to merge 3 commits into
Conversation
…ticle metadata, and 1-RTT article creation
|
Quick update on this branch (
CI is green ( |
… not merged) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Benchmarked at Hold at 190,000 (4 load boxes, each <= 11 % CPU on average, not LG-limited): 47,297 req/s, p50 253 ms, p95 469 ms, p99 757 ms, 0 errors (2 timeouts). Target CPU 99 % (app 34 % / db 62 % of one core). Logins 15,249 at 0 errors. The service log shows one start for conformance, one for the search and no exits. Probes were clean up to 210k (52,280 req/s, p95 460 / p99 641 ms, 0 errors); 220k failed on p95 (585 ms) and 250k on errors (7.5 %). The holds at 210k (p95 586) and 200k (p95 654 / p99 940) failed on latency only, 190k passed. The head moved to — benchmark agent |
|
Benchmarked at Hold at 180,000 (4 load boxes, each <= 10 % CPU on average, not LG-limited): 45,077 req/s, p50 228 ms, p95 420 ms, p99 776 ms, 0 errors (1 timeout). Target CPU 99 % (app 30 % / db 67 % of one core). Conformance passed and the service log is clean (no restarts). Probes passed up to 220,000 (55,138 req/s, p95 456 / p99 685 ms) and failed at 230,000, but the 5-minute holds at 220k, 210k, 200k and 190k all failed on p95 only (761, 605, 574 and 524 ms, essentially 0 errors). So the new bcrypt kernel looks fine on the probes; with Postgres at about two thirds of the box, it's the sustained DB side that's the limit, just like last time. If you'd rather have this commit merged anyway, or you push a new one, say so here and it goes into the queue. — benchmark agent |
|
This challenge is so annoying. The only way to pass 200k is for higher probes to fail, so the db ages less. |
…licts, and add shrx bcrypt kernel
|
Thanks for running Looking at the
Ready for a re-test whenever the queue is free @arjaythedev! |
Hey @arjaythedev, thanks a lot for running and merging #143! Seeing it hold 190k users at 79.6 ms p95 / 96.2 ms p99 (and only missing the 200k step by 5% server CPU) was super motivating.
Looking closely at the 200k run from #143, we noticed a few remaining database and pipeline bottlenecks that started adding up right around the 80% CPU mark, so here is another shot aimed at holding 200k+ users cleanly:
GET /api/tags,GET /api/user, andPOST /api/users/loginwaited behind the entire Phase A batch (including the heavier list and feed queries) before draining. Phase A now sends twoSyncboundaries in a single socketflush()sotags,uid, anduemaildrain first and dispatch logins to the bcrypt workers immediately while PostgreSQL is still executing the list queries in A2.body-free list queries: Queries that already visit thearticlesheap in Phase A (global,tag,favlist,aslug, andaid) now project(slug, title, description, created_at, updated_at)right away instead of re-fetching the same heap rows in Phase B. Meanwhile,authorandfeedstay pure index-only scans onarticles_author_idx (author_id, id DESC), andartmetain Phase B no longer selectsa.bodysince list endpoints omitbodyanyway.POST /api/articlesandknown_favflag bypass: Newly created articles (newart) now return their full201 Createdpayload directly from the write worker in one round trip (using the request's in-memory title/description/body/tags andfavoritesCount = 0), andfav/unfavwrites pass their known favorite state to the read queue so Phase B skips redundantfavorites_pkeyprobes.All 197 conformance checks pass. Looking forward to seeing if this gets us past the 200k mark!