Skip to content

Commit

Permalink
Merge #132664
Browse files Browse the repository at this point in the history
132664: roachtest: default sysbench to --rand-type=uniform r=tbg a=tbg

`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


Co-authored-by: Tobias Grieger <[email protected]>
  • Loading branch information
craig[bot] and tbg committed Oct 16, 2024
2 parents 025adb5 + 4a7a55d commit 5da80fc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/cmd/roachtest/tests/sysbench.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 \
Expand All @@ -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 \
Expand All @@ -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,
Expand Down

0 comments on commit 5da80fc

Please sign in to comment.