-
Notifications
You must be signed in to change notification settings - Fork 470
DOC-13785 Product Change- PR #147169 - release-25.2: add log and metric for identifying clear access direction #19748
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
Open
florence-crl
wants to merge
3
commits into
main
Choose a base branch
from
DOC-13785
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+46
−12
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
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 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
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -71,25 +71,42 @@ This benefit is further amplified by [load-based rebalancing]({% link {{ page.ve | |||||
|
||||||
## Monitor load-based splitting | ||||||
|
||||||
### Log message | ||||||
|
||||||
The [`INFO`]({% link {{ page.version.version }}/logging.md %}#info) log message | ||||||
|
||||||
~~~ | ||||||
no split key found: ... | ||||||
~~~ | ||||||
|
||||||
indicates that CockroachDB wants to [split the range]({% link {{ page.version.version }}/architecture/distribution-layer.md %}#range-splits) due to load, but couldn’t find a key to split at. | ||||||
indicates that CockroachDB attempted to [split the range]({% link {{ page.version.version }}/architecture/distribution-layer.md %}#range-splits) due to load, but could not identify a key at which to split. | ||||||
|
||||||
You can usually ignore this log message. However, if it appears repeatedly, it may indicate a load imbalance in the cluster. A load imbalance might occur if a range cannot be split because it contains a [hotspot]({% link {{ page.version.version }}/understand-hotspots.md %}). For more information about how to reduce hotspots on your cluster, refer to [Understand hotspots]({% link {{ page.version.version }}/understand-hotspots.md %}). | ||||||
|
||||||
The log message ends with one of the following patterns that describe the observed load: | ||||||
|
||||||
1. `popular key detected, clear direction detected` | ||||||
1. `popular key detected, no clear direction` | ||||||
1. `no popular key, clear direction detected` | ||||||
1. `no popular key, no clear direction` | ||||||
|
||||||
Usually this log message can be ignored, unless it repeatedly shows up, which can indicate there is a load imbalance problem in the cluster. If there is a load imbalance problem, it could be because a [hot range]({% link {{ page.version.version }}/ui-hot-ranges-page.md %}) cannot be split (because it's really a [hot key]({% link {{ page.version.version }}/ui-hot-ranges-page.md %}#range-report)). | ||||||
Each pattern indicates the following condition: | ||||||
|
||||||
You can see how often a split key cannot be found over time by looking at the following [time-series metric]({% link {{ page.version.version }}/monitoring-and-alerting.md %}#prometheus-endpoint): | ||||||
* `popular key detected` indicates that a significant percentage of reads or writes targets a single row within the range of data. | ||||||
* `clear direction detected` indicates that accesses within the range progress steadily in one direction, either increasing or decreasing key order, which generally indicates an [index hotspot]({% link {{ page.version.version }}/understand-hotspots.md %}#index-hotspot). | ||||||
|
||||||
- `kv.loadsplitter.nosplitkey` | ||||||
### Metrics | ||||||
|
||||||
This metric is directly related to the log message described above. | ||||||
These [time-series metrics]({% link {{ page.version.version }}/monitoring-and-alerting.md %}#prometheus-endpoint) are directly related to the log message described above. You can monitor how often the load-based splitter fails to find a split key, and whether this is due to a popular key or a clear access direction. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
For more information about how to reduce hotspots (including hot ranges) on your cluster, refer to [Understand hotspots]({% link {{ page.version.version }}/understand-hotspots.md %}). | ||||||
Metric | Description | ||||||
florence-crl marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
-------|------------- | ||||||
`kv.loadsplitter.nosplitkey` | Load-based splitter could not find a split key. | ||||||
`kv.loadsplitter.popularkey` | Load-based splitter could not find a split key and the most popular sampled split key occurs in >= 25% of the samples. | ||||||
`kv.loadsplitter.cleardirection` | Load-based splitter observed an access direction greater than 80% decreasing (left) or increasing (right) in the samples. | ||||||
|
||||||
## See also | ||||||
|
||||||
- [`SET CLUSTER SETTING`]({% link {{ page.version.version }}/set-cluster-setting.md %}) | ||||||
- [Load-based replica rebalancing]({% link {{ page.version.version }}/architecture/replication-layer.md %}#load-based-replica-rebalancing) | ||||||
- [Understand hotspots]({% link {{ page.version.version }}/understand-hotspots.md %}) |
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
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.