serverutils: don't use tenant mode under bench#83254
serverutils: don't use tenant mode under bench#83254craig[bot] merged 1 commit intocockroachdb:masterfrom
Conversation
|
Friendly ping @cockroachdb/multi-tenant - my reasoning for this change is that it pollutes the output of the benchmarks breaking |
rharding6373
left a comment
There was a problem hiding this comment.
Reviewable status:
complete! 0 of 0 LGTMs obtained (waiting on @ajstorm and @yuzefovich)
pkg/testutils/serverutils/test_server_shim.go line 100 at r1 (raw file):
} if rand.Float64() > probabilityOfStartingDefaultTestTenant || skip.UnderBench() {
Will we want to benchmark multi-tenant separately from non-multi-tenant in the near future? Ideally I think that benchmarks would set the env variable to force tenant or force no tenant.
There was a problem hiding this comment.
Reviewable status:
complete! 0 of 0 LGTMs obtained (waiting on @ajstorm and @rharding6373)
pkg/testutils/serverutils/test_server_shim.go line 100 at r1 (raw file):
Previously, rharding6373 (Rachael Harding) wrote…
Will we want to benchmark multi-tenant separately from non-multi-tenant in the near future? Ideally I think that benchmarks would set the env variable to force tenant or force no tenant.
Quite possibly, I dunno. The current setup is definitely broken for benchmarks, and this is the quick fix. Apart from introducing a way to run benchmarks either via single-tenant or multi-tenant config, we'll also need to suppress the INFO messages about the multi-tenant setup being used (this is what's breaking the benchstat). We also will want to somehow preserve the ability of comparison against 22.1 branches so that 22.2 branch runs the single-tenant for fair comparison.
Thus, addressing this proper will require more thinking and more work, but in the meantime this seems like a reasonable quick fix.
|
Thanks for this "quick fix". That said we should not send this PR and then call it a day. What this PR is effectively saying is that Adam's recent testing PR has "broken" the benchmarks. Some of it is is a regression, but some of it is uncovering an important task we need to schedule for INI-214. There are multiple followup actions here:
This last point is the most important here. I would personally be keen to fix the issues at the top, so that we closely track any performance regressions introduced by multi-tenancy and roadmap the corresponding work. This PR is making us blind to it, and that's not good. cc @ajstorm |
|
Thanks for the write up. To be clear, I'm not suggesting that we merge this fix and call it a day - I'm suggesting restoring the status quo ASAP (for two reasons below) and then discuss how to fix it proper:
Thus, I strongly believe it is worth merging the quick fix ASAP, and then we can discuss how to address the issue proper. My guess is that we will want to run benchmarks in both modes in 22.2 timeframe so that we have comparison against 22.1 (while keeping the names of benchmarks under single-tenant config unchanged) and so that we transition to running only multi-tenant configs in 23.1 time frame. |
|
no objection to merging a quick fix ASAP. I'd just like to ensure we also file the followup work and keep it on the adequate radar in the same action. |
|
Filed #83461. |
ajstorm
left a comment
There was a problem hiding this comment.
Reviewable status:
complete! 0 of 0 LGTMs obtained (waiting on @ajstorm and @rharding6373)
pkg/testutils/serverutils/test_server_shim.go line 100 at r1 (raw file):
Previously, yuzefovich (Yahor Yuzefovich) wrote…
Quite possibly, I dunno. The current setup is definitely broken for benchmarks, and this is the quick fix. Apart from introducing a way to run benchmarks either via single-tenant or multi-tenant config, we'll also need to suppress the INFO messages about the multi-tenant setup being used (this is what's breaking the
benchstat). We also will want to somehow preserve the ability of comparison against 22.1 branches so that 22.2 branch runs the single-tenant for fair comparison.Thus, address this proper will require more thinking and more work, but in the meantime this seems like a reasonable quick fix.
Could we change this so that skip.UnderBench() changes the defaultProbabilityOfStartingTestTenant to 0.0. That way, we could still override it using one of the flags. You might also want to unconditionally skip the INFO message in cases where we're running bench, so that we don't impact benchstat (along with an accompanying comment).
Note also that my review of this caught a problem with my original PR. The default probability above is incorrectly set to 1.0 (it should be 0.5). I did one last run before I merged where I wanted to ensure that I tested everything inside tenants. Unfortunately, I then merged the 1.0 probability instead of reverting it to 0.5. I've got a PR out now to correct that initial bad merge.
ca0963d to
fc512cc
Compare
yuzefovich
left a comment
There was a problem hiding this comment.
Reviewable status:
complete! 0 of 0 LGTMs obtained (waiting on @ajstorm and @rharding6373)
pkg/testutils/serverutils/test_server_shim.go line 100 at r1 (raw file):
Previously, ajstorm (Adam Storm) wrote…
Could we change this so that
skip.UnderBench()changes thedefaultProbabilityOfStartingTestTenantto0.0. That way, we could still override it using one of the flags. You might also want to unconditionally skip theINFOmessage in cases where we're running bench, so that we don't impactbenchstat(along with an accompanying comment).Note also that my review of this caught a problem with my original PR. The default probability above is incorrectly set to 1.0 (it should be 0.5). I did one last run before I merged where I wanted to ensure that I tested everything inside tenants. Unfortunately, I then merged the 1.0 probability instead of reverting it to 0.5. I've got a PR out now to correct that initial bad merge.
Good points, done.
rharding6373
left a comment
There was a problem hiding this comment.
Reviewable status:
complete! 1 of 0 LGTMs obtained (waiting on @ajstorm)
pkg/testutils/serverutils/test_server_shim.go line 100 at r1 (raw file):
Previously, yuzefovich (Yahor Yuzefovich) wrote…
Good points, done.
Looks good.
ajstorm
left a comment
There was a problem hiding this comment.
Reviewable status:
complete! 2 of 0 LGTMs obtained (waiting on @ajstorm and @rharding6373)
This commit makes sure that we don't use the multi-tenant test harness when running the benchmarks by default. This is intended as a temporary fix until we ensure that using the multi-tenant setup doesn't introduce any non-determinism. Additionally, this commit disables logging the INFO message about starting a default tenant when running the benchmarks since those messages break the `benchstat` utility. Release note: None
yuzefovich
left a comment
There was a problem hiding this comment.
TFTRs!
bors r+
Reviewable status:
complete! 0 of 0 LGTMs obtained (and 2 stale) (waiting on @ajstorm and @rharding6373)
|
Build succeeded: |
This commit makes sure that we don't use the multi-tenant test harness
when running the benchmarks by default. This is intended as a
temporary fix until we ensure that using the multi-tenant setup
doesn't introduce any non-determinism.
Additionally, this commit disables logging the INFO message about
starting a default tenant when running the benchmarks since those
messages break the
benchstatutility.Informs: #83461.
Release note: None