From 998cd43aff5a4ebf464145be86a2fc1ce2906b04 Mon Sep 17 00:00:00 2001 From: Michael Butler Date: Mon, 27 Mar 2023 15:50:29 -0400 Subject: [PATCH] backupccl: avoid RAID0ing local NVMe and GP3 storage in restore roachtests A long restore roachtest perf investigation revealed that roachprod can RAID0 local storage and AWS GP3 storage, a configuration that does not mix well with CRDB and does not reflect a reasonable customer environment. This patch avoids this RAID0ing in the restore roachtests, stabilizing test performance. Informs #98783 Fixes #97019 Release note: none --- pkg/cmd/roachtest/tests/restore.go | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pkg/cmd/roachtest/tests/restore.go b/pkg/cmd/roachtest/tests/restore.go index 9d76abed92b1..b62564bfeb8d 100644 --- a/pkg/cmd/roachtest/tests/restore.go +++ b/pkg/cmd/roachtest/tests/restore.go @@ -411,7 +411,18 @@ func (hw hardwareSpecs) makeClusterSpecs(r registry.Registry) spec.ClusterSpec { if hw.mem != spec.Auto { clusterOpts = append(clusterOpts, spec.Mem(hw.mem)) } - return r.MakeClusterSpec(hw.nodes, clusterOpts...) + s := r.MakeClusterSpec(hw.nodes, clusterOpts...) + + if s.Cloud == "aws" && s.VolumeSize != 0 { + // Work around an issue that RAID0s local NVMe and GP3 storage together: + // https://github.com/cockroachdb/cockroach/issues/98783. + // + // This should be removed once we have found a real solution that avoids + // ever creating such a RAID. + s.InstanceType = spec.AWSMachineType(s.CPUs, s.Mem) + s.InstanceType = strings.Replace(s.InstanceType, "d.", ".", 1) + } + return s } // String prints the hardware specs. If verbose==true, verbose specs are printed.