From 4a7a55d4db5f451ad0d630e04712d9412c39ad74 Mon Sep 17 00:00:00 2001 From: Tobias Grieger Date: Tue, 15 Oct 2024 10:51:29 -0400 Subject: [PATCH] roachtest: default sysbench to --rand-type=uniform `sysbench` at 1.0.20 (the latest release) uses its own "special" built-in rand-type. This has hotspots and is generally unpleasant and poorly understood. Vendors generally recommend using `uniform`[1], which we now default to (I'll add a roachperf annotation). In addition, the next release of sysbench - should it ever come, it's been four years - will _remove_ the "special" distribution and default to uniform as well. [^1]: https://docs.pingcap.com/tidb/stable/benchmark-tidb-using-sysbench Epic: none Release note: None --- pkg/cmd/roachtest/tests/sysbench.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkg/cmd/roachtest/tests/sysbench.go b/pkg/cmd/roachtest/tests/sysbench.go index cfbe6a2a9fbb..c7342690ff27 100644 --- a/pkg/cmd/roachtest/tests/sysbench.go +++ b/pkg/cmd/roachtest/tests/sysbench.go @@ -60,6 +60,7 @@ func (w sysbenchWorkload) String() string { type sysbenchOptions struct { workload sysbenchWorkload + distribution string // default `uniform` duration time.Duration concurrency int tables int @@ -74,6 +75,10 @@ func (o *sysbenchOptions) cmd(haproxy bool) string { pghost = "127.0.0.1" pgport = "26257" } + distribution := "uniform" + if o.distribution != "" { + distribution = o.distribution + } return fmt.Sprintf(`sysbench \ --db-driver=pgsql \ --pgsql-host=%s \ @@ -82,6 +87,7 @@ func (o *sysbenchOptions) cmd(haproxy bool) string { --pgsql-password=%s \ --pgsql-db=sysbench \ --report-interval=1 \ + --rand-type=%s \ --time=%d \ --threads=%d \ --tables=%d \ @@ -92,6 +98,7 @@ func (o *sysbenchOptions) cmd(haproxy bool) string { pgport, install.DefaultUser, install.DefaultPassword, + distribution, int(o.duration.Seconds()), o.concurrency, o.tables,