Skip to content
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

INDY-1251: change math of spikes detection. #640

Merged
merged 1 commit into from
Apr 19, 2018

Conversation

sergey-shilov
Copy link
Contributor

Changed math of node request and cluster throughtput spikes detection.
The main changes:

  • Now smothing constant (alpha) is really constant as declares exponential
    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.
  • Rised min activity from 2 to 10, a.g. we start to compare expected and real
    values if we handle more than 10 request per time period, that now is set
    to 60 secs (10 requests per minute).
  • Rised borders coefficient to extend the lower and higher borders when observed
    value is treated as normal relative to expected value, previous border coefficient = 3:
    • lower border: expected_val / 3
    • higher border: expected_val * 3
      new borders coefficient = 10:
    • lower border: expected_val / 10
    • higher border: expected_val * 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 sergey.shilov@dsr-company.com

Changed math of node request and cluster throughtput spikes detection.
The main changes:
 * Now smothing constant (alpha) is really constant as declares exponential
   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.
 * Rised min activity from 2 to 10, a.g. we start to compare expected and real
   values if we handle more than 10 request per time period, that now is set
   to 60 secs (10 requests per minute).
 * Rised borders coefficient to extend the lower and higher borders when observed
   value is treated as normal relative to expected value, previous border coefficient = 3:
    - lower border:  expected_val / 3
    - higher border: expected_val * 3
   new borders coefficient = 10:
    - lower border:  expected_val / 10
    - higher border: expected_val * 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 <sergey.shilov@dsr-company.com>
@ashcherbakov ashcherbakov merged commit 199d930 into hyperledger:master Apr 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants