Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions benchmarking/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,17 +273,22 @@ nothing. Durations are in milliseconds.
### ate-env Benchmark

The `ate-env` benchmark (`--user-class ate_env`) exercises the
[`ate-env-guest`](https://github.com/agent-substrate/env/tree/main/cmd/ate-env-guest)
sandbox image from `agent-substrate/env`. `workloads/deploy.sh` deploys and
deletes the `ate-env` `ActorTemplate` by default using the pinned release guest
image (see
[`workloads/manifests/ate-env-template.yaml.tmpl`](workloads/manifests/ate-env-template.yaml.tmpl)
to override the guest image with a custom build). It follows `glutton`'s
[`ate-env-guest`](https://github.com/agent-substrate/env/tree/1c08a7a578afd896373511a83beb242aec1425c0/cmd/ate-env-guest)
sandbox image from `agent-substrate/env`. It follows `glutton`'s
wake/hold/hibernate lifecycle, but replaces synthetic HTTP `/ping` calls with a
real `"hello world"` process execution inside the guest (`StartProcess(["echo",
"hello world"])` + `StreamProcessOutput(follow: true)`) over gRPC directly
through `atenet-router` (`1 dns:///` gRPC channel per VU).

Build the guest image from `agent-substrate/env` at commit `1c08a7a` (see
[`workloads/manifests/ate-env-template.yaml.tmpl`](workloads/manifests/ate-env-template.yaml.tmpl)),
then deploy the `ate-env` template and user class:

```bash
ATE_ENV_IMAGE=<image> WORKLOAD_TEMPLATES=ate-env ./benchmarking/workloads/deploy.sh --deploy
./benchmarking/locust/deploy.sh --deploy --user-class ate_env
```

#### ate-env Configuration Knobs

Reuses `glutton`'s runtime and startup knobs:
Expand Down
17 changes: 12 additions & 5 deletions benchmarking/workloads/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ SWEPERF_TEMPLATE_DIR="${MANIFEST_DIR}/sweperf/generated"
# overrides the default set — the usermem and kernelmem templates (for the
# matching locust tests) are not deployed by default. The glutton-storage
# template is added when a StorageClass is set, because it needs a CSI driver
# that not every cluster has.
read -r -a TEMPLATES <<<"${WORKLOAD_TEMPLATES:-sleep glutton glutton-durdir-data glutton-durdir-full ate-env}"
# that not every cluster has; ate-env is added when ATE_ENV_IMAGE is set.
read -r -a TEMPLATES <<<"${WORKLOAD_TEMPLATES:-sleep glutton glutton-durdir-data glutton-durdir-full}"

# template_manifest prints the manifest path for ActorTemplate NAME.
template_manifest() {
Expand Down Expand Up @@ -72,9 +72,9 @@ WORKER_MEMORY=""
# The StorageClass for the glutton-storage external volume. Empty means the
# template is not deployed.
STORAGE_CLASS_NAME="${STORAGE_CLASS_NAME:-}"
# The image for the ate-env benchmark ActorTemplate. Defaults to the pinned
# release guest image; set ATE_ENV_IMAGE to override with a custom build.
ATE_ENV_IMAGE="${ATE_ENV_IMAGE:-us-docker.pkg.dev/gke-substrate-release/benchmark/ate-env-guest@sha256:1d38934ef1dac71fcb1f1286de734e06ab2e19747279bccbd37bfe69e0d5bc72}"
# The image for the ate-env benchmark ActorTemplate. Empty means the
# template is not deployed.
ATE_ENV_IMAGE="${ATE_ENV_IMAGE:-}"
# The address to which an instrumented actor container sends its telemetry.
# --otlp-endpoint sets it. Without the flag, resolve_otlp_endpoint reads the
# address that the control plane uses.
Expand Down Expand Up @@ -475,6 +475,13 @@ if [[ -z "${WORKLOAD_TEMPLATES:-}" ]] \
TEMPLATES+=(glutton-storage)
fi

# ate-env joins the default set only when ATE_ENV_IMAGE is set. Delete always
# includes it, because deleting a template that does not exist is a no-op.
if [[ -z "${WORKLOAD_TEMPLATES:-}" ]] \
&& { [[ -n "${ATE_ENV_IMAGE}" ]] || [[ "${action}" == "delete" ]]; }; then
TEMPLATES+=(ate-env)
fi

if [[ "${action}" == "deploy" && -z "${STORAGE_CLASS_NAME}" && " ${TEMPLATES[*]} " == *" glutton-storage "* ]]; then
echo "Error: the glutton-storage template needs --storage-class-name" >&2
exit 1
Expand Down
4 changes: 1 addition & 3 deletions benchmarking/workloads/manifests/ate-env-template.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ containers:
#
# KO_DOCKER_REPO="gcr.io/<PROJECT_ID>/ate-env-guest" ko build --bare --platform=linux/amd64 ./cmd/ate-env-guest
#
# Substituted by benchmarking/workloads/deploy.sh (which defaults ATE_ENV_IMAGE
# to us-docker.pkg.dev/gke-substrate-release/benchmark/ate-env-guest@sha256:1d38934ef1dac71fcb1f1286de734e06ab2e19747279bccbd37bfe69e0d5bc72;
# set ATE_ENV_IMAGE to override with a custom digest).
# Substituted from ATE_ENV_IMAGE by benchmarking/workloads/deploy.sh.
image: "${ATE_ENV_IMAGE}"
command:
- "/ko-app/ate-env-guest"
Expand Down
Loading