gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Main branchmaind2e6d26bMerge branch 'records-park55' into mainTrackermain/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

  • d2e6d26bMerge branch 'records-park55' into mainTracker
  • f567f025|||PR records: park #55, no Claude workers ruleTracker
  • c21aff6bMerge branch 'records-hm55c' into mainTracker
  • 9ba258d3|||PR records: HM55b resultTracker
  • 64f2d300Merge branch 'records-hm55b2' into mainTracker
  • ae3b80dc|||PR records: HM55b briefTracker
  • 7ef3cb3bMerge branch 'records-st55' into mainTracker
  • fec2e080|||PR records: STATUS HM55Tracker
  • 8e174918Merge branch 'records-hm55b' into mainTracker
  • b1ecee57|||PR records: HM55 stateTracker
  • 28eab08cMerge branch 'records-hm55' into mainTracker
  • d3edaa05|||PR records: HM55 start, PROCEDURES.mdTracker
  • 3059f86cMerge branch 'records-design-rule' into mainTracker
  • 421a4809|||PR records: his-design rule (Apollo 2026-11-13)Tracker
  • d1390692Merge branch 'records-dp75b' into mainTracker
  • a4d1a7d2|||PR records: later steps checked, branch auditTracker
  • e070e16fMerge branch 'records-dp75' into mainTracker
  • 642b4fa8|||PR records: DP75 day62 live, AP62 briefTracker
  • bfc4ea4dMerge branch 'ap62' into mainTracker
  • 2c95ac46|||PR AP62: re-vendor Hybriel set day62 (source 70341ad2, bin a54f5f08)Tracker