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
SHOW BACKUP perf degrades severely in case cluster has a relatively large number of tables, even in case a LIMIT is applied to the result set #88376
Comments
cc @cockroachdb/disaster-recovery |
Thanks for the reproduction, the traces in #88293 tell a story! The
As you can see the
You can see the |
Woohoo! |
Is this a regression compared to 22.1? If so, I suspect my recent changes to the |
87533: sqlliveness: add timeouts to heartbeats r=ajwerner a=aadityasondhi Previously, sqlliveness heartbeat operations could block on the transactions that were involved. This change introduces some timeouts of the length of the heartbeat during the create and refresh operations. Resolves #85541 Release note: None Release justification: low-risk bugfix to existing functionality 88293: backupccl: elide expensive ShowCreate call in SHOW BACKUP r=stevendanna a=adityamaru In #88376 we see the call to `ShowCreate` taking ~all the time on a cluster with 2.5K empty tables. In all cases except `SHOW BACKUP SCHEMAS` we do not need to construct the SQL representation of the table's schema. This results in a marked improvement in the performance of `SHOW BACKUP` as can be seen in #88376 (comment). Fixes: #88376 Release note (performance improvement): `SHOW BACKUP` on a backup containing several table descriptors is now more performant 88471: sql/schemachanger: plumb context, check for cancelation sometimes r=ajwerner a=ajwerner Fixes #87246 This will also improve tracing. Release note: None 88557: testserver: add ShareMostTestingKnobsWithTenant option r=msbutler a=stevendanna The new ShareMostTestingKnobs copies nearly all of the testing knobs specified for a TestServer to any tenant started for that server. The goal here is to make it easier to write tests that depend on testing hooks that work under probabilistic tenant testing. Release justification: non-production code change Release note: None 88562: upgrade grpc to v.1.49.0 r=erikgrinaker a=pavelkalinnikov Fixes #81881 Touches #72083 Release note: upgraded grpc to v1.49.0 to fix a few panics that the old version caused 88568: sql: fix panic due to missing schema r=ajwerner a=ajwerner A schema might not exist because it has been dropped. We need to mark the lookup as required. Fixes #87895 Release note (bug fix): Fixed a bug in pg_catalog tables which could result in an internal error if a schema is concurrently dropped. Co-authored-by: David Hartunian <davidh@cockroachlabs.com> Co-authored-by: Aaditya Sondhi <aadityas@cockroachlabs.com> Co-authored-by: adityamaru <adityamaru@gmail.com> Co-authored-by: Andrew Werner <awerner32@gmail.com> Co-authored-by: Steven Danna <danna@cockroachlabs.com> Co-authored-by: Pavel Kalinnikov <pavel@cockroachlabs.com>
In cockroachdb#88376 we see this call taking ~all the time on a cluster with 2.5K empty tables. In all cases except `SHOW BACKUP SCHEMAS` we do not need to construct the SQL representation of the table's schema. This results in a marked improvement in the performance of `SHOW BACKUP` as can be seen in cockroachdb#88376 (comment). Fixes: cockroachdb#88376 Release note (performance improvement): `SHOW BACKUP` on a backup containing several table descriptors is now more performant
Backport 1/1 commits from cockroachdb#88293. /cc @cockroachdb/release In cockroachdb#88376 we see the call to ShowCreate taking ~all the time on a cluster with 2.5K empty tables. In all cases except SHOW BACKUP SCHEMAS we do not need to construct the SQL representation of the table's schema. This results in a marked improvement in the performance of SHOW BACKUP as can be seen in cockroachdb#88376 (comment). Fixes: cockroachdb#88376 Release note (performance improvement): SHOW BACKUP on a backup containing several table descriptors is now more performant Release justification: low risk performance improvement required for the use of schedules in CockroachCloud
Describe the problem
SHOW BACKUP perf degrades severely in case cluster has a relatively large number of tables, even in case a LIMIT is applied to the result set.
To Reproduce
This can be reproduced locally using nodelocal storage as follows.
First, run something like this (I like fish shell lol):
Then get a SQL shell and run:
Note that I am running a custom build from @adityamaru:
Expected behavior
Additional context
Here is an internal link to ticket involving a CC cluster with 10K tables, where
SHOW JOBS
is very slow: https://cockroachlabs.atlassian.net/browse/SREOPS-5221Jira issue: CRDB-19792
The text was updated successfully, but these errors were encountered: