Conversation
e184cf1 to
6cf279e
Compare
|
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. |
Max Smythe (maxsmythe)
left a comment
There was a problem hiding this comment.
2 nits, otherwise LGTM
|
|
||
| if [[ -z "${LOCUST_IMAGE_PULL_POLICY:-}" ]]; then | ||
| if [[ "${LOCUST_IMAGE}" =~ ^localhost: ]]; then | ||
| LOCUST_IMAGE_PULL_POLICY="IfNotPresent" |
There was a problem hiding this comment.
Can we just set this to "Always" unless overridden?
|
|
||
| func msFloat(d time.Duration) float64 { return float64(d.Nanoseconds()) / 1e6 } | ||
|
|
||
| func goroutineID() int64 { |
There was a problem hiding this comment.
use library implementation:
substrate/internal/benchmarking/boomer/boomerutil/goroutine.go
Lines 23 to 41 in 7c9ea43
0b4d0cd to
9b57925
Compare
|
/LGTM |
|
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? |
|
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 The second seems more general. |
e4af56f to
ebf834d
Compare
| # 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: |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Deferring to a new pr
There was a problem hiding this comment.
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.
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.
ebf834d to
790145c
Compare
Rebases #1074 (Add benchmarking for storage, by @elijahrb) onto main and runs it with the DurDir load. Replaces #1074.
glutton-storageActorTemplate, which mounts an external CSI volume as glutton's data dir.workloads/deploy.sh --storage-class-name NAMEdeploys it, anddeploy_locust.shpasses the flag through. Without a StorageClass it is not deployed, so clusters with no CSI driver don't wait on its golden snapshot.--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 underCrashCountyet.glutton-storagesets them, so the baseline and DurDir numbers don't change.--sync-writesfsyncs eachWriteDiskfile.--readyz-require-writable-data-dirfails/readyzuntil the data dir is writable, so a resume waits for the volume mount.csi-nfs-scis now defined in one file,hack/third_party/csi-driver-nfs/deploy/example/storageclass-nfs.yaml.ate-setup setup csi nfsandhack/setup-csi-nfs-kind.shboth 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 withhack/install-ate.sh --setup-csi=nfsand pass--storage-class-name csi-nfs-sc.LOCUST_IMAGEorKO_DOCKER_REPO, so they work on Kind with a local registry, andLOCUST_IMAGE_PULL_POLICY(defaultAlways).The orchestrator and
tests.yamldon'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 -raceon the changed packages, golangci-lint, shellcheck and the boilerplate check pass. Not run end to end on a cluster.