gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit8e6aa91d8e6aa91dlog: GC1 deploy retrymre8e6aa91d/missions/043-trkmem.md

1.6 KB

  1. # Mission 043 — trkmem part 1 (tracker.worldapi.org#45, TOP): stop materialising whole tables at boot
  2. Creator: 9 GB RAM and slow. Cause (Hybriel missions/388-trkmem-report.md): hl:mpackdb is on demand, but `find(null, null)` decodes EVERY
  3. row into one array; the tracker called it ~45 times, five of them at boot over persons (621 K rows, 11 s, +5.6 GB) and episodes
  4. (1.4 M, 9 s, +3 GB) — ~54 % of the boot was GC pauses those arrays caused.
  5. Part 1 (this branch w43-trkmem):
  6. 1. re-vendor plugins/ + bin/ to Hybriel master f9614007 (libmpackdb.so sha256 6fb3b9d6…, #202).
  7. 2. boot: lib/bootscan.hl — ONE streamed `iterate(null, null)` pass per table: titles → catalog lists, slug map, search entries, short ids,
  8. cast photos; episodes → catalog dates; people → search entries, short ids, slug map, TMDB ids, /people's order. Each module keeps its
  9. lazy build (ensureIndex, ensureShortIds, …) from the same per-record functions (noteIndexShow, noteSlugsOf, indexShow, noteShortIdRow,
  10. noteCastProfiles, noteIndexPerson, noteSlugOfPerson, noteTmdbOfPerson, viewEntryOf). follows/watches/franchises boot scans stream too.
  11. 3. measure old vs new, 4. gates.
  12. Part 2 (NOT done): the background jobs' `find(null, null)` (each blocks the single-threaded server for 19–74 s):
  13. merge.hl:85,107,113,155,159 · backfill.hl:46,95,136 · details.hl:53 · credits.hl:111 · collections.hl:46,50,51 · franchiseseed.hl:93,237 ·
  14. dailysync.hl:234 (moveCopiedSummaries, once, UPDATES while scanning) · franchises.hl:244,351,455,470,476,482,512 (request path, timelines/franchises
  15. tables are small) · small genre tables: catalog.hl:290, shows.hl:115,322, search.hl:251, people.hl:158.

Branches

Latest commits

  • 8e6aa91dlog: GC1 deploy retrymre
  • 87ad2dc1log: GC1 deployingmre
  • 53f10fb8Merge branch 'gc1-deploy'mre
  • 7fcbf1d2log: GC1 deploy GOmre
  • 1fb6664bcompose: TRACKER_QSTATS=1 (GC1 measurement)mre
  • 6576c1cdgc1: release the people-view scan lists once the view is builtmre
  • 94f8a373gc1: back out the kept episode-id set (no measurable gain on /my/unwatched: 4.69 -> 4.61 GB per 150 loads)mre
  • a1a88bd4gc1: search skips the stale-key string while no entry is stale; /my/unwatched asks a kept id set instead of building a key string per episode rowmre
  • cd830744gc1: dbSearch: no split / map / list copy per candidate (scores from the stored text, top list touched only when the hit can enter)mre
  • 451db7cdgc1: show page and check clicks read the kept watched set instead of building one from a by-value copy of every watchmre
  • ddb4127egc1: TRACKER_QSTATS=1 logs queue and cache sizes every 10 s (measurement only)mre
  • da60547fstatus: GC1 done, backup bugmre
  • e4171021log: GC1 result, backup hard-link bugmre
  • f1597214deploy.sh backup: tar --hard-dereference (hot tar stored mpackdb sidecars as hard links to .sessions files)mre
  • 6b58571elog: GC windowmre
  • 5c8baa1fdeploy lock: hold only around deploy.shmre
  • b8dac822log: hybriel#309mre
  • bf676d9elog: GC1 startedmre
  • c7828541mission GC1mre
  • ef949994conductor: neutral ticket rulemre