Skip to content

Utopia: its database requests two cores and 4Gi, with 1GB of shared buffers - #2799

Merged
gedaiu merged 1 commit into
mainfrom
utopia/db-size
Oct 16, 2026
Merged

gedaiu merged 1 commit into
mainfrom
utopia/db-size

Conversation

@gedaiu

@gedaiu gedaiu commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator

Since re.8 went live, utopia-db has sat at its 2-CPU limit with 18 connections busy. Utopia's log is full of slow-statement warnings, and one push was refused with pool timed out while waiting for an open connection. The busy queries are entity resolution for pushed items. Each one reads every entity's 3,072-dimension embedding in the knowledge base, and they wait on disk reads (IO:DataFileRead): Postgres runs with the default 128MB of shared_buffers against a 1.6GB database. Thirteen pushed commits are still pending behind that queue.

utopia-db now requests 2 CPUs and 4Gi (was 1 and 1Gi), with limits of 4 CPUs and 4Gi, and sets shared_buffers = 1GB, effective_cache_size = 3GB and work_mem = 16MB. Autopilot bills requests, so this costs about $43 a month more at list price (about $79 instead of $36).

terraform plan -target='kubectl_manifest.utopia_db_cluster[0]' shows the one in-place change: the three parameters added, requests 1→2 CPU and 1Gi→4Gi, limits 2→4 CPU and 2Gi→4Gi.

Applying restarts the single CNPG instance: a short database outage for Utopia, which reconnects on its own. After merge: terraform apply -target='kubectl_manifest.utopia_db_cluster[0]' from main.

Related: #2773 (the last sizing), #2798 (the import's own timeout).

🤖 Generated with Claude Code

…uffers

On 2026-10-17 the mirrored test runs and code held utopia-db at its 2-CPU
limit, waiting on disk reads: entity resolution reads every entity's
embedding per pushed item, and Postgres ran with the default 128MB of
shared_buffers against a 1.6GB database.
@lore-agent

lore-agent Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Lore is reviewing this PR — 4e3357af-3968-4aa9-868f-791e570347e6.

Submit a review that requests changes to have Lore push a fix for it. Comment @lore review to re-run the review.

@github-actions

Copy link
Copy Markdown

🔍 Lore Spec Impact

Examined 1 changed file(s): 0 had graph data (no coupling found), 1 had none — no ingested test run covers them, so this check cannot speak for them.

Deterministic · graph @ 54e00aa (projected 2026-10-07) · 1 file(s) skipped: changed since the graph last saw them, so their line numbers no longer line up · no tests run by this check

@lore-agent lore-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lore review — Approved

CNPG resource requests/limits and PostgreSQL memory tuning for utopia-db are well-proportioned and valid.

Must fix (0) · Consider (0) · Nits (0)

Reviewed by gemini-4-argon

Submit a review that requests changes to have Lore push a fix for it. Comment @lore review to re-run the review.

Posted by floor, visit 0f363aff-a2d7-4242-9109-1a3102fdf262.

@gedaiu
gedaiu merged commit 04bd5e7 into main Oct 16, 2026
27 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