Skip to content

Commit

Permalink
roachtest: add large node kv tests and batching kv tests
Browse files Browse the repository at this point in the history
This commit adds support for running `kv` with a `--batch` parameter. It
then adds the following new roachtest configurations:
- kv0/enc=false/nodes=3/batch=16
- kv95/enc=false/nodes=3/batch=16
- kv0/enc=false/nodes=3/cpu=96
- kv95/enc=false/nodes=3/cpu=96
- kv50/enc=false/nodes=4/cpu=96/batch=64

The last test is currently skipped because of cockroachdb#34241. I confirmed that
it triggers the corresponding assertion on both AWS and GCE.

My request for more m5d.24xlarge quota just succeeded, but I may need to
request more quota for n1-highcpu-96 VMs for these to run nightly.

Release note: None
  • Loading branch information
nvanbenschoten committed Mar 13, 2019
1 parent e9ec5a3 commit badf44f
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
7 changes: 6 additions & 1 deletion pkg/cmd/roachtest/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -403,8 +403,13 @@ func awsMachineType(cpus int) string {
return "c5d.4xlarge"
case cpus <= 36:
return "c5d.9xlarge"
default:
case cpus <= 72:
return "c5d.18xlarge"
case cpus <= 96:
// There is no c5d.24xlarge.
return "m5d.24xlarge"
default:
panic(fmt.Sprintf("no aws machine type with %d cpus", cpus))
}
}

Expand Down
22 changes: 21 additions & 1 deletion pkg/cmd/roachtest/kv.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ func registerKV(r *registry) {
nodes int
cpus int
readPercent int
batchSize int
blockSize int
encryption bool
}
Expand All @@ -49,6 +50,12 @@ func registerKV(r *registry) {
concurrency := ifLocal("", " --concurrency="+fmt.Sprint(nodes*64))
duration := " --duration=" + ifLocal("10s", "10m")
readPercent := fmt.Sprintf(" --read-percent=%d", opts.readPercent)

var batchSize string
if opts.batchSize > 0 {
batchSize = fmt.Sprintf(" --batch=%d", opts.batchSize)
}

var blockSize string
if opts.blockSize > 0 {
blockSize = fmt.Sprintf(" --min-block-bytes=%d --max-block-bytes=%d",
Expand All @@ -57,7 +64,7 @@ func registerKV(r *registry) {

cmd := fmt.Sprintf(
"./workload run kv --init --splits=1000 --histograms=logs/stats.json"+
concurrency+duration+readPercent+blockSize+" {pgurl:1-%d}",
concurrency+duration+readPercent+batchSize+blockSize+" {pgurl:1-%d}",
nodes)
c.Run(ctx, c.Node(nodes+1), cmd)
return nil
Expand Down Expand Up @@ -86,6 +93,16 @@ func registerKV(r *registry) {
{nodes: 3, cpus: 32, readPercent: 0, blockSize: 1 << 16 /* 64 KB */},
{nodes: 3, cpus: 32, readPercent: 95, blockSize: 1 << 16 /* 64 KB */},

// Configs with large batch sizes.
{nodes: 3, cpus: 8, readPercent: 0, batchSize: 16},
{nodes: 3, cpus: 8, readPercent: 95, batchSize: 16},

// Configs with large nodes.
{nodes: 3, cpus: 96, readPercent: 0},
{nodes: 3, cpus: 96, readPercent: 95},
// Skipped: https://github.com/cockroachdb/cockroach/issues/34241.
// {nodes: 4, cpus: 96, readPercent: 50, batchSize: 64},

// Configs with encryption.
{nodes: 1, cpus: 8, readPercent: 0, encryption: true},
{nodes: 1, cpus: 8, readPercent: 95, encryption: true},
Expand All @@ -101,6 +118,9 @@ func registerKV(r *registry) {
if opts.cpus != 8 { // support legacy test name which didn't include cpu
nameParts = append(nameParts, fmt.Sprintf("cpu=%d", opts.cpus))
}
if opts.batchSize != 0 { // support legacy test name which didn't include batch size
nameParts = append(nameParts, fmt.Sprintf("batch=%d", opts.batchSize))
}
if opts.blockSize != 0 { // support legacy test name which didn't include block size
nameParts = append(nameParts, fmt.Sprintf("size=%dkb", opts.blockSize>>10))
}
Expand Down

0 comments on commit badf44f

Please sign in to comment.