Skip to content

Commit

Permalink
Merge #131662
Browse files Browse the repository at this point in the history
131662: roachtest: add sysbench/oltp_{read_only,write_only,read_write}/nodes=3/cpu=8/conc=64 r=tbg a=tbg

This adds 8vcpu flavors of these select three sysbench flavors.

Epic: none
Release note: None


Co-authored-by: Tobias Grieger <[email protected]>
  • Loading branch information
craig[bot] and tbg committed Oct 2, 2024
2 parents b38c8dd + 1116b40 commit 21eab05
Showing 1 changed file with 26 additions and 10 deletions.
36 changes: 26 additions & 10 deletions pkg/cmd/roachtest/tests/sysbench.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,11 +215,27 @@ func runSysbench(ctx context.Context, t test.Test, c cluster.Cluster, opts sysbe
}

func registerSysbench(r registry.Registry) {
for w := sysbenchWorkload(0); w < numSysbenchWorkloads; w++ {
for _, n := range []int{1, 3} {
const cpus = 32
concPerCPU := n*3 - 1
conc := cpus * concPerCPU
for _, d := range []struct {
n, cpus int
pick func(sysbenchWorkload) bool // nil means true for all
}{
{n: 1, cpus: 32},
{n: 3, cpus: 32},
{n: 3, cpus: 8, pick: func(w sysbenchWorkload) bool {
switch w {
case oltpReadOnly, oltpReadWrite, oltpWriteOnly:
return true
default:
return false
}
}},
} {
for w := sysbenchWorkload(0); w < numSysbenchWorkloads; w++ {
if d.pick != nil && !d.pick(w) {
continue
}
concPerCPU := d.n*3 - 1
conc := d.cpus * concPerCPU
opts := sysbenchOptions{
workload: w,
duration: 10 * time.Minute,
Expand All @@ -229,10 +245,10 @@ func registerSysbench(r registry.Registry) {
}

r.Add(registry.TestSpec{
Name: fmt.Sprintf("sysbench/%s/nodes=%d/cpu=%d/conc=%d", w, n, cpus, conc),
Name: fmt.Sprintf("sysbench/%s/nodes=%d/cpu=%d/conc=%d", w, d.n, d.cpus, conc),
Benchmark: true,
Owner: registry.OwnerTestEng,
Cluster: r.MakeClusterSpec(n+1, spec.CPU(cpus), spec.WorkloadNode(), spec.WorkloadNodeCPU(16)),
Cluster: r.MakeClusterSpec(d.n+1, spec.CPU(d.cpus), spec.WorkloadNode(), spec.WorkloadNodeCPU(16)),
CompatibleClouds: registry.OnlyGCE,
Suites: registry.Suites(registry.Nightly),
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
Expand All @@ -241,14 +257,14 @@ func registerSysbench(r registry.Registry) {
})

// Add a variant of each test that uses PostgreSQL instead of CockroachDB.
if n == 1 {
if d.n == 1 {
pgOpts := opts
pgOpts.usePostgres = true
r.Add(registry.TestSpec{
Name: fmt.Sprintf("sysbench/%s/postgres/cpu=%d/conc=%d", w, cpus, conc),
Name: fmt.Sprintf("sysbench/%s/postgres/cpu=%d/conc=%d", w, d.cpus, conc),
Benchmark: true,
Owner: registry.OwnerTestEng,
Cluster: r.MakeClusterSpec(n+1, spec.CPU(cpus), spec.WorkloadNode(), spec.WorkloadNodeCPU(16)),
Cluster: r.MakeClusterSpec(d.n+1, spec.CPU(d.cpus), spec.WorkloadNode(), spec.WorkloadNodeCPU(16)),
CompatibleClouds: registry.OnlyGCE,
Suites: registry.ManualOnly,
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
Expand Down

0 comments on commit 21eab05

Please sign in to comment.