Skip to content

Commit a487f15

Browse files
Make the fleet steps executable on their own
Deploy the fleet under its own stack name, open a session on one of its hosts, define the stack ID and fleet configuration in that session, and let status use the configured AWS profile. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent a891b6b commit a487f15

1 file changed

Lines changed: 14 additions & 4 deletions

File tree

‎benchmarks/README.md‎

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -286,10 +286,11 @@ It orders API-heavy jobs first and longer jobs earlier.
286286
With `--split-pages`, a job whose single trial needs at least that many pages becomes one job per measured repetition without a warmup, so those repetitions run on different hosts.
287287
`run` accepts the matching `--arraysize`, `--warmups`, and `--repetitions` options.
288288

289-
Deploy a new stack with the fleet size; changing `FleetSize` on an existing stack does not wait for the added hosts to finish bootstrap.
290-
Then resolve its hosts, and prepare and publish the queue on one host:
289+
Deploy a new stack with the fleet size under its own name; changing `FleetSize` on an existing stack does not wait for the added hosts to finish bootstrap.
290+
Then resolve its hosts and open a session on one of them:
291291

292292
```bash
293+
BENCHMARK_STACK=pyathena-benchmark-fleet
293294
uv run --env-file ../.env --locked aws cloudformation deploy \
294295
--stack-name "$BENCHMARK_STACK" \
295296
--template-file cloudformation/benchmark.yaml \
@@ -300,10 +301,19 @@ BENCHMARK_GROUP=$(uv run --env-file ../.env --locked aws cloudformation describe
300301
--query 'Stacks[0].Outputs[?OutputKey==`AutoScalingGroup`].OutputValue | [0]' --output text)
301302
BENCHMARK_INSTANCES=$(uv run --env-file ../.env --locked aws autoscaling describe-auto-scaling-groups \
302303
--auto-scaling-group-names "$BENCHMARK_GROUP" --query 'AutoScalingGroups[0].Instances[].InstanceId' --output text)
304+
BENCHMARK_INSTANCE=${BENCHMARK_INSTANCES%%[[:space:]]*}
305+
uv run --env-file ../.env --locked aws ssm start-session --target "$BENCHMARK_INSTANCE"
303306
```
304307

308+
Prepare and publish the queue in that session:
309+
305310
```bash
306-
# On one host, as ec2-user in /opt/pyathena/benchmarks, with a configuration copied to results/fleet.toml
311+
sudo -iu ec2-user
312+
cd /opt/pyathena/benchmarks
313+
export AWS_DEFAULT_REGION=us-west-2
314+
BENCHMARK_STACK_ID=$(cat stack-id.txt)
315+
mkdir -p results
316+
cp config.toml results/fleet.toml # edit scales, timeouts, and concurrency as needed
307317
uv run --no-sync python -m pyathena_bench --config results/fleet.toml prepare \
308318
--stack "$BENCHMARK_STACK_ID" --manifest results/input-large.json --scale large xlarge
309319
uv run --no-sync python -m pyathena_bench --config results/fleet.toml jobs \
@@ -322,7 +332,7 @@ Start a worker on every host from the local machine:
322332
uv run --env-file ../.env --locked aws ssm send-command --instance-ids $BENCHMARK_INSTANCES \
323333
--document-name AWS-RunShellScript \
324334
--parameters 'commands=["sudo -iu ec2-user bash -lc \"cd /opt/pyathena/benchmarks && mkdir -p results && (nohup uv run --no-sync python -m pyathena_bench worker --stack $(cat /opt/pyathena/benchmarks/stack-id.txt) --name large-1 > results/worker-large-1.log 2>&1 &)\""]'
325-
uv run --env-file ../.env --locked python -m pyathena_bench --profile pyathena status \
335+
uv run --env-file ../.env --locked python -m pyathena_bench status \
326336
--stack "$BENCHMARK_STACK" --name large-1
327337
```
328338

0 commit comments

Comments
 (0)