Skip to content

benchmarking: add a storage workload - #4262

Open
anishgang wants to merge 6 commits into
agent-substrate:mainfrom
anishgang:storage-workload
Open

anishgang wants to merge 6 commits into
agent-substrate:mainfrom
anishgang:storage-workload

Conversation

@anishgang

Copy link
Copy Markdown
Collaborator

Part of #3917. Stacked on #4229 and the actor cleanup PR, so only the last commit is new.

Storage benchmarks need a StorageClass, the CSI driver's CSIDriverConfig and the glutton-storage template installed before the test, and removed after it. The orchestrator deletes Substrate's CRDs between tests, which also deletes any CSIDriverConfig, so the test has to apply it each time.

The storage workload installs glutton-storage and, optionally, a CSIDriverConfig and a StorageClass from manifests. It labels both benchmarking.ate.dev/workload=storage. Uninstall and sweep delete only labeled objects, and install refuses to take over unlabeled ones. They are kept if deleting the actors failed, since their volumes may still need them. With csiController, install pins that Deployment to the ate-system-infra nodes and records the change in an annotation, so uninstall reverts only that.

The glutton-storage template used snapshotConfig.onCommit, which the API no longer accepts. It now sets preferredFidelity: SNAPSHOT_FIDELITY_MEMORY, like glutton-durdir-full.

Tested with the wakestorm latency scenario on a GKE cluster with Filestore volumes.

AI use: AI assisted with the implementation and an adversarial review. I reviewed the result myself.

The orchestrator called deploy.sh --deploy directly, with the same
arguments for every test type. Each test type now has a workloads(test)
hook that decides which workloads a test needs, and the orchestrator
calls it after pre_test.

Workload modules live in automation/workloads/ and are looked up by name
in WORKLOADS. install_all checks every name before it installs anything.
The deploy_sh workload runs deploy.sh --deploy with the arguments
orchestrator.deploy_workloads used to build, so every existing test
installs the same workloads as before.

The locust hook loads the test's stub from the cloned repo and installs
what the stub's workloads(test) returns. It sets LOCUST_NO_USERS=1 while
loading, and the boomer-backed stubs skip their locust imports when it is
set, so the orchestrator image doesn't need locust. Stubs that import
locust unconditionally fail with a clear error. The nighthawk-ingress hook
always uses deploy_sh. The nighthawk-egress hook does nothing, because
its pre_test installs its own workloads.

Teardown still runs deploy.sh --delete.

Signed-off-by: Parnika Mandewalkar <pmandewalkar@google.com>
A broken locust stub, or one from a branch older than the workloads hook,
failed only inside the test loop, after deploy_substrate, and again for
every test that used it.

Each test type now has a check_workloads(test) hook. The orchestrator
calls it for every test right after the checkout, before any cluster
work, and exits on the first error. For locust it loads the stub and
looks up the workload names it returns. The nighthawk types have nothing
to check.

Signed-off-by: Parnika Mandewalkar <pmandewalkar@google.com>
SWE-perf has one ActorTemplate per task, and a run needs one task, a
subset, or all of them. Installing every task for every test isn't
viable, so a sweperf test now installs only the tasks it selects.

workloads/sweperf.py selects tasks from sweperf-images.json by name or
fnmatch glob ("*", the default, selects every task) and applies the
checked-in generated templates. Golden snapshots get the test's
workerWaitTimeout. The sweperf stub reads the selection from the test's
`workloads:` block.

actortemplates.py creates and deletes benchmark ActorTemplates the way
deploy.sh does: it creates the atespace if needed, deletes and recreates
each template through kubectl-ate, and waits for every golden snapshot.
Manifests are applied as-is, and kubectl-ate failures other than NotFound
on delete and AlreadyExists on the atespace are errors.

Workloads now also implement validate and uninstall. resolve validates
every config, so check_workloads catches a bad task selector before any
cluster work. The locust hook sets up workers with workers.install()
unless the test uses deploy_sh, which creates the WorkerPool itself.

A new uninstall_workloads(test) hook runs after each test, before the
existing teardown_workloads() sweep. For sweperf it deletes the selected
templates, and so their golden snapshots, then removes the workers.

Signed-off-by: Parnika Mandewalkar <pmandewalkar@google.com>
workload_env.cluster_values() reads the OTLP endpoint from the
ate-otel-config ConfigMap, the way deploy.sh does, for workloads that
fill placeholders in their manifests. actortemplates.apply() now builds
and resolves ko:// images with ko resolve before it creates a template.

Workloads get a sweep() that removes anything they could have created,
without their config. The orchestrator's start-of-run sweep calls it for
every workload, logging failures, so a crashed run doesn't leak a
workload's state into the next. sweperf.sweep() deletes every sweperf-*
template, found with the new actortemplates.names().

The locust uninstall_workloads hook runs every workload's uninstall even
if one fails, removes the workers, then raises the first failure.

Signed-off-by: Parnika Mandewalkar <pmandewalkar@google.com>
Deleting an ActorTemplate leaves the actors made from it, and their
external volumes. actortemplates.delete() and apply() now delete those
actors in the benchmark-workloads atespace first, and wait until
ListActors no longer shows them. Actors are tracked by UID. The golden
actor is skipped, because deleting the template removes it.

apply() also takes preview, which passes --preview to kubectl-ate
create actor-template. Templates with external volumes need it.

Signed-off-by: Anish Gangu <anishgang@google.com>
The storage workload installs the glutton-storage ActorTemplate and,
optionally, a CSIDriverConfig and a StorageClass from manifests. The
orchestrator deletes Substrate's CRDs between tests, so the
CSIDriverConfig is applied for each test. The workload labels what it
applies, and uninstall and sweep delete only labeled objects. With
csiController it pins that Deployment to the ate-system-infra nodes and
records the change in an annotation, so uninstall reverts only that.

glutton-storage now sets preferredFidelity instead of the removed
snapshotConfig.onCommit field.

Signed-off-by: Anish Gangu <anishgang@google.com>

This branch has not been deployed

No deployments
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.

2 participants