Skip to content

Bound hosted library growth on celld - #58

Merged
nicosuave merged 3 commits into
mainfrom
bound-library-growth
Oct 14, 2026
Merged

nicosuave merged 3 commits into
mainfrom
bound-library-growth

Conversation

@nicosuave

@nicosuave nicosuave commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Hosted libraries kept getting slower and bigger as history accumulated, and the local celld host stored new full copies of each database over and over.

  • Add covering indexes for artifact and script history. Listings no longer read each revision's source, which sits before the listed columns in the row. With 20k revisions, the first gallery page drops from 13.8 ms to 0.2 ms and the last page from 155.6 ms to 1.1 ms; script history drops from 109.8 ms to 0.1 ms. Query text is unchanged. bun:sqlite, workerd and celld 0.6.1 all choose the new indexes.
  • Stop setting CELLD_IDLE_EVICT_S=60 for artifacts host and the Docker image. With it, every request after a minute of idle stored two full copies of the object's database (measured on celld 0.6.1: a 4 MiB database added 2 × 4113 KiB per wake). Without it, celld's default keeps idle objects resident and unloads them only under memory pressure; repeated requests add only small deltas.
  • Default CELLD_LTX_RETENTION_SECS=3600 for the local host and Docker image so celld deletes superseded copies from restarts and pressure evictions; without it celld keeps every copy. Docs cover both settings for local hosts and recommend retention for fleet nodes.

Serve events and revision/compiled-bundle retention are unchanged.

Add covering indexes so artifact and script history listings stop reading every revision's source, reuse the latest serve event when a version reopens with unchanged state, and enable celld epoch retention for the local host and Docker image so idle-wake snapshots are deleted.
Reusing identical serve events stopped serve_count from counting hosted page views. Leave serve event semantics unchanged in this change.
A 60-second idle eviction made celld store two full copies of an object's database on every later wake. Leave idle eviction at celld's default so objects unload only under memory pressure.
@nicosuave
nicosuave merged commit 562f2f9 into main Oct 14, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant