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.
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
Adds search backpressure documentation #1790
Adds search backpressure documentation #1790
Changes from 4 commits
c338f85
41ee97a
3d198ad
45e496d
c5fded6
aed77cb
3f9ac08
e15b8bd
37502a2
678cd57
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I suggest re-wording this slightly.
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.
I suggest re-wording this slightly.
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.
Depending on what all shards failed, it may be possible that OpenSearch returns partial results. Can we re-word this slightly?
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.
Sharing an up-to-date sample cancellation response. Can you please update?
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.
Some of these settings have been renamed. Sharing the latest ones along with simplified descriptions.
search_backpressure.mode
(default monitor_only)The search backpressure mode. Valid values are
monitor_only
,enforced
, ordisabled
.search_backpressure.interval_millis
(default 1 second)The interval at which the observer thread measures the resource usage and cancels tasks.
search_backpressure.cancellation_ratio
(default 10%)The maximum number of tasks to cancel as a fraction of successful task completions.
search_backpressure.cancellation_rate
(default 0.003)The maximum number of tasks to cancel per millisecond of elapsed time.
search_backpressure.cancellation_burst
(default 10)The maximum number of tasks to cancel in a single iteration of the observer thread.
search_backpressure.node_duress.num_successive_breaches
(default 3)The number of of successive limit breaches after which the node is considered under duress.
search_backpressure.node_duress.cpu_threshold
(default 90%)The CPU usage threshold (in percentage) for a node to be considered in duress.
search_backpressure.node_duress.heap_threshold
(default 70%)The heap usage threshold (in percentage) for a node to be considered in duress.
search_backpressure.search_shard_task.total_heap_percent_threshold
(default 5%)The heap usage threshold (in percentage) for the sum of all search shard tasks before cancellation is applied.
search_backpressure.search_shard_task.heap_percent_threshold
(default 0.5%)The heap usage threshold (in percentage) for a single search shard task before it is considered for cancellation.
search_backpressure.search_shard_task.heap_variance
(default 2.0)The minimum variance of a single search shard task's heap usage usage compared to the rolling average of previously completed tasks before it is considered for cancellation.
search_backpressure.search_shard_task.heap_moving_average_window_size
(default 100)The number of previously completed search shard tasks to consider when calculating the moving average of heap usage.
search_backpressure.search_shard_task.cpu_time_millis_threshold
(default 15 seconds)The CPU usage threshold (in milliseconds) for a single search shard task before it is considered for cancellation.
search_backpressure.search_shard_task.elapsed_time_millis_threshold
(default 30 seconds)The elapsed time threshold (in milliseconds) for a single search shard task before it is considered for cancellation.
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.
nit: The response below is with human-readable fields enabled. Can you update this to:
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.
For consistency, either delete the verb "contains" in line 173 and 174 or add a verb to each description in lines 175-177.
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.
nit: Rolling average is not hard-coded to work with just
100
most recent tasks.This is a configurable setting defined by
search_backpressure.search_shard_task.heap_moving_average_window_size
. 100 is just the default value for it.