Skip to content

Commit

Permalink
roachtest: add tpcc roachperf test variants to stress encryption
Browse files Browse the repository at this point in the history
Currently, certain KV roachperf variants run with Encryption-At-Rest
(EAR) support (i.e. `enc=true`). Expand the test variants to include
three basic TPC-C configurations with EAR enabled:
- 3 nodes, 4 vCPU
- 3 nodes, 16 vCPU
- 12 nodes, 16 vCPU

Release note: None.
  • Loading branch information
nicktrav committed Mar 2, 2023
1 parent 65752af commit 61a4a0f
Showing 1 changed file with 42 additions and 7 deletions.
49 changes: 42 additions & 7 deletions pkg/cmd/roachtest/tests/tpcc.go
Original file line number Diff line number Diff line change
Expand Up @@ -961,6 +961,9 @@ type tpccBenchSpec struct {
MinVersion string
// Tags to pass to testRegistryImpl.Add.
Tags []string
// EncryptionSupport determines if the benchmark uses encrypted stores (i.e.
// Encryption-At-Rest / EAR).
EncryptionSupport bool
}

// partitions returns the number of partitions specified to the load generator.
Expand Down Expand Up @@ -1029,6 +1032,12 @@ func registerTPCCBenchSpec(r registry.Registry, b tpccBenchSpec) {
panic("unexpected")
}

encryptionSupport := registry.EncryptionAlwaysDisabled
if b.EncryptionSupport {
encryptionSupport = registry.EncryptionAlwaysEnabled
nameParts = append(nameParts, "enc=true")
}

name := strings.Join(nameParts, "/")

numNodes := b.Nodes + b.LoadConfig.numLoadNodes(b.Distribution)
Expand All @@ -1040,13 +1049,11 @@ func registerTPCCBenchSpec(r registry.Registry, b tpccBenchSpec) {
}

r.Add(registry.TestSpec{
Name: name,
Owner: owner,
Cluster: nodes,
Tags: b.Tags,
// NB: intentionally not enabling encryption-at-rest to produce
// consistent results.
EncryptionSupport: registry.EncryptionAlwaysDisabled,
Name: name,
Owner: owner,
Cluster: nodes,
Tags: b.Tags,
EncryptionSupport: encryptionSupport,
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
runTPCCBench(ctx, t, c, b)
},
Expand Down Expand Up @@ -1501,6 +1508,34 @@ func registerTPCCBench(r registry.Registry) {
LoadWarehouses: 10000,
EstimatedMax: 8000,
},

// Encryption-At-Rest benchmarks. These are duplicates of variants above,
// using encrypted stores.
{
Nodes: 3,
CPUs: 4,

LoadWarehouses: 1000,
EstimatedMax: 325,
EncryptionSupport: true,
},
{
Nodes: 3,
CPUs: 16,

LoadWarehouses: 2000,
EstimatedMax: 1300,
EncryptionSupport: true,
},
{
Nodes: 12,
CPUs: 16,

LoadWarehouses: 10000,
EstimatedMax: 6000,
LoadConfig: singlePartitionedLoadgen,
EncryptionSupport: true,
},
}

for _, b := range specs {
Expand Down

0 comments on commit 61a4a0f

Please sign in to comment.