Registry Mirror
Skip to content

Conversation

@anishgang

@anishgang anishgang commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

Rebases #1074 (Add benchmarking for storage, by @elijahrb) onto main and runs it with the DurDir load. Replaces #1074.

  • Adds the glutton-storage ActorTemplate, which mounts an external CSI volume as glutton's data dir. workloads/deploy.sh --storage-class-name NAME deploys it, and deploy_locust.sh passes the flag through. Without a StorageClass it is not deployed, so clusters with no CSI driver don't wait on its golden snapshot.
  • The DurDir load drives it with --durdir-template glutton-storage. DurDir already resumes an actor, writes a file, checks the file's checksum after every resume, and suspends the actor again, so the storage benchmark needs no load of its own. DurDir does not count crashed actors under CrashCount yet.
  • glutton gets two opt-in flags. Only glutton-storage sets them, so the baseline and DurDir numbers don't change. --sync-writes fsyncs each WriteDisk file. --readyz-require-writable-data-dir fails /readyz until the data dir is writable, so a resume waits for the volume mount.
  • csi-nfs-sc is now defined in one file, hack/third_party/csi-driver-nfs/deploy/example/storageclass-nfs.yaml. ate-setup setup csi nfs and hack/setup-csi-nfs-kind.sh both apply it instead of each carrying a copy, so the e2e tests, demos and benchmarks use the same class. A test checks this. To benchmark on NFS, install with hack/install-ate.sh --setup-csi=nfs and pass --storage-class-name csi-nfs-sc.
  • The Locust scripts take LOCUST_IMAGE or KO_DOCKER_REPO, so they work on Kind with a local registry, and LOCUST_IMAGE_PULL_POLICY (default Always).

The orchestrator and tests.yaml don't change. Letting a test set a StorageClass or apply extra manifests moves to a follow-up PR, where the test API can be worked out.

Testing: unit tests for the glutton flags and the shared StorageClass. go test -race on the changed packages, golangci-lint, shellcheck and the boilerplate check pass. Not run end to end on a cluster.

  • Tests pass

@anishgang

Copy link
Copy Markdown
Collaborator Author

Two fixes to the storage benchmark. I found them by testing the benchmark locally with the NFS CSI driver, because the Filestore volume pool isn't handing out volumes yet. Both fixes are in the benchmark code itself, so they apply to the volume pool the same way.
1. Writes were going nowhere (d2cbb37)
The router now finds an actor using the ate-target-actor header. The storage benchmark was still using the old Host name, so the router couldn't tell which actor a write was for. Every write failed with a 404, and we got no write numbers. It now sends the header, like the other glutton benchmarks do.
2. A crashed actor caused a flood of retries (0b4d0cd)
When a resume failed, the benchmark retried right away with no pause. After one actor crashed, that turned into about 25,000 failed calls in 2 minutes, which loads the API for no reason and hides the real numbers. Now it always waits between tries, and it stops sending requests to an actor once it has crashed.

@maxsmythe Max Smythe (maxsmythe) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 nits, otherwise LGTM

Comment thread benchmarking/locust/deploy.sh Outdated

if [[ -z "${LOCUST_IMAGE_PULL_POLICY:-}" ]]; then
if [[ "${LOCUST_IMAGE}" =~ ^localhost: ]]; then
LOCUST_IMAGE_PULL_POLICY="IfNotPresent"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just set this to "Always" unless overridden?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.


func msFloat(d time.Duration) float64 { return float64(d.Nanoseconds()) / 1e6 }

func goroutineID() int64 {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use library implementation:

// goroutineID extracts the runtime's per-goroutine ID via the standard
// runtime.Stack trick. Used to key per-VU state because boomer's Task model
// has no built-in per-VU hook — see the runtime.shutdown comment for the
// limitation this implies on user-count rescale.
func GoroutineID() int64 {
var buf [64]byte
n := runtime.Stack(buf[:], false)
line := string(buf[:n])
const prefix = "goroutine "
if !strings.HasPrefix(line, prefix) {
return 0
}
end := strings.IndexByte(line[len(prefix):], ' ')
if end < 0 {
return 0
}
id, _ := strconv.ParseInt(line[len(prefix):len(prefix)+end], 10, 64)
return id
}

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@maxsmythe Max Smythe (maxsmythe) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@maxsmythe
Max Smythe (maxsmythe) added this pull request to the merge queue Oct 5, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Oct 5, 2026
@maxsmythe
Max Smythe (maxsmythe) added this pull request to the merge queue Oct 5, 2026
@hajiler

hajiler commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator

/LGTM

@msau42
Michelle Au (msau42) removed this pull request from the merge queue due to a manual request Oct 5, 2026
@msau42

Copy link
Copy Markdown
Collaborator

Sorry I took the PR out of the queue.

I think we don't want to put gcp-specific configs into substrate. Max Smythe (@maxsmythe) is there a better place we can put this?

@maxsmythe

Copy link
Copy Markdown
Collaborator

Good point.

Is it just the storage class that is cloud-specific? If so, we can maybe add the YAML as a test parameter and embed it as a field in the test YAML... slightly hacky but very flexible and not too bad with short manifests.

Another option would be to point to manifest files entirely outside the test (e.g. something that lives next to tests.yaml) and add an argument like additional manifests or something like that to the orchestrator.

The second seems more general.

Comment thread benchmarking/automation/orchestrator.py Outdated
# Storage suites set storageClassName in tests.yaml, which makes deploy.sh
# add the glutton-storage template; without it, the template is not
# deployed.
if storage_class_name:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like maybe it is a test-specific config?

Parnika Mandewalkar (@pmandewalkar) this is a good example of tests needing to configure deployments.

Can we figure out what a good API is here? We might need to create a short-term shim to support it.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deferring to a new pr

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you move this to third-party nfs directory and replace the setup script to use it? https://github.com/agent-substrate/substrate/pull/1371/changes#diff-723612044d4f93795e6cf5f97702853bdd842df035d498f2b15698277a7fa4a2R101-R104

I want to make sure that we are using the same nfs storage class across testing.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

hajiler and others added 10 commits October 8, 2026 20:56
The storage benchmark addressed its actor through the Host header
(<actor>.<atespace>.actors.resources.substrate.ate.dev). The atenet
router no longer routes on Host: it reads the ate-target-actor header
("<atespace>/<actor>"), as the other glutton workers already send.

Without the header, the router could not tell which actor a write was
for and answered every GluttonWriteDisk with 404 "invalid actor
reference", so the benchmark measured no disk writes at all. Send the
header the router expects, and drop the unused Host value.
When ResumeActor failed, the storage benchmark returned without its
wait between iterations, and boomer called it again straight away. Once
an actor crashed, every later resume failed the same way, so a single
crashed actor turned into a tight loop: about 25,000 failed ResumeActor
calls in two minutes. That put needless load on ateapi and drowned the
real resume latencies in the stats.

Wait on every path, as the glutton benchmark does. When ateapi reports
the actor as crashed, count it once under CrashCount and stop sending it
requests, so a crash shows up as a crash instead of as thousands of
failed resumes.
LOCUST_IMAGE_PULL_POLICY now defaults to Always for every image, and
setting the variable still overrides it. The default image tag is
:latest, so IfNotPresent could start a stale cached image.

The storage benchmark had its own copy of goroutineID. It now calls
boomerutil.GoroutineID, the shared helper the other boomer user
classes already use.
@anishgang anishgang changed the title Add benchmarking for storage on a Filestore volume pool Benchmark external volumes with the DurDir load Oct 8, 2026

@maxsmythe Max Smythe (maxsmythe) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@maxsmythe
Max Smythe (maxsmythe) added this pull request to the merge queue Oct 10, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 10, 2026
@maxsmythe
Max Smythe (maxsmythe) added this pull request to the merge queue Oct 13, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 13, 2026
@maxsmythe
Max Smythe (maxsmythe) added this pull request to the merge queue Oct 13, 2026
Merged via the queue into agent-substrate:main with commit be3aa28 Oct 13, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/benchmarking area/storage kind/feature An enhancement / feature request or implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants