Page MenuHomePhabricator

Sloth 30-day SLI over-counts errors for our low-traffic SLO, wikilambda-parsoid-combined
Open, Needs TriagePublic

Description

The wikilambda-parsoid-combined SLO has been slowly degrading ever since we switched from memcached to mainstash (which is reasonable, as the service did indeed get slightly slower). However, it's showing as out of error budget on the 30-day window, even though the underlying latency seems to easily meet the objective, so I think this was just the straw that broke the camel's back:

  • slo:sli_error:ratio_rate30d{sloth_slo="wikilambda-parsoid-combined"} = 0.0571 from Explore on Grafana (the SLO is ≤ 0.05)
  • From the raw histogram, the share of calls slower than 100 ms is ~0.3% to 0.7% in each of the last four weeks (increase(…_bucket{le="0.1"}[7d]) ÷ increase(…_count[7d]), with tried offsets of 0, 7, 14 and 21 days).
  • quantile_over_time of slo:sli_error:ratio_rate5m over 30 days: median 0, 90th percentile 0.204.

As I understand the generated rules, the 30-day figure is the unweighted mean of 5-minute ratios. This feature is currently very under-used compared to general MW traffic. With sparse traffic, one slow call in a quiet 5-minute window counts as a large error ratio, so the mean is about 14 times the true figure.

Could we alter the period SLI to compute it from total counts instead (increase(errors[30d]) / increase(total[30d]), or equivalent)? Other low-traffic SLOs may be affected in the same way.