Skip to content

perf(executor): class L gets 26Gi / 18GB, because a realistic 10M standardize needs more than 8GB of DuckDB (#558) - #1501

Merged
athvin merged 1 commit into
mainfrom
perf/558-class-l-memory
Nov 30, 2026
Merged

athvin merged 1 commit into
mainfrom
perf/558-class-l-memory

Conversation

@athvin

@athvin athvin commented Nov 30, 2026

Copy link
Copy Markdown
Owner

Closes #558

Post-merge is part of this pull request. The ledger below records whether
the follow-up work actually happened. /land-pr closes it.

What

Class L becomes 26Gi with DuckDB at 18GB (was 14Gi / 8GB). The references that state L's size are updated.

Why

#558's 10M run failed standardize OOM at 8GB on both raw layouts (7.4/7.4 GiB). Every runner-l node has at least 32 GiB, and L used 14 of it.

Proof

helm template renders ER_DUCKDB_MEMORY_LIMIT=18GB with 26Gi requests and limits. make skills-check ok. The proof is #558's 10M rerun on this build, which goes in the ledger.

Risk & rollback

One L pod per runner-l node now, where there were two. The dev namespace was already limited to two concurrent L pods by ephemeral storage, and 57Gi fits its 80Gi memory quota. Rollback: git revert <merge-sha>.

Post-merge ledger

Closed by: unclosed

  • main is green with this change on it — the merge SHA, and the run
    that proves it. A later head SHA with this commit as an ancestor counts;
    a cancelled run with zero jobs does not:
  • images built, or correctly never ran because nothing that goes into
    an image changed:
  • deploy converged — proved by a line the running process emitted, not
    by the image digest and not by the workflow conclusion:
  • the push-only surface no pull request can pre-test (deploy, drift,
    kind's nightly leg) is green, or knowingly red for a reason that is not
    this change:
  • the board card reached Done through the automation rather than by
    hand, and the issue closed:
  • follow-ups are open for everything deferred here — numbers:
  • what was learned is written down where the next session will find it
    (a skill, a reference, memory) — or nothing new was learned:

Specific to this change

Context — plan, discoveries, measurements, files

Plan

Discoveries

Measurements

Files

🤖 Generated with Claude Code

…ndardize needs more than 8GB of DuckDB (#558)

#558's 10M run on er-dev, with a realistic-cardinality corpus, failed
standardize with Out of Memory (7.4/7.4 GiB) at class L's 14Gi / 8GB:
- on #1475's single-file layout, after 3 minutes;
- on #1496's 500-row files, after 4.5 minutes, at 13.2 of 14 GiB.
The old layout's earlier pass at 10M was on a low-cardinality corpus.

Every runner-l shape has at least 32 GiB (c5ad, c6id or c8id.4xlarge;
m6id has 64), and L used 14 of it. L is now 26Gi with DuckDB at 18GB,
which keeps DuckDB strictly below the container (the D-SIZING
invariant) and leaves room for the node's daemonsets. That means one L
pod per node. The dev namespace already admits at most two L pods,
since ephemeral storage refuses a third: 2 x 26Gi + app = 57Gi of the
80Gi quota.

helm template renders ER_DUCKDB_MEMORY_LIMIT=18GB with 26Gi requests
and limits. infrastructure.md §6.5, batch-orchestration-design and the
quota comment are updated.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@athvin
athvin merged commit e4a1aab into main Nov 30, 2026
44 checks passed
@athvin
athvin temporarily deployed to marketing-preview November 30, 2026 09:38 — with GitHub Actions Inactive
athvin added a commit that referenced this pull request Nov 30, 2026
… corpus fits in memory (#558) (#1504)

#558's 10M run kept failing standardize with Out of Memory: at 8GB
(7.4/7.4 GiB), and after #1501 raised class L, at 18GB (16.7/16.7 GiB).
Its working set grows with the corpus and DuckDB doesn't spill enough of
the projection plus the current-version window. Locally, 2M rows need
more than 1.5GB.

The corpus is now standardized in buckets of hash(source_system,
source_record_id): a CREATE TABLE AS for bucket 0, then an INSERT per
further bucket. The window partitions by exactly that key, so every
version of a record shares a bucket, and the union of the buckets is the
single statement's result. Bucket count is ceil(rows / 1M);
ER_STD_ROWS_PER_BUCKET overrides it. One bucket (any corpus up to 1M) is
the same SQL as before. Both the person and account builders use it.

Measured locally (2M rows, 1.5 GB limit, 12 threads, 500k-row buckets):
standardize passes in 278 s with all 2,000,000 rows. std_hashes now also
builds base_10 in 3-row buckets and requires the same table, both
directions of EXCEPT ALL. build_int_std_records_with takes the bucket
size, so the test doesn't touch the process env.

Co-authored-by: bmoore813 <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>

This branch was previously deployed

1 inactive deployment
marketing-preview — d5236476 Deployed Nov 30, 2026 by athvin via remove closed PR previews #196
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.

10M-scale spill run without eviction

2 participants