From 77b4ab7b2bc222f1d31b1fed8b81715e3dc31cf5 Mon Sep 17 00:00:00 2001 From: Tobias Schottdorf Date: Fri, 5 Apr 2019 13:56:58 +0200 Subject: [PATCH] roachtest: add tpcc/nodes=5/w=headroom The nodes=3 version does not exercise rebalancing at all. Release note: None --- pkg/cmd/roachtest/tpcc.go | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/pkg/cmd/roachtest/tpcc.go b/pkg/cmd/roachtest/tpcc.go index 57c39151ed3c..d1c663c954d1 100644 --- a/pkg/cmd/roachtest/tpcc.go +++ b/pkg/cmd/roachtest/tpcc.go @@ -159,6 +159,9 @@ var tpccSupportedWarehouses = []struct { {hardware: "gce-n4cpu16", v: version.MustParse(`v2.1.0-0`), warehouses: 1300}, {hardware: "gce-n4cpu16", v: version.MustParse(`v19.1.0-0`), warehouses: 1250}, {hardware: "aws-n4cpu16", v: version.MustParse(`v19.1.0-0`), warehouses: 2100}, + // TODO(tbg): measure the actual number. I just copied n4cpu16, so the real number + // is likely higher. + {hardware: "gce-n6cpu16", v: version.MustParse(`v19.1.0-0`), warehouses: 1250}, } func (r *registry) maxSupportedTPCCWarehouses(cloud string, nodes clusterSpec) int { @@ -201,6 +204,28 @@ func registerTPCC(r *registry) { }) }, }) + r.Add(testSpec{ + // w=headroom runs tpcc for a semi-extended period with some amount of + // headroom, more closely mirroring a real production deployment than + // running with the max supported warehouses. + Name: "tpcc/nodes=5/w=headroom", + // TODO(dan): Backfill tpccSupportedWarehouses and remove this "v2.1.0" + // minimum on gce. + MinVersion: maxVersion("v2.1.0", maybeMinVersionForFixturesImport(cloud)), + // TODO(tbg,danhhz): consider this for release qualification. The nodes=3 + // test does not exercise rebalancing at all. + Tags: []string{`default`}, + Cluster: makeClusterSpec(6, cpu(16)), + Run: func(ctx context.Context, t *test, c *cluster) { + maxWarehouses := r.maxSupportedTPCCWarehouses(cloud, t.spec.Cluster) + headroomWarehouses := int(float64(maxWarehouses) * 0.7) + t.l.Printf("computed headroom warehouses of %d\n", headroomWarehouses) + runTPCC(ctx, t, c, tpccOptions{ + Warehouses: headroomWarehouses, + Duration: 120 * time.Minute, + }) + }, + }) r.Add(testSpec{ Name: "tpcc-nowait/nodes=3/w=1", MinVersion: maybeMinVersionForFixturesImport(cloud),