gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit73fa20dd73fa20ddMerge hm49b-styles: tracker#49 rest of the component stylesmre73fa20dd/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

  • 73fa20ddMerge hm49b-styles: tracker#49 rest of the component stylesmre
  • 14195720log: HM49B done, HM51 startedmre
  • 78ee6b56Move remaining component styles into Style blocksmre
  • 7f04de33log: HM49Bmre
  • 00616cf3log: #49 batch merged, DP67 startedmre
  • d7232e86Merge hm49-styles: tracker#49 first batch of component stylesmre
  • 079f376dMove seven components' styles into Style blocksmre
  • 17d66feelog: #58 mergedmre
  • 69a6640bMerge hm58-map: tracker#58 project.hl only the mapmre
  • a85f7900Move route logic out of the project mapmre
  • 13dea5belog: #56 live, HM49 and HM58 startedmre
  • a31c8f2fdocs: tracker#36 remaining listmre
  • 975d06d1log: #36 live, DP66 startedmre
  • d6d03fa3mission: T36Bmre
  • e7512d00status: #36 rolled back, retry askedmre
  • c98e2043log: T36A rollbackmre
  • ae905f15Merge t36a: tracker#36 apply rechecks, reportmre
  • 796bfaceT36A: report validated fixes, failed live SSH check and verified rollbackmre
  • 55257852log: #53 live, #56 mergedmre
  • 78b39f1bMerge hm56-rows: tracker#56 list builders insert oncemre