Skip to content

Verify the dispatcher's reduced resources under load (grace 60s, memory 768Mi) #820

Done

Description

@athvin

#645 reduced the er-dispatcher resources in infra/k8s/charts/er-platform/values.yaml, and the new numbers were justified by reasoning, not measured. They should be confirmed before anyone trusts them in prod.

setting was now why it was lowered
terminationGracePeriodSeconds 300 60 the 300s existed because "a killed legacy run strands its row holding the dataset's writer lock". With the arm gone, planning is one transaction that rolls back to queued, the work is in Jobs that outlive the pod, and Executor::adopt re-stamps owner_epoch on both the job and its task rows — so the next dispatcher takes over instead of leaving it for an operator
requests.memory 512Mi 256Mi the dispatcher opens no lake: the schema reconcile moved to reconcile_schema/init on the task path, and dags/control/mod.rs may not link engine code
limits.memory 3Gi 768Mi the 3Gi was the API container's defensive ceiling, justified by "runs whole legacy pipelines in-process (DuckDB included)"

What to check

  1. The grace period is enough. What a SIGTERM can now interrupt is one pass of Postgres writes plus, at worst, one SES send and a webhook drain. Confirm a dispatcher restart under load drains inside 60s and strands nothing — a row left dispatching/running with no owner epoch is the failure.
  2. 768Mi is enough headroom. DuckDB is still linked into the shared multicall image even though nothing on this arm calls it, so the RSS floor is not obviously small. Watch container_memory_working_set_bytes for er-dispatcher across a busy period; an OOMKill here stops all dispatch.
  3. If either is wrong, raise it in the chart with the measurement recorded in the comment — the current comment argues from mechanism, which is what this issue exists to replace.

Refs #645.


Product context (2026-11-26)

Why this matters for the API product: The dispatcher is the single replica (Recreate) that turns every API-submitted job into work. If it's OOMKilled or a restart strands rows, every customer's run step stops. This protects operate safely.

Current state: Nothing has been measured since the ticket was filed.

Definition of done: As above. Add a measured peak container_memory_working_set_bytes from a window that includes at least one multi-task run per class, and one deliberate mid-run dispatcher restart that leaves no dispatching/running row without an owner epoch. Record both in the values.yaml comment.

Dependencies / sequencing: #558's 10M run is a good busy window. Related: #530.

Size: About 0.5 engineer-weeks.

Activity

  1. added
    followup
    on Nov 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    followup

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions