INDY-1251: change math of spikes detection. #640
Merged
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.
Changed math of node request and cluster throughtput spikes detection.
The main changes:
moving average (EMA), alpha = 2 / (N + 1), where N is a minimal count of
passed periods needed for comparison of expected value and real value, a.g.
learning period. For now N = 15, so alpha = 0.125.
values if we handle more than 10 request per time period, that now is set
to 60 secs (10 requests per minute).
value is treated as normal relative to expected value, previous border coefficient = 3:
new borders coefficient = 10:
Also implemented weighted borders coefficient. It means adaptation of
borders coeffitient to larger values using formula:
weighted_borders_coef = borders_coef / log(expected_val)
Such approach allows to lower borders for larger values. This
functionality is optional and enabled by default.
Signed-off-by: Sergey Shilov [email protected]