From 12b32a58b13d118fcb83defc004c55e598ff1609 Mon Sep 17 00:00:00 2001 From: Steven Danna Date: Wed, 7 Jun 2023 10:07:58 +0100 Subject: [PATCH] roachtest: disable scheduled backups during tpccbench We originally enabled the scheduled backups for tpccbench by reasoning that backups were like any other background task. These tests don't disable GC or auto stats jobs, why should they disable backups? Here, we reverse that decision. The tpccbench tests are designed to find the maximum tpcc warehouse count that a cluster can reach. As such, they push the cluster to high resource utilisation, leaving little overhead for backups. While it is true that a user would also need to take backups, they have the option of scheduling backups for times at which they aren't at peak traffic. Further, the tpccbench tests run tpccbench multiple times in an attempt to search for the max warehouse count. Making it a bit harder to understand the impact of the every-15-minute schedule on the results. Epic: none Release note: None --- pkg/cmd/roachtest/tests/tpcc.go | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/pkg/cmd/roachtest/tests/tpcc.go b/pkg/cmd/roachtest/tests/tpcc.go index 9c8745af25c0..1edcc85aa0b7 100644 --- a/pkg/cmd/roachtest/tests/tpcc.go +++ b/pkg/cmd/roachtest/tests/tpcc.go @@ -828,6 +828,13 @@ func registerTPCC(r registry.Registry) { LoadWarehouses: 1000, EstimatedMax: gceOrAws(cloud, 750, 900), }) + registerTPCCBenchSpec(r, tpccBenchSpec{ + Nodes: 3, + CPUs: 4, + EnableDefaultScheduledBackup: true, + LoadWarehouses: 1000, + EstimatedMax: gceOrAws(cloud, 750, 900), + }) registerTPCCBenchSpec(r, tpccBenchSpec{ Nodes: 3, CPUs: 16, @@ -1022,7 +1029,8 @@ type tpccBenchSpec struct { // Encryption-At-Rest / EAR). EncryptionEnabled bool // ExpirationLeases enables use of expiration-based leases. - ExpirationLeases bool + ExpirationLeases bool + EnableDefaultScheduledBackup bool } // partitions returns the number of partitions specified to the load generator. @@ -1042,6 +1050,7 @@ func (s tpccBenchSpec) partitions() int { // startOpts returns any extra start options that the spec requires. func (s tpccBenchSpec) startOpts() (option.StartOpts, install.ClusterSettings) { startOpts := option.DefaultStartOpts() + startOpts.RoachprodOpts.ScheduleBackups = s.EnableDefaultScheduledBackup settings := install.MakeClusterSettings() // Facilitate diagnosing out-of-memory conditions in tpccbench runs. // See https://github.com/cockroachdb/cockroach/issues/75071. @@ -1065,6 +1074,9 @@ func registerTPCCBenchSpec(r registry.Registry, b tpccBenchSpec) { if b.Chaos { nameParts = append(nameParts, "chaos") } + if b.EnableDefaultScheduledBackup { + nameParts = append(nameParts, "backups=true") + } opts := []spec.Option{spec.CPU(b.CPUs)} if b.HighMem {