gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit46a3703646a37036records: DP71 liveTracker46a37036/missions/GC1-gc-pauses.md

4.0 KB

  1. # GC1-gc-pauses: shorten or thin out the GC full pauses that cause the 6-8 s stalls
  2. Task (Apollo 2026-11-03, GO): "GC plan from Anton's m573 … GO for you, Sonnet/Sol, on a COPY first: (1) measure per collection why it starts, marked objects, queue lengths; free the short-ID queue slots in lib/shortids.hl once processed; bound caches, decode/copy less. (3) try HL_GC_PACING=2 on the copy with a memory ceiling and a p99 target; report pause, frequency, peak RSS. Deploy only what measurably helps."
  3. Origin: caramboleyo reported on 11-03 that marking episodes as watched feels slow. Live (day39, HL_GC_STATS=1): [hl-gc] full pauses of ~5.4 s (mark 3.3 + sweep 2.1) every ~72 s, reason=bytes, marked ≈37.9 M, live_bytes ≈2.2 GB, table_cap 134 M; the container's RSS is about 19 GB.
  4. Tracker's reading (unconfirmed): app-side changes only (no runtime change, no hl:web change), with identical results for the user. Goal: fewer retained objects, so the mark/sweep is shorter and/or collections are rarer. Every change must show its effect in [hl-gc] numbers on the copy, before vs after. Anything that does not measurably help gets left out.
  5. ## Read first
  6. - Anton's analysis: /media/STORAGE/claude-scratch/anton/m573/REPORT.md (fully; sections 2-3 are about this app).
  7. - Worker rules: /media/STORAGE/projects/WorldAPI/worldapi-conductor/archive/2026-10-31/WORKER-RULES.md (read fully).
  8. - Hybriel: /media/STORAGE/projects/hybriel/docs/HL-PRIMER.md, docs/CODE-ORDER.md, and SPEC.md's memory model + GC knobs (HL_GC_STATS, HL_GC_PACING). At a Hybriel gap STOP with a repro, no workaround.
  9. - Fixed rules: no hand-written JS; mpackdb-touching helpers used in `on server` faces must be `static`; logins never expire, never delete session files.
  10. ## Steps
  11. 1. Branch `gc1` from main (c1c4178 or newer) in worktree /media/STORAGE/claude-scratch/tracker/GC1/wt. main's bin/ is day39 (sha256 6b481aa7); keep it.
  12. 2. Real data: extract storage/ only (NOT .env, NOT .sessions) from /media/STORAGE/deploy-backups/tracker.worldapi.org/tracker.worldapi.org-20261103-1933.tgz into /media/STORAGE/claude-scratch/tracker/GC1/data (read-only source). TMDB/TVmaze: only the gates' fake TMDB (tests/); never the real API, no token.
  13. 3. Baseline on the copy: run with HL_GC_STATS=1, letting the jobs run like live (fake TMDB) plus a steady request load (e.g. / and /search, /series/<x> pages at ~1-5/s), for ≥15 min after boot settles. Log per collection: reason, pause/mark/sweep ms, marked, live_bytes, table_cap, interval. Also log app queue lengths (short-id queue left, jobs queues, caches sizes) at each collection or every 10 s. Record peak RSS (VmRSS of the hybriel process) and request latency p50/p90/p99.
  14. Loreana has ~47 GB free RAM; the copy may use ~20 GB. Run only ONE instance at a time.
  15. 4. Fixes, one at a time, each measured against the baseline:
  16. a. lib/shortids.hl (~line 170 onward): set each processed queue slot to null once handled (and release the queue when done).
  17. b. Find caches that grow without bound and bound them; avoid decoding whole records and copying plain data where a reference (&) does it. Keep the compact search index and slim cards as they are.
  18. Report the measured effect per fix; keep only those that help.
  19. 5. HL_GC_PACING=2 on the copy (with the fixes that were kept): a memory ceiling of 28 GB RSS and a p99 target of < 1 s. Report pause, frequency, peak RSS, and p99, compared with pacing 1.
  20. 6. Gates: all in deploy.sh's GATES list, LC_ALL=C, each start waits ≥120 s, all 0 failed. Ports only 8701-8719 on loreana (check ss -ltnp; 8700 is not yours).
  21. 7. Scratch only in /media/STORAGE/claude-scratch/tracker/GC1/. No live access, no byrodin, no deploy, no push, no lisbeth Chrome.
  22. 8. Stop everything you started by its saved PID. Delete the extracted data copy at the end. List each process by name + PID.
  23. ## Report
  24. /media/STORAGE/claude-scratch/tracker/GC1/REPORT.md; copy it to reports/GC1-gc-pauses.md in the worktree and commit on the branch. Final message ≤10 lines: commits, baseline vs after numbers (pause, interval, marked, peak RSS, p99) per fix and for pacing 2, gate counts, a recommendation for what to deploy, stopped processes.

Branches

Latest commits

  • 46a37036records: DP71 liveTracker
  • 3bcb7039Status/log: DP71 in progressTracker
  • 5b3a5693Log: SR1b merged via PR 2, DP71 startedTracker
  • 783957c2Merge branch 'sr1-search' into mainTracker
  • 792b9652README: search results come from the routeTracker
  • fd8570b1|||PR search: one server exchange per keystrokeTracker
  • e8f5cbcaLog: SR1 result, SR1bTracker
  • 8ad275a4Log/status: tracker 68, SR1Tracker
  • f5a06a0fLog: gitoria push setup, SR1Tracker
  • d6b109baMission SR1mre
  • 608b7558Log: FF1 merged via PR #1mre
  • 2939d94cMerge branch 'ff1-gate-failfast' into mainTracker
  • c934361a|||PR tests: gates fail fast when the app exits during startmre
  • d714ae42Log/status: AP56 closed out, FF1mre
  • a429d088Mission FF1mre
  • 03bbfba3Log: AP56c causemre
  • 24845fe3Log: AP56b result, AP56cmre
  • 6a6d71eaLog: gitoria membershipmre
  • 8b842dc8Log + CONDUCTOR: gitoria PR switch-onmre
  • 6bb7c20estatus: window 2026-11-09mre