go/vt/mysqlctl{/backupstats}: throttle backupstats for perf#12385
Closed
maxenglander wants to merge 1 commit intovitessio:mainfrom
Closed
go/vt/mysqlctl{/backupstats}: throttle backupstats for perf#12385maxenglander wants to merge 1 commit intovitessio:mainfrom
maxenglander wants to merge 1 commit intovitessio:mainfrom
Conversation
Contributor
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
If a new flag is being introduced:
If a workflow is added or modified:
Bug fixes
Non-trivial changes
New/Existing features
Backward compatibility
|
0eaeeb4 to
65ac8fe
Compare
Collaborator
|
If there is no difference in performance, I'd like us to hold off on merging this PR. |
Collaborator
Author
|
Returning this PR to draft until we have compelling evidence that it's needed. |
4 tasks
Signed-off-by: Max Englander <max@planetscale.com>
65ac8fe to
d865a29
Compare
Contributor
|
This PR is being marked as stale because it has been open for 30 days with no activity. To rectify, you may do any of the following:
If no action is taken within 7 days, this PR will be closed. |
Contributor
|
This PR was closed because it has been stale for 7 days with no activity. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
#11979 added detailed backup/restore metrics, but appeared to add ~4% overhead in a local test. I'm no longer able to reproduce the findings of that test.
In spite of that, this PR attempts to reduce any overhead by throttling stats calls.
Takes inspiration from logutil.ThrottledLogger, but does not drop any stats. Instead batches and and combines unflushed stats and then flushes them either when
Flush()is called by the user, or a subsequent stats call occurs after a user-specified time interval.Performance
A repeat of the performance test in #11979.
I set up the commerce example cluster, and created a table with ~30 GiB of data by repeatedly inserting
REPEAT(UUID(),10), and then ran......multiple times, collecting the value of
vttablet_backup_duration_seconds.Did this with the
maincommit before backupstats was introduced, themaincommit when backupstats was introduced, and theHEADof this PR.main(7fc1b48)main(d5364e6)In the last PR I found that d5364e6 added a bit of overhead 7fc1b48.
In this PR, it's not evident that d5364e6 adds any overhead. It's also not evident that 65ac8fe2 is any improvement to d5364e6.
I'm not sure it makes sense to merge this code, since it's not clear that there's anything to fix.
One possible explanation for getting misleading results in the last PR. I used
BackupShardin the last PR whereas I'm usingBackupagainst a specific tablet in this PR. Correct me if I'm wrong but I think thatBackupShardpicks a random replica tablet. Maybe small differences between replicas could result in different performance results from runs against randomly selected replicas.Related Issue(s)
#11977
#11979
Checklist
was added oris not requiredDeployment Notes