Backend core follow-ups #17

Closed
opened 2026-10-13 15:19:05 +00:00 by kayg · 1 comment
Owner

Loose ends from #4 (PR #16), none blocking the editor:

  • Evict idle per-user writer threads (today every user who was active keeps one thread). Needed before many users.
  • Prune idempotency records after a retention window.
  • Access log (requests are logged only on error today).
  • OpenAPI via utoipa (today GET /api/v1/actions lists actions as a stand-in).
  • Pin actions/cache by commit SHA in CI.
  • Resumable long jobs and partial idempotency belong to the bulk-edit job (#9).
  • A repo dev shell (C compiler + toolchain) so every machine and agent builds the same way.
Loose ends from #4 (PR #16), none blocking the editor: - Evict idle per-user writer threads (today every user who was active keeps one thread). Needed before many users. - Prune idempotency records after a retention window. - Access log (requests are logged only on error today). - OpenAPI via utoipa (today `GET /api/v1/actions` lists actions as a stand-in). - Pin `actions/cache` by commit SHA in CI. - Resumable long jobs and partial idempotency belong to the bulk-edit job (#9). - A repo dev shell (C compiler + toolchain) so every machine and agent builds the same way.
Author
Owner

Progress on this issue is in PR #109.

Memory with 2000 idle users (release build, cargo run --release -p calternal-engine --example idle_users -- 2000, idle time 30s, Linux):

step RSS threads
start 3.6 MiB 13
2000 users active (before eviction) 392.9 MiB 2016
all idle past the window, not yet released (before) 393.0 MiB 2013
after release (after) 291.1 MiB 15

Threads go from 2013 to 15. RSS drops about 100 MiB; the rest is glibc keeping freed pages around (arenas), not live data. Roughly 190 KiB per open user before; a returning user pays the normal fast open.

Done in the PR: evict idle writers (with tests), idempotency pruning after 7 days, access log.
Moot: pin actions/cache by SHA. .forgejo/workflows/ci.yml uses no third-party actions at all (no uses: lines).
Left for a later PR: OpenAPI via utoipa, repo dev shell. The bulk-edit items stay with #9.

Progress on this issue is in PR #109. **Memory with 2000 idle users** (release build, `cargo run --release -p calternal-engine --example idle_users -- 2000`, idle time 30s, Linux): | step | RSS | threads | |---|---|---| | start | 3.6 MiB | 13 | | 2000 users active (before eviction) | 392.9 MiB | 2016 | | all idle past the window, not yet released (before) | 393.0 MiB | 2013 | | after release (after) | 291.1 MiB | 15 | Threads go from 2013 to 15. RSS drops about 100 MiB; the rest is glibc keeping freed pages around (arenas), not live data. Roughly 190 KiB per open user before; a returning user pays the normal fast open. **Done in the PR:** evict idle writers (with tests), idempotency pruning after 7 days, access log. **Moot:** pin `actions/cache` by SHA. `.forgejo/workflows/ci.yml` uses no third-party actions at all (no `uses:` lines). **Left for a later PR:** OpenAPI via utoipa, repo dev shell. The bulk-edit items stay with #9.
kayg closed this issue 2026-10-14 04:10:58 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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
kayg/calternal#17
No description provided.