diff --git a/pkg/cmd/roachtest/spec/cluster_spec.go b/pkg/cmd/roachtest/spec/cluster_spec.go index 601856f928f2..57cdda164108 100644 --- a/pkg/cmd/roachtest/spec/cluster_spec.go +++ b/pkg/cmd/roachtest/spec/cluster_spec.go @@ -104,11 +104,16 @@ func awsMachineSupportsSSD(machineType string) bool { return false } -func getAWSOpts(machineType string, zones []string, volumeSize int, localSSD bool) vm.ProviderOpts { +func getAWSOpts( + machineType string, zones []string, volumeSize int, localSSD bool, RAID0 bool, +) vm.ProviderOpts { opts := aws.DefaultProviderOpts() if volumeSize != 0 { opts.DefaultEBSVolume.Disk.VolumeSize = volumeSize } + if RAID0 { + opts.UseMultipleDisks = false // NB: the default is true + } if localSSD { opts.SSDMachineType = machineType } else { @@ -137,12 +142,8 @@ func getGCEOpts( opts.Zones = zones } opts.SSDCount = localSSDCount - if localSSD && localSSDCount > 0 { - // NB: As the default behavior for _roachprod_ (at least in AWS/GCP) is - // to mount multiple disks as a single store using a RAID 0 array, we - // must explicitly ask for multiple stores to be enabled, _unless_ the - // test has explicitly asked for RAID0. - opts.UseMultipleDisks = !RAID0 + if RAID0 { + opts.UseMultipleDisks = false // NB: the default is true, i.e. no RAID0 } opts.TerminateOnMigration = terminateOnMigration @@ -250,7 +251,7 @@ func (s *ClusterSpec) RoachprodOpts( var providerOpts vm.ProviderOpts switch s.Cloud { case AWS: - providerOpts = getAWSOpts(machineType, zones, s.VolumeSize, createVMOpts.SSDOpts.UseLocalSSD) + providerOpts = getAWSOpts(machineType, zones, s.VolumeSize, createVMOpts.SSDOpts.UseLocalSSD, s.RAID0) case GCE: providerOpts = getGCEOpts(machineType, zones, s.VolumeSize, ssdCount, createVMOpts.SSDOpts.UseLocalSSD, s.RAID0, s.TerminateOnMigration) diff --git a/pkg/cmd/roachtest/spec/machine_type.go b/pkg/cmd/roachtest/spec/machine_type.go index af77a4e62e64..286dc6e01704 100644 --- a/pkg/cmd/roachtest/spec/machine_type.go +++ b/pkg/cmd/roachtest/spec/machine_type.go @@ -42,6 +42,9 @@ func AWSMachineType(cpus int, highmem bool) string { } // There is no c5d.24xlarge. + // + // TODO(tbg): there seems to be, see: + // https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/compute-optimized-instances.html if family == "c5d" && size == "24xlarge" { family = "m5d" } diff --git a/pkg/roachprod/vm/aws/aws.go b/pkg/roachprod/vm/aws/aws.go index 2d36c4e04b2e..b18b771dd40f 100644 --- a/pkg/roachprod/vm/aws/aws.go +++ b/pkg/roachprod/vm/aws/aws.go @@ -203,6 +203,7 @@ func DefaultProviderOpts() *ProviderOpts { RemoteUserName: "ubuntu", DefaultEBSVolume: defaultEBSVolumeValue, CreateRateLimit: 2, + UseMultipleDisks: true, // don't default to RAID0 } } diff --git a/pkg/roachprod/vm/gce/gcloud.go b/pkg/roachprod/vm/gce/gcloud.go index 7dd364637f11..7b1efdeb2dbb 100644 --- a/pkg/roachprod/vm/gce/gcloud.go +++ b/pkg/roachprod/vm/gce/gcloud.go @@ -230,6 +230,7 @@ func DefaultProviderOpts() *ProviderOpts { PDVolumeType: "pd-ssd", PDVolumeSize: 500, TerminateOnMigration: false, + UseMultipleDisks: true, // don't default to RAID0 useSharedUser: true, preemptible: false, }