Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release-20.2: roachtest/tpcc: don't scatter on each tpccbench search iteration #58051

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 7 additions & 14 deletions pkg/cmd/roachtest/tpcc.go
Original file line number Diff line number Diff line change
Expand Up @@ -623,13 +623,13 @@ func loadTPCCBench(
var rebalanceWait time.Duration
switch b.LoadConfig {
case singleLoadgen:
loadArgs = `--scatter --checks=false`
loadArgs = `--checks=false`
rebalanceWait = time.Duration(b.LoadWarehouses/250) * time.Minute
case singlePartitionedLoadgen:
loadArgs = fmt.Sprintf(`--scatter --checks=false --partitions=%d`, b.partitions())
loadArgs = fmt.Sprintf(`--checks=false --partitions=%d`, b.partitions())
rebalanceWait = time.Duration(b.LoadWarehouses/125) * time.Minute
case multiLoadgen:
loadArgs = fmt.Sprintf(`--scatter --checks=false --partitions=%d --zones="%s"`,
loadArgs = fmt.Sprintf(`--checks=false --partitions=%d --zones="%s"`,
b.partitions(), strings.Join(b.Distribution.zones(), ","))
rebalanceWait = time.Duration(b.LoadWarehouses/50) * time.Minute
default:
Expand All @@ -656,15 +656,9 @@ func loadTPCCBench(
// Split and scatter the tables. Ramp up to the expected load in the desired
// distribution. This should allow for load-based rebalancing to help
// distribute load. Optionally pass some load configuration-specific flags.
method := ""
if b.Chaos {
// For chaos tests, we don't want to use the default method because it
// involves preparing statements on all connections (see #51785).
method = "--method=simple"
}
cmd = fmt.Sprintf("./workload run tpcc --warehouses=%d --workers=%d --max-rate=%d "+
"--wait=false --duration=%s --scatter --tolerate-errors %s {pgurl%s}",
b.LoadWarehouses, b.LoadWarehouses, b.LoadWarehouses/2, rebalanceWait, method, roachNodes)
"--wait=false --duration=%s --scatter --tolerate-errors {pgurl%s}",
b.LoadWarehouses, b.LoadWarehouses, b.LoadWarehouses/2, rebalanceWait, roachNodes)
if out, err := c.RunWithBuffer(ctx, c.l, loadNode, cmd); err != nil {
return errors.Wrapf(err, "failed with output %q", string(out))
}
Expand Down Expand Up @@ -824,10 +818,9 @@ func runTPCCBench(ctx context.Context, t *test, c *cluster, b tpccBenchSpec) {
t.Status(fmt.Sprintf("running benchmark, warehouses=%d", warehouses))
histogramsPath := fmt.Sprintf("%s/warehouses=%d/stats.json", perfArtifactsDir, activeWarehouses)
cmd := fmt.Sprintf("./workload run tpcc --warehouses=%d --active-warehouses=%d "+
"--tolerate-errors --scatter --ramp=%s --duration=%s%s {pgurl%s} "+
"--histograms=%s",
"--tolerate-errors --ramp=%s --duration=%s%s --histograms=%s {pgurl%s}",
b.LoadWarehouses, activeWarehouses, rampDur,
loadDur, extraFlags, sqlGateways, histogramsPath)
loadDur, extraFlags, histogramsPath, sqlGateways)
err := c.RunE(ctx, group.loadNodes, cmd)
loadDone <- timeutil.Now()
if err != nil {
Expand Down