Skip to content

benchmarking: add cold-start (TTFE) Locust load shape - #884

Open
Alex Bulankou (AlexBulankou) wants to merge 1 commit into
agent-substrate:mainfrom
AlexBulankou:a4s1/benchmarking-ttfe-coldstart
Open

benchmarking: add cold-start (TTFE) Locust load shape#884
Alex Bulankou (AlexBulankou) wants to merge 1 commit into
agent-substrate:mainfrom
AlexBulankou:a4s1/benchmarking-ttfe-coldstart

Conversation

@AlexBulankou

Copy link
Copy Markdown
Collaborator

The existing ate_api.py load shape creates its actor in on_start and Resume/Suspend-cycles it per task — that measures warm activation. This adds locust/tests/coldstart.py, a load shape for true time-to-first-execution: a fresh actor per iteration, measuring boot=False (restore from golden snapshot) and boot=True (full boot) as two separate named metrics, so cold-start p50/p95 land in the same stats.jsonl pipeline as everything else.

Follows the channel/tracing/atespace helper idioms of the existing ate_api.py.

ColdStartUser measures actor time-to-first-execution on the COLD path:
each task iteration provisions a fresh actor, times one first ResumeActor
on it, then tears it down, so every sample is a genuine cold start (unlike
AteAPIUser, which re-resumes one long-lived actor and only ever hits the
warm path).

Two axes, one task each, both on fresh actors:
  * ColdStartSnapshotResume -- ResumeActor(boot=False): cold start via the
    golden-snapshot restore path.
  * ColdStartBootResume     -- ResumeActor(boot=True): cold start via full
    boot from scratch (worst-case baseline).

The ResumeActor handler blocks until readyz=200, so the resume's elapsed
time is the actor's TTFE. Reported latency uses the server-elapsed trailer
with client wall-clock fallback (same convention as the warm path). Pair
with the SLO-knee sweep for the throughput axis.

[a4s1] reference patch for #6595 benchmarking spike.

Signed-off-by: Alex Bulankou <alexbu@google.com>
@AlexBulankou

Copy link
Copy Markdown
Collaborator Author

Three candidate extensions surfaced while exercising this class against a live ladder config — flagging pre-review so scope can be weighed here rather than post-merge:

  1. A composite create→resume→first-read TTFE task alongside the resume-only axis (keeps the boot=True/False split intact — the resume-vs-full-boot comparison is the point of this class; the composite adds the scale-from-zero usability span).
  2. Per-leg tracing (CreateActor / GetActor) inside the composite span for regression localization.
  3. Provision-per-sample (StopUser-style) so N users = N genuinely concurrent cold activations — clean ladder rungs.

If these fit the intent, I can push them onto this branch as a revision; equally fine as a follow-up after this merges as-is.

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