Rust LMS: rework connection handling and batch fresh reads #9

Merged
pxc1984 merged 15 commits from happyqt/posvyat-challenge:spectral-lms-submission into master 2026-11-07 22:12:56 +00:00
Contributor

Rework the request path from the verified 47,000-user baseline: deadline-driven connection checks, allocation-free route matching, inline resource permits and a smaller per-request future. Batch compatible fresh reads with independent authorization checks and bounded PostgreSQL planner estimates. Resource and database connection limits remain unchanged.

Validation: clean Ubuntu build, 137/137 API checks, 14 concurrency and file scenarios, three batching/ACL scenarios and database fault recovery. At 8,000 idle sockets the network changes reduced anonymous memory from 126.4 to 113.3 MiB. In one local 40,000-user comparison, p95 was 899 ms versus 940 ms for the baseline, and peak anonymous memory was 182.6 versus 206.3 MiB; both failed the 500 ms threshold. Following a 48,000-user overload, the five-minute 32,000-user hold failed at p95 616 ms, p99 855 ms, with 203.3 MiB peak anonymous memory. These local measurements are not an official score and do not establish a throughput improvement. The separate cold TLS layout previously produced an official zero; its effect in this combination is unknown.

See VALIDATION.md for methodology and limitations. Only the Rust submission changes; competition tests, workload, schema and seed are untouched.

Rework the request path from the verified 47,000-user baseline: deadline-driven connection checks, allocation-free route matching, inline resource permits and a smaller per-request future. Batch compatible fresh reads with independent authorization checks and bounded PostgreSQL planner estimates. Resource and database connection limits remain unchanged. Validation: clean Ubuntu build, 137/137 API checks, 14 concurrency and file scenarios, three batching/ACL scenarios and database fault recovery. At 8,000 idle sockets the network changes reduced anonymous memory from 126.4 to 113.3 MiB. In one local 40,000-user comparison, p95 was 899 ms versus 940 ms for the baseline, and peak anonymous memory was 182.6 versus 206.3 MiB; both failed the 500 ms threshold. Following a 48,000-user overload, the five-minute 32,000-user hold failed at p95 616 ms, p99 855 ms, with 203.3 MiB peak anonymous memory. These local measurements are not an official score and do not establish a throughput improvement. The separate cold TLS layout previously produced an official zero; its effect in this combination is unknown. See VALIDATION.md for methodology and limitations. Only the Rust submission changes; competition tests, workload, schema and seed are untouched.
Add Go LMS submission with batched PostgreSQL reads
All checks were successful
challenge / find (pull_request_target) Successful in 3s
challenge / run (submissions/go-nethttp-spectral) (pull_request_target) Successful in 7m16s
7bf92ad1cb
Owner

llm/llm-assisted/organic(human)?

llm/llm-assisted/organic(human)?
Author
Contributor

@xfx1337 wrote in #9 (comment):

llm 500%

@xfx1337 wrote in https://git.cu3rd.ru/cu3rd/posvyat-challenge/pulls/9#issuecomment-312: > llm 500%
Avoid repeated JSON parsing and improve PostgreSQL read batching
Some checks failed
challenge / find (pull_request_target) Has been cancelled
4e6352fc3b
pxc1984 force-pushed spectral-lms-submission from 4e6352fc3b
Some checks failed
challenge / find (pull_request_target) Has been cancelled
to 15b9041cf2
Some checks failed
challenge / find (pull_request_target) Failing after 2s
2026-10-29 21:43:00 +00:00
Compare
Remove upload admission bottleneck and publish completed reads immediately
Some checks failed
challenge / find (pull_request_target) Has been cancelled
c08e301e7d
pxc1984 force-pushed spectral-lms-submission from c08e301e7d
Some checks failed
challenge / find (pull_request_target) Has been cancelled
to 4e0d3a9fb5
Some checks failed
challenge / find (pull_request_target) Has been cancelled
2026-10-29 22:37:59 +00:00
Compare
pxc1984 force-pushed spectral-lms-submission from 4e0d3a9fb5
Some checks failed
challenge / find (pull_request_target) Has been cancelled
to 455a5ad622
All checks were successful
challenge / find (pull_request_target) Successful in 3s
challenge / run (submissions/go-nethttp-spectral) (pull_request_target) Successful in 6m22s
2026-10-29 23:08:22 +00:00
Compare
pxc1984 force-pushed spectral-lms-submission from 455a5ad622
All checks were successful
challenge / find (pull_request_target) Successful in 3s
challenge / run (submissions/go-nethttp-spectral) (pull_request_target) Successful in 6m22s
to 3a20d26861
All checks were successful
challenge / find (pull_request_target) Successful in 13s
challenge / run (submissions/go-nethttp-spectral) (pull_request_target) Successful in 30m42s
2026-10-29 23:53:38 +00:00
Compare
Increase read concurrency and shorten batches for slower database links
All checks were successful
challenge / find (pull_request_target) Successful in 3s
challenge / run (submissions/go-nethttp-spectral) (pull_request_target) Successful in 25m44s
b2ba9d7030
Reduce HTTP parsing allocations and reuse HMAC contexts
All checks were successful
challenge / find (pull_request_target) Successful in 3s
challenge / run (submissions/go-nethttp-spectral) (pull_request_target) Successful in 41m51s
17327b67e8
Remove response caches and retain HTTP/JWT parsing optimizations
Some checks failed
challenge / find (pull_request_target) Successful in 11s
challenge / run (submissions/go-nethttp-spectral) (pull_request_target) Has been cancelled
633a0794a3
pxc1984 force-pushed spectral-lms-submission from 633a0794a3
Some checks failed
challenge / find (pull_request_target) Successful in 11s
challenge / run (submissions/go-nethttp-spectral) (pull_request_target) Has been cancelled
to 51f2c327d3
All checks were successful
challenge / find (pull_request_target) Successful in 4s
challenge / run (submissions/go-nethttp-spectral) (pull_request_target) Successful in 1h1m3s
2026-10-30 07:55:27 +00:00
Compare
Restore exact previously successful LMS submission
All checks were successful
challenge / find (pull_request_target) Successful in 12s
challenge / run (submissions/go-nethttp-spectral) (pull_request_target) Successful in 23m36s
6e930d19ed
Resubmit exact version that scored 16000 users
All checks were successful
challenge / find (pull_request_target) Successful in 4s
challenge / run (submissions/go-nethttp-spectral) (pull_request_target) Successful in 9m2s
d512d6d21d
Rewrite LMS in Rust with snapshot-safe batched catalogs and bounded zero-copy I/O
All checks were successful
challenge / find (pull_request_target) Successful in 5s
challenge / run (submissions/rust-tokio-spectral) (pull_request_target) Successful in 47m29s
2eb48f9650
happyqt changed title from Go/net-http: полное ядро LMS с пакетными чтениями PostgreSQL to Rust/Tokio: LMS с пакетными чтениями и zero-copy файлами 2026-10-30 16:34:19 +00:00
Reduce idle HTTP connection CPU and memory in Rust
All checks were successful
challenge / find (pull_request_target) Successful in 4s
challenge / run (submissions/rust-tokio-spectral) (pull_request_target) Successful in 41m43s
7b510b8a5a
happyqt changed title from Rust/Tokio: LMS с пакетными чтениями и zero-copy файлами to Rust/Tokio: компактные HTTP-соединения и пакетные чтения 2026-10-30 17:40:35 +00:00
happyqt changed title from Rust/Tokio: компактные HTTP-соединения и пакетные чтения to Rust LMS: batched assignment reads and recovery after database timeouts 2026-10-31 05:10:16 +00:00
Batch assignment detail reads and preserve newer requests after read timeouts
All checks were successful
challenge / find (pull_request_target) Successful in 9s
challenge / run (submissions/rust-tokio-spectral) (pull_request_target) Successful in 53m45s
44526ffe10
happyqt changed title from Rust LMS: batched assignment reads and recovery after database timeouts to Rust LMS: coalesced SQL preparation, batched reads and timeout recovery 2026-10-31 06:35:05 +00:00
Coalesce concurrent preparation of the same SQL statement
All checks were successful
challenge / find (pull_request_target) Successful in 9s
challenge / run (submissions/rust-tokio-spectral) (pull_request_target) Successful in 35m30s
fa4f4f3dd6
happyqt changed title from Rust LMS: coalesced SQL preparation, batched reads and timeout recovery to Rust LMS: smaller HTTP state with batched PostgreSQL reads 2026-10-31 08:58:08 +00:00
Keep cold database handshakes out of HTTP request state
All checks were successful
challenge / find (pull_request_target) Successful in 4s
challenge / run (submissions/rust-tokio-spectral) (pull_request_target) Successful in 47m0s
72910898df
happyqt changed title from Rust LMS: smaller HTTP state with batched PostgreSQL reads to Rust LMS: batch fresh reads with bounded SQL cardinality 2026-10-31 13:53:56 +00:00
Batch fresh reads with bounded planner cardinality
All checks were successful
challenge / find (pull_request_target) Successful in 5s
challenge / run (submissions/rust-tokio-spectral) (pull_request_target) Successful in 39m15s
bec53523ab
happyqt changed title from Rust LMS: batch fresh reads with bounded SQL cardinality to Rust LMS: rework connection handling and batch fresh reads 2026-11-01 21:49:21 +00:00
Rework connection handling and batch fresh reads
All checks were successful
challenge / find (pull_request_target) Successful in 4s
challenge / run (submissions/rust-tokio-spectral) (pull_request_target) Successful in 47m18s
0af2632419
pxc1984 force-pushed spectral-lms-submission from 0af2632419
All checks were successful
challenge / find (pull_request_target) Successful in 4s
challenge / run (submissions/rust-tokio-spectral) (pull_request_target) Successful in 47m18s
to 650a1230e6
All checks were successful
challenge / find (pull_request_target) Successful in 1s
challenge / run (submissions/rust-tokio-spectral) (pull_request_target) Successful in 49m56s
2026-11-02 18:22:35 +00:00
Compare
pxc1984 force-pushed spectral-lms-submission from 650a1230e6
All checks were successful
challenge / find (pull_request_target) Successful in 1s
challenge / run (submissions/rust-tokio-spectral) (pull_request_target) Successful in 49m56s
to c8a3c732d7
All checks were successful
challenge / find (pull_request_target) Successful in 1s
challenge / run (submissions/rust-tokio-spectral) (pull_request_target) Successful in 20m46s
2026-11-03 08:03:46 +00:00
Compare
pxc1984 force-pushed spectral-lms-submission from c8a3c732d7
All checks were successful
challenge / find (pull_request_target) Successful in 1s
challenge / run (submissions/rust-tokio-spectral) (pull_request_target) Successful in 20m46s
to 8c8d5982e2
All checks were successful
challenge / find (pull_request_target) Successful in 3s
challenge / run (submissions/rust-tokio-spectral) (pull_request_target) Successful in 29m41s
2026-11-03 08:48:14 +00:00
Compare
pxc1984 force-pushed spectral-lms-submission from 8c8d5982e2
All checks were successful
challenge / find (pull_request_target) Successful in 3s
challenge / run (submissions/rust-tokio-spectral) (pull_request_target) Successful in 29m41s
to 5520f25901
All checks were successful
challenge / find (pull_request_target) Successful in 1s
challenge / run (submissions/rust-tokio-spectral) (pull_request_target) Successful in 31m12s
2026-11-03 12:21:05 +00:00
Compare
pxc1984 merged commit 3a8aefe055 into master 2026-11-07 22:12:56 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
cu3rd/posvyat-challenge!9
No description provided.