From 64edfd159c46006a40321ff4b1f9862fe77f8dba 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 | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkg/cmd/roachtest/tests/restore.go b/pkg/cmd/roachtest/tests/restore.go index 9d76abed92b1..153af630903b 100644 --- a/pkg/cmd/roachtest/tests/restore.go +++ b/pkg/cmd/roachtest/tests/restore.go @@ -411,7 +411,17 @@ 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. + // + // TODO(srosenberg): Remove this workaround when 98783 is addressed. + 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.