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

Upgraded Prometheus to further optimize ingester Push() on limits exceeded #3973

Merged

Conversation

pracucci
Copy link
Contributor

What this PR does:
I've got an optimization merged in Prometheus prometheus/prometheus#8620, so in this PR I'm upgrading it to pick up the benefits:

name                                                                                             old time/op    new time/op    delta
_Ingester_v2PushOnError/failure:_out_of_order_samples,_scenario:_no_concurrency-12                  284µs ± 1%     296µs ±10%     ~     (p=0.222 n=5+5)
_Ingester_v2PushOnError/failure:_out_of_order_samples,_scenario:_low_concurrency-12                6.08ms ± 6%    6.34ms ± 9%     ~     (p=0.548 n=5+5)
_Ingester_v2PushOnError/failure:_out_of_order_samples,_scenario:_high_concurrency-12               70.1ms ±21%    71.4ms ± 4%     ~     (p=0.310 n=5+5)
_Ingester_v2PushOnError/failure:_per-user_series_limit_reached,_scenario:_high_concurrency-12       188ms ±12%     149ms ±11%  -20.76%  (p=0.008 n=5+5)
_Ingester_v2PushOnError/failure:_per-user_series_limit_reached,_scenario:_no_concurrency-12         647µs ±12%     458µs ± 1%  -29.22%  (p=0.008 n=5+5)
_Ingester_v2PushOnError/failure:_per-user_series_limit_reached,_scenario:_low_concurrency-12       17.1ms ± 4%    11.4ms ± 7%  -33.40%  (p=0.008 n=5+5)
_Ingester_v2PushOnError/failure:_per-metric_series_limit_reached,_scenario:_no_concurrency-12       715µs ± 1%     559µs ± 2%  -21.80%  (p=0.008 n=5+5)
_Ingester_v2PushOnError/failure:_per-metric_series_limit_reached,_scenario:_low_concurrency-12     30.8ms ± 7%    27.8ms ±12%     ~     (p=0.056 n=5+5)
_Ingester_v2PushOnError/failure:_per-metric_series_limit_reached,_scenario:_high_concurrency-12     331ms ± 8%     316ms ± 4%     ~     (p=0.222 n=5+5)
_Ingester_v2PushOnError/failure:_out_of_bound_samples,_scenario:_no_concurrency-12                  308µs ± 1%     294µs ± 1%   -4.51%  (p=0.008 n=5+5)
_Ingester_v2PushOnError/failure:_out_of_bound_samples,_scenario:_low_concurrency-12                8.38ms ±12%    7.99ms ±10%     ~     (p=0.421 n=5+5)
_Ingester_v2PushOnError/failure:_out_of_bound_samples,_scenario:_high_concurrency-12               83.8ms ± 5%    85.4ms ±11%     ~     (p=0.690 n=5+5)

name                                                                                             old alloc/op   new alloc/op   delta
_Ingester_v2PushOnError/failure:_out_of_order_samples,_scenario:_no_concurrency-12                 2.11kB ± 1%    2.23kB ± 1%   +5.71%  (p=0.008 n=5+5)
_Ingester_v2PushOnError/failure:_out_of_order_samples,_scenario:_low_concurrency-12                 339kB ±30%     369kB ±37%     ~     (p=0.690 n=5+5)
_Ingester_v2PushOnError/failure:_out_of_order_samples,_scenario:_high_concurrency-12               26.2MB ±81%    34.5MB ±46%     ~     (p=0.421 n=5+5)
_Ingester_v2PushOnError/failure:_per-user_series_limit_reached,_scenario:_high_concurrency-12       455MB ±10%     140MB ±30%  -69.24%  (p=0.008 n=5+5)
_Ingester_v2PushOnError/failure:_per-user_series_limit_reached,_scenario:_no_concurrency-12         406kB ± 0%     100kB ± 0%  -75.50%  (p=0.008 n=5+5)
_Ingester_v2PushOnError/failure:_per-user_series_limit_reached,_scenario:_low_concurrency-12       41.7MB ± 0%    10.5MB ± 1%  -74.81%  (p=0.008 n=5+5)
_Ingester_v2PushOnError/failure:_per-metric_series_limit_reached,_scenario:_no_concurrency-12       407kB ± 0%     100kB ± 0%  -75.29%  (p=0.008 n=5+5)
_Ingester_v2PushOnError/failure:_per-metric_series_limit_reached,_scenario:_low_concurrency-12     41.8MB ± 2%    10.1MB ± 1%  -75.76%  (p=0.008 n=5+5)
_Ingester_v2PushOnError/failure:_per-metric_series_limit_reached,_scenario:_high_concurrency-12     420MB ± 2%     117MB ± 0%  -72.23%  (p=0.016 n=5+4)
_Ingester_v2PushOnError/failure:_out_of_bound_samples,_scenario:_no_concurrency-12                 99.0kB ± 0%    99.2kB ± 0%   +0.26%  (p=0.016 n=4+5)
_Ingester_v2PushOnError/failure:_out_of_bound_samples,_scenario:_low_concurrency-12                10.4MB ± 1%    10.4MB ± 1%     ~     (p=0.690 n=5+5)
_Ingester_v2PushOnError/failure:_out_of_bound_samples,_scenario:_high_concurrency-12                117MB ±22%     145MB ±27%     ~     (p=0.222 n=5+5)

name                                                                                             old allocs/op  new allocs/op  delta
_Ingester_v2PushOnError/failure:_out_of_order_samples,_scenario:_no_concurrency-12                   40.0 ± 0%      41.0 ± 0%   +2.50%  (p=0.008 n=5+5)
_Ingester_v2PushOnError/failure:_out_of_order_samples,_scenario:_low_concurrency-12                 4.37k ± 8%     4.50k ±11%     ~     (p=0.690 n=5+5)
_Ingester_v2PushOnError/failure:_out_of_order_samples,_scenario:_high_concurrency-12                 118k ±60%      144k ±37%     ~     (p=0.421 n=5+5)
_Ingester_v2PushOnError/failure:_per-user_series_limit_reached,_scenario:_high_concurrency-12       5.23M ± 0%     2.15M ± 7%  -58.94%  (p=0.016 n=4+5)
_Ingester_v2PushOnError/failure:_per-user_series_limit_reached,_scenario:_no_concurrency-12         5.04k ± 0%     2.03k ± 0%     ~     (p=0.079 n=4+5)
_Ingester_v2PushOnError/failure:_per-user_series_limit_reached,_scenario:_low_concurrency-12         507k ± 0%      205k ± 0%  -59.55%  (p=0.008 n=5+5)
_Ingester_v2PushOnError/failure:_per-metric_series_limit_reached,_scenario:_no_concurrency-12       5.04k ± 0%     2.04k ± 0%  -59.51%  (p=0.008 n=5+5)
_Ingester_v2PushOnError/failure:_per-metric_series_limit_reached,_scenario:_low_concurrency-12       509k ± 1%      204k ± 0%  -59.82%  (p=0.008 n=5+5)
_Ingester_v2PushOnError/failure:_per-metric_series_limit_reached,_scenario:_high_concurrency-12     5.06M ± 1%     2.04M ± 0%  -59.62%  (p=0.008 n=5+5)
_Ingester_v2PushOnError/failure:_out_of_bound_samples,_scenario:_no_concurrency-12                  2.04k ± 0%     2.04k ± 0%   +0.05%  (p=0.008 n=5+5)
_Ingester_v2PushOnError/failure:_out_of_bound_samples,_scenario:_low_concurrency-12                  206k ± 0%      206k ± 0%     ~     (p=0.690 n=5+5)
_Ingester_v2PushOnError/failure:_out_of_bound_samples,_scenario:_high_concurrency-12                2.10M ± 4%     2.19M ± 6%     ~     (p=0.222 n=5+5)

Which issue(s) this PR fixes:
N/A

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Signed-off-by: Marco Pracucci <marco@pracucci.com>
@pracucci pracucci requested a review from pstibrany March 18, 2021 17:16
Signed-off-by: Marco Pracucci <marco@pracucci.com>
Copy link
Contributor

@bboreham bboreham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Signed-off-by: Marco Pracucci <marco@pracucci.com>
Copy link
Contributor

@gouthamve gouthamve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pracucci pracucci merged commit ccdbe91 into cortexproject:master Mar 19, 2021
@pracucci pracucci deleted the upgrade-prometheus-to-pick-up-8620 branch March 19, 2021 13:49
@pracucci pracucci mentioned this pull request Mar 22, 2021
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants