-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sql/multitenancy: cascade
logictest very slow under 3node-tenant
config
#53040
Comments
Adding "-show-logs" to the
Compared to a run on local with what I think is the same statement:
cc @ajwerner do you have an idea of what could be going on? |
cascade
logictest very slow under 3node-tenant
configcascade
logictest very slow under 3node-tenant
config
Smaller repro:
Both child tables need to be created to notice the slow down since the slow down happens during the Here are the
Here are the
It looks like we have a couple of stages where I see a performance difference:
Focusing on (2), there are some interesting time sinks when getting a table descriptor and leases:
An interesting note is that I don't see this slowdown when running these create table statements through an end-to-end tenant demo, so it must be something about this test setup. Some curious log messages where the "node has connected to cluster via gossip". I wondered if sleeping before running the test would make a difference and it seems to do so (this is with a 3s sleep):
But the sleep with the addition of
These are my findings so far. I tried tracing the whole create table, but nothing interesting is showing up. |
Yeah this is totally the rate limiting. Fun! I find that if I up the burst on the rate limit it changes the runtime to 700ms. --- a/pkg/kv/kvserver/tenantrate/settings.go
+++ b/pkg/kv/kvserver/tenantrate/settings.go
@@ -61,7 +61,7 @@ var (
requestBurstLimit = settings.RegisterPositiveIntSetting(
"kv.tenant_rate_limiter.request.burst_limit",
"per-tenant request burst limit in requests",
- 512)
+ 1024) |
Nice find! I assume we can turn this off or just make it very large in logic tests. Is there some verbose logging that would have made this more obvious? |
😬 not currently but I can add slow logging. I'm not sure I want to set the threshold on slow logging to be less than 1s though but I can make it so that we log on all acquisitions with their duration with a vmodule |
Logging with a |
See #53133 |
This can reproduced with running
It seems like each statement takes a few seconds to run. This has been causing some flakes on CI as well. This might be related to #52567.
The text was updated successfully, but these errors were encountered: