-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Tablet throttler: read and use MySQL host metrics #16904
Merged
shlomi-noach
merged 43 commits into
vitessio:main
from
planetscale:throttler-use-mysql-metrics
Nov 20, 2024
Merged
Changes from 38 commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
71d98fe
mysqlctl proto: adding ThrottlerMetrics rpc
shlomi-noach 9922731
naming: SystemMetrics instead of ThrottlerMetrics
shlomi-noach 214db0d
implement SystemMetrics
shlomi-noach 5660b77
tabletmanager: MysqlSystemMetrics rpc
shlomi-noach 2ec9f75
implement SystemMetrics
shlomi-noach 0741a2b
pass TabletAlias to throttler
shlomi-noach 0b3666b
implement MysqlSystemMetrics
shlomi-noach 20e0577
force check result
shlomi-noach df99856
unit test
shlomi-noach a5d76d3
resolved conflict
shlomi-noach 098e6a4
remove bogus files
shlomi-noach 338c52c
Merge branch 'main' into throttler-mysql-metrics
shlomi-noach 4250909
resolved conflict
shlomi-noach 07a3461
remove excessive file, caused by merge conflict
shlomi-noach 2c48d36
Rename 'SystemMetrics'->'HostMetrics'
shlomi-noach 0d73d30
better doclet
shlomi-noach e3fccae
use vtrpcpb.RPCError
shlomi-noach 757cada
"datadir-used-ratio"
shlomi-noach 7dd4b8b
internal refactor: SelfMetricReadParams
shlomi-noach 73fd43f
Merge branch 'main' into throttler-use-mysql-metrics
shlomi-noach 9166093
using threads_running as loadavg does not produce meaningful info on …
shlomi-noach 545112f
adding MysqldLoadAvgMetricName and MysqldDatadirUsedRatioMetricName
shlomi-noach 72b09b9
moredebug info in case of error
shlomi-noach 91d2e42
return empty (zero) result for loadavg when not on linux
shlomi-noach 38b9d73
return empty (zero) result for loadavg when not on linux
shlomi-noach adfcf6d
SelfMetricReadParams includes TabletManagerClient and TabletInfo
shlomi-noach d8b6ec2
pass tmClient and tabletInfo to self metrics
shlomi-noach 6726285
Merge branch 'main' into throttler-use-mysql-metrics
shlomi-noach 79b964f
rename ThrottlerMetricsPublisher->MetricsPublisher
shlomi-noach 838e610
rename MetricsPublisher->metricsPublisher
shlomi-noach 9d9d551
require.Failf
shlomi-noach e25437a
capture iteration number
shlomi-noach 14bae55
clarify intention of test
shlomi-noach 4c097f9
Merge branch 'main' into throttler-use-mysql-metrics
shlomi-noach 80891a0
endtoend check for MySQLHostMetrics, specifically checking for existe…
shlomi-noach 3b45b2b
Merge branch 'main' into throttler-use-mysql-metrics
shlomi-noach 6a37aa2
Merge branch 'main' into throttler-use-mysql-metrics
shlomi-noach 5675ea8
proper multi-word camel case, to export metric names such as Throttle…
shlomi-noach ceb2f81
terminology: PascalCase
shlomi-noach 50f7f27
introduce osutil.LoadAvg function, works on linux and darwin
shlomi-noach c2c3384
use osutil.LoadAvg in both LoadAvgSelfMetric and mysqld.hostMetrics
shlomi-noach b3f3199
1 second caching for loadavg metric
shlomi-noach 8adc7eb
OS-specific build files
shlomi-noach File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do these changes relate to the PR? Is it that we're getting rid of the old
loadavg
OS metric now that we have the newmysql-loadavg
metric and so we wanted to test another MySQL process metric here?Is there any reason that we're not using any of the new MySQL host metrics in the e2e tests? Or am I missing something here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #16904 (comment): it's about tests failing on MacOS machines.
You're not missing anything here. Let me see what we can do for e2e tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added
endtoend
tests that verify the fullMysqlHostMetrics
path don to mysqld, and checking response values. We check the existence of both newmysqld-*
values, and we specifically check thatmysqld-datadir-used-ratio
is non-zero (as can be expected in local hosts and in CI). We do not check the value ofmysqld-loadavg
as that could be arbitrarily low and even appear to be zero, as well as because we do not implement it in MacOS.