-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#21751] YSQL, ASH: Sampling of wait events
Summary: This diff implements sampling of wait events based on the reservoir sampling algorithm (https://en.wikipedia.org/wiki/Reservoir_sampling) We take random `ysql_yb_ash_sample_size` number of events from each component - YSQL, YCQL and TServer. When inserting YSQL samples into the circular buffer, we don't know the the actual number of valid samples, so we cannot calculate the sample weight. So, after inserting all the samples in the circular buffer, we go back and update the sample weight of all the recently inserted samples. The fields flush_and_compaction_wait_states and raft_log_appender_wait_states in PgActiveSessionHistoryResponsePB are deprecated and the background wait states are now part of tserver_wait_states The datatype of sample_weight in ybc_pg_typedefs.h is updated to float which is used is all other places. Upgrade/Rollback safety: The updated protobuf is only for pg to local tserver communication. Jira: DB-10625 Test Plan: ./yb_build.sh --java-test TestYbAsh#testSampleSize Reviewers: jason, amitanand Reviewed By: jason, amitanand Subscribers: yql, hbhanawat, ybase Differential Revision: https://phorge.dev.yugabyte.com/D35804
- Loading branch information
1 parent
6551e45
commit bafa1cb
Showing
15 changed files
with
202 additions
and
69 deletions.
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
Oops, something went wrong.