Skip to content

Commit

Permalink
bench: exempt shared process tenants from rate limits
Browse files Browse the repository at this point in the history
This exempts the tenant from the KV-side tenant limiter. We expect
this to be the default configuration of most shared-process tenants in
the near term. Thus, setting this during benchmark setups provides
more accurate benchmarks.

Epic: none

Release note: None
  • Loading branch information
stevendanna committed Mar 21, 2023
1 parent 0787397 commit b2f9558
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/bench/foreachdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ func benchmarkSharedProcessTenantCockroach(b *testing.B, f BenchmarkFn) {
_, err = db.Exec(`ALTER TENANT ALL SET CLUSTER SETTING "spanconfig.tenant_limit" = 10000000`)
require.NoError(b, err)

// Exempt the tenant from rate limiting. We expect most
// shared-process tenants will run without rate limiting in
// the near term.
_, err = db.Exec(`ALTER TENANT benchtenant GRANT CAPABILITY exempt_from_rate_limiting`)
require.NoError(b, err)

_, err = tenantDB.Exec(`CREATE DATABASE bench`)
require.NoError(b, err)

Expand Down

0 comments on commit b2f9558

Please sign in to comment.