tracker
All repositories: gitoria
4.0 KB
# GC1-gc-pauses: shorten or thin out the GC full pauses that cause the 6-8 s stallsTask (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."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.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.## Read first- Anton's analysis: /media/STORAGE/claude-scratch/anton/m573/REPORT.md (fully; sections 2-3 are about this app).- Worker rules: /media/STORAGE/projects/WorldAPI/worldapi-conductor/archive/2026-10-31/WORKER-RULES.md (read fully).- 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.- Fixed rules: no hand-written JS; mpackdb-touching helpers used in `on server` faces must be `static`; logins never expire, never delete session files.## Steps1. 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.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.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.Loreana has ~47 GB free RAM; the copy may use ~20 GB. Run only ONE instance at a time.4. Fixes, one at a time, each measured against the baseline:a. lib/shortids.hl (~line 170 onward): set each processed queue slot to null once handled (and release the queue when done).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.Report the measured effect per fix; keep only those that help.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.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).7. Scratch only in /media/STORAGE/claude-scratch/tracker/GC1/. No live access, no byrodin, no deploy, no push, no lisbeth Chrome.8. Stop everything you started by its saved PID. Delete the extracted data copy at the end. List each process by name + PID.## Report/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
- d049b8b8Log: HM50 live, #52 donemre
- 6d05fa37Log: HM50 Part A mergedmre
- 1c7dab74HM50: the shell reads the framework's online state, netProbe removed (tracker#55)mre
- e8b91697HM50: search address follows the text via navigate(path, replace = true) (tracker#52)mre
- 6fe1896cHM50: re-vendor Hybriel set day50 (source 0ae38232, bin d3ef9d16)mre
- 2f391aa9Log: HM50 startedmre
- 4b59c03dHM50 mission: doc pathmre
- ed526d67HM50 missionmre
- 2f986ca3Log: RT50 passmre
- 1c4715a4RT50 mission: day50 repro retestmre
- 57d1c0dcLog: day50 retest requestmre
- 60b1f419Log: Anton #336 result, wake checkmre
- 919a18aalog: scratchmre
- 6b504440status tidymre
- 9332bd10log: DP70 livemre
- be11daa0DP70 brief fixmre
- 886a7028DP70 brief, HM67 mergedmre
- b41cdd6dMerge hm67-searchids: packed search IDsmre
- 385904eaReport HM67 matched heap measurements and gate proofmre
- e5c9b659Pack retained search IDs into UTF-8 bytesmre