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

MQE: Add support for histogram_quantile #9929

Open
wants to merge 40 commits into
base: main
Choose a base branch
from

Conversation

jhesketh
Copy link
Contributor

@jhesketh jhesketh commented Nov 18, 2024

Tidies up annotation tests and checks their results between engines. (Since sometimes we emit annotations with results, and sometimes the results are omitted when there is an annotation).

What this PR does

Which issue(s) this PR fixes or relates to

Fixes #

Checklist

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

@jhesketh jhesketh requested review from stevesg, grafanabot and a team as code owners November 18, 2024 00:36
Also preps support for more classic histogram functions to come.
(Will require some re-work, but the basics are there).

Tidies up annotation tests and checks their results between engines.
(Since sometimes we emit annotations with results, and sometimes the
results are omitted when there is an annotation).
@jhesketh jhesketh force-pushed the jhesketh/mqe-histogram-quantile branch from 38d1a77 to d293f3a Compare November 18, 2024 00:40
@jhesketh jhesketh force-pushed the jhesketh/mqe-histogram-quantile branch from d89bbab to 78fc811 Compare November 18, 2024 05:45
@jhesketh jhesketh force-pushed the jhesketh/mqe-histogram-quantile branch from 78fc811 to 5abeee0 Compare November 18, 2024 05:46
Copy link
Contributor

@charleskorn charleskorn left a comment

Choose a reason for hiding this comment

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

Still working my way through the implementation and will keep going tomorrow - I have some suggestions for the tests in the meantime

pkg/streamingpromql/engine_test.go Outdated Show resolved Hide resolved
pkg/streamingpromql/engine_test.go Outdated Show resolved Hide resolved
pkg/streamingpromql/engine_test.go Outdated Show resolved Hide resolved
pkg/streamingpromql/engine_test.go Show resolved Hide resolved
pkg/streamingpromql/engine_test.go Outdated Show resolved Hide resolved
pkg/streamingpromql/engine_test.go Outdated Show resolved Hide resolved
pkg/streamingpromql/engine_test.go Show resolved Hide resolved
pkg/streamingpromql/engine_test.go Outdated Show resolved Hide resolved
pkg/streamingpromql/testdata/ours/classic_histograms.test Outdated Show resolved Hide resolved
@jhesketh jhesketh force-pushed the jhesketh/mqe-histogram-quantile branch from c20de2b to 016d546 Compare November 18, 2024 10:01
Copy link
Contributor

@charleskorn charleskorn left a comment

Choose a reason for hiding this comment

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

Nice work 🙂

I'd like to see some benchmark results for this.

pkg/streamingpromql/operators/functions/histograms.go Outdated Show resolved Hide resolved
pkg/streamingpromql/operators/functions/histograms.go Outdated Show resolved Hide resolved
pkg/streamingpromql/operators/functions/histograms.go Outdated Show resolved Hide resolved
pkg/streamingpromql/operators/functions/histograms.go Outdated Show resolved Hide resolved
pkg/streamingpromql/operators/functions/histograms.go Outdated Show resolved Hide resolved
pkg/streamingpromql/operators/functions/histograms.go Outdated Show resolved Hide resolved
Copy link
Contributor

@charleskorn charleskorn left a comment

Choose a reason for hiding this comment

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

This is looking good.

I'd like to see some benchmark results, and I'd also like for
histogram_quantile to go behind a feature flag so we can turn it off if need be - there's a lot of complexity here, and while I can't see any obvious issues, it'd be good to have that available if we need it.

pkg/streamingpromql/operators/functions/histograms.go Outdated Show resolved Hide resolved
pkg/streamingpromql/operators/functions/histograms.go Outdated Show resolved Hide resolved
Copy link
Contributor

@tacole02 tacole02 left a comment

Choose a reason for hiding this comment

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

Thank you!

pkg/streamingpromql/types/limiting_pool.go Outdated Show resolved Hide resolved
pkg/streamingpromql/operators/functions/histograms_test.go Outdated Show resolved Hide resolved
pkg/streamingpromql/config.go Outdated Show resolved Hide resolved
pkg/streamingpromql/engine_test.go Outdated Show resolved Hide resolved
pkg/streamingpromql/operators/functions/histograms.go Outdated Show resolved Hide resolved
pkg/streamingpromql/operators/functions/histograms.go Outdated Show resolved Hide resolved
pkg/streamingpromql/operators/functions/histograms.go Outdated Show resolved Hide resolved
pkg/streamingpromql/operators/functions/histograms.go Outdated Show resolved Hide resolved
pkg/streamingpromql/operators/functions/histograms.go Outdated Show resolved Hide resolved
pkg/streamingpromql/query.go Outdated Show resolved Hide resolved
@jhesketh
Copy link
Contributor Author

Benchmarks:



                                                                               │  Prometheus  │               Mimir                │
                                                                               │    sec/op    │   sec/op     vs base               │
Query/histogram_quantile(0.9,_rate(h_1[5m])),_instant_query-8                     868.1µ ± 1%   808.3µ ± 1%   -6.89% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_1[5m])),_range_query_with_100_steps-8        1.223m ± 1%   1.020m ± 1%  -16.60% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_1[5m])),_range_query_with_1000_steps-8       4.141m ± 1%   2.515m ± 2%  -39.26% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_100[5m])),_instant_query-8                  11.176m ± 2%   9.826m ± 1%  -12.08% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_100[5m])),_range_query_with_100_steps-8      43.83m ± 1%   26.99m ± 1%  -38.43% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_100[5m])),_range_query_with_1000_steps-8     335.0m ± 1%   170.6m ± 1%  -49.08% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_2000[5m])),_instant_query-8                  201.1m ± 1%   191.7m ± 2%   -4.67% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_2000[5m])),_range_query_with_100_steps-8     894.1m ± 1%   530.1m ± 0%  -40.71% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_2000[5m])),_range_query_with_1000_steps-8     7.823 ± 0%    3.335 ± 1%  -57.36% (p=0.002 n=6)
geomean                                                                           46.49m        31.64m       -31.94%

                                                                               │  Prometheus  │                 Mimir                 │
                                                                               │     B/op     │     B/op       vs base                │
Query/histogram_quantile(0.9,_rate(h_1[5m])),_instant_query-8                    37.44Ki ± 0%    29.55Ki ± 0%   -21.09% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_1[5m])),_range_query_with_100_steps-8       46.24Ki ± 0%    56.85Ki ± 0%   +22.96% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_1[5m])),_range_query_with_1000_steps-8      114.4Ki ± 0%    297.0Ki ± 0%  +159.53% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_100[5m])),_instant_query-8                  1.369Mi ± 0%    1.090Mi ± 0%   -20.38% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_100[5m])),_range_query_with_100_steps-8     1.721Mi ± 0%    3.774Mi ± 0%  +119.31% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_100[5m])),_range_query_with_1000_steps-8    4.171Mi ± 0%   27.674Mi ± 0%  +563.43% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_2000[5m])),_instant_query-8                 27.68Mi ± 0%    24.47Mi ± 2%   -11.60% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_2000[5m])),_range_query_with_100_steps-8    35.95Mi ± 5%    82.42Mi ± 1%  +129.27% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_2000[5m])),_range_query_with_1000_steps-8   302.8Mi ± 0%    572.7Mi ± 0%   +89.13% (p=0.002 n=6)
geomean                                                                          2.015Mi         3.402Mi        +68.89%

                                                                               │ Prometheus  │                 Mimir                 │
                                                                               │  allocs/op  │  allocs/op    vs base                 │
Query/histogram_quantile(0.9,_rate(h_1[5m])),_instant_query-8                     636.0 ± 0%     509.5 ± 0%    -19.89% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_1[5m])),_range_query_with_100_steps-8        860.0 ± 0%     936.0 ± 0%     +8.84% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_1[5m])),_range_query_with_1000_steps-8      2.817k ± 0%    4.696k ± 0%    +66.70% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_100[5m])),_instant_query-8                  16.57k ± 0%    13.78k ± 0%    -16.87% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_100[5m])),_range_query_with_100_steps-8     18.59k ± 0%    56.24k ± 0%   +202.49% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_100[5m])),_range_query_with_1000_steps-8    36.04k ± 0%   432.64k ± 0%  +1100.46% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_2000[5m])),_instant_query-8                 323.5k ± 0%    271.8k ± 2%    -15.96% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_2000[5m])),_range_query_with_100_steps-8    359.9k ± 1%   1152.5k ± 0%   +220.24% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_2000[5m])),_range_query_with_1000_steps-8   701.9k ± 0%   8676.7k ± 0%  +1136.15% (p=0.002 n=6)
geomean                                                                          22.36k         50.24k        +124.69%

                                                                               │  Prometheus   │                Mimir                │
                                                                               │       B       │      B        vs base               │
Query/histogram_quantile(0.9,_rate(h_1[5m])),_instant_query-8                     71.10Ki ± 2%   70.05Ki ± 2%        ~ (p=0.065 n=6)
Query/histogram_quantile(0.9,_rate(h_1[5m])),_range_query_with_100_steps-8        69.75Ki ± 1%   69.90Ki ± 2%        ~ (p=0.394 n=6)
Query/histogram_quantile(0.9,_rate(h_1[5m])),_range_query_with_1000_steps-8       67.43Ki ± 2%   70.64Ki ± 1%   +4.76% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_100[5m])),_instant_query-8                   69.49Ki ± 1%   71.07Ki ± 1%   +2.27% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_100[5m])),_range_query_with_100_steps-8      71.05Ki ± 1%   70.97Ki ± 1%        ~ (p=0.937 n=6)
Query/histogram_quantile(0.9,_rate(h_100[5m])),_range_query_with_1000_steps-8     80.08Ki ± 6%   77.82Ki ± 1%   -2.82% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_2000[5m])),_instant_query-8                  79.49Ki ± 3%   82.95Ki ± 1%   +4.34% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_2000[5m])),_range_query_with_100_steps-8    120.86Ki ± 1%   88.96Ki ± 2%  -26.39% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_2000[5m])),_range_query_with_1000_steps-8    300.6Ki ± 0%   136.1Ki ± 1%  -54.73% (p=0.002 n=6)
geomean                                                                           89.86Ki        80.14Ki       -10.81%


The results are obviously concerning. I have not had time to investigate why yet.

@jhesketh
Copy link
Contributor Author

An improvement with more pools:

                                                                               │  Prometheus  │               Mimir                │
                                                                               │    sec/op    │   sec/op     vs base               │
Query/histogram_quantile(0.9,_rate(h_1[5m])),_instant_query-8                     870.0µ ± 1%   820.4µ ± 1%   -5.70% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_1[5m])),_range_query_with_100_steps-8        1.233m ± 2%   1.021m ± 1%  -17.20% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_1[5m])),_range_query_with_1000_steps-8       4.143m ± 1%   2.570m ± 1%  -37.99% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_100[5m])),_instant_query-8                  11.133m ± 1%   9.831m ± 0%  -11.70% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_100[5m])),_range_query_with_100_steps-8      43.57m ± 1%   26.62m ± 1%  -38.89% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_100[5m])),_range_query_with_1000_steps-8     334.6m ± 1%   167.6m ± 1%  -49.90% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_2000[5m])),_instant_query-8                  200.0m ± 1%   192.7m ± 1%   -3.64% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_2000[5m])),_range_query_with_100_steps-8     898.6m ± 1%   518.4m ± 1%  -42.31% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_2000[5m])),_range_query_with_1000_steps-8     7.795 ± 1%    3.309 ± 1%  -57.54% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_1),_instant_query-8                               832.6µ ± 2%   798.8µ ± 0%   -4.06% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_1),_range_query_with_100_steps-8                 1097.2µ ± 1%   962.5µ ± 1%  -12.27% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_1),_range_query_with_1000_steps-8                 3.209m ± 1%   2.234m ± 1%  -30.38% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_100),_instant_query-8                             9.707m ± 1%   9.724m ± 4%        ~ (p=0.485 n=6)
Query/histogram_quantile(0.9,_h_100),_range_query_with_100_steps-8                31.91m ± 1%   22.56m ± 1%  -29.32% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_100),_range_query_with_1000_steps-8               232.1m ± 2%   135.3m ± 1%  -41.68% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_2000),_instant_query-8                            173.0m ± 1%   188.9m ± 1%   +9.21% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_2000),_range_query_with_100_steps-8               661.4m ± 2%   440.0m ± 1%  -33.49% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_2000),_range_query_with_1000_steps-8               5.780 ± 1%    2.658 ± 1%  -54.01% (p=0.002 n=6)
geomean                                                                           41.63m        29.84m       -28.32%

                                                                               │  Prometheus   │                 Mimir                 │
                                                                               │     B/op      │     B/op       vs base                │
Query/histogram_quantile(0.9,_rate(h_1[5m])),_instant_query-8                    37.45Ki ±  0%    29.39Ki ± 0%   -21.50% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_1[5m])),_range_query_with_100_steps-8       46.20Ki ±  0%    39.58Ki ± 0%   -14.32% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_1[5m])),_range_query_with_1000_steps-8      114.4Ki ±  0%    128.1Ki ± 1%   +11.95% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_100[5m])),_instant_query-8                  1.370Mi ±  0%    1.075Mi ± 0%   -21.58% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_100[5m])),_range_query_with_100_steps-8     1.719Mi ±  1%    2.063Mi ± 0%   +20.05% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_100[5m])),_range_query_with_1000_steps-8    4.176Mi ±  1%   10.347Mi ± 1%  +147.80% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_2000[5m])),_instant_query-8                 27.66Mi ±  0%    24.15Mi ± 2%   -12.67% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_2000[5m])),_range_query_with_100_steps-8    35.96Mi ±  0%    46.94Mi ± 3%   +30.54% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_2000[5m])),_range_query_with_1000_steps-8   302.8Mi ±  0%    238.1Mi ± 0%   -21.36% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_1),_instant_query-8                              33.14Ki ±  0%    28.13Ki ± 0%   -15.13% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_1),_range_query_with_100_steps-8                 41.91Ki ±  0%    38.26Ki ± 0%    -8.71% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_1),_range_query_with_1000_steps-8                110.1Ki ±  0%    126.2Ki ± 1%   +14.63% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_100),_instant_query-8                            1.237Mi ±  0%    1.066Mi ± 0%   -13.85% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_100),_range_query_with_100_steps-8               1.590Mi ±  0%    2.053Mi ± 1%   +29.12% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_100),_range_query_with_1000_steps-8              4.041Mi ±  1%   10.289Mi ± 1%  +154.60% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_2000),_instant_query-8                           25.15Mi ±  0%    24.09Mi ± 1%    -4.20% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_2000),_range_query_with_100_steps-8              31.77Mi ± 23%    46.34Mi ± 3%   +45.88% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_2000),_range_query_with_1000_steps-8             300.3Mi ±  0%    237.7Mi ± 0%   -20.83% (p=0.002 n=6)
geomean                                                                          1.938Mi          2.103Mi         +8.55%

                                                                               │ Prometheus  │                Mimir                 │
                                                                               │  allocs/op  │  allocs/op    vs base                │
Query/histogram_quantile(0.9,_rate(h_1[5m])),_instant_query-8                     636.0 ± 0%     507.0 ± 0%   -20.28% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_1[5m])),_range_query_with_100_steps-8        860.0 ± 0%     634.0 ± 0%   -26.28% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_1[5m])),_range_query_with_1000_steps-8      2.816k ± 0%    1.702k ± 0%   -39.56% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_100[5m])),_instant_query-8                  16.57k ± 0%    13.48k ± 0%   -18.68% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_100[5m])),_range_query_with_100_steps-8     18.59k ± 0%    25.96k ± 0%   +39.60% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_100[5m])),_range_query_with_1000_steps-8    36.03k ± 0%   132.48k ± 0%  +267.70% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_2000[5m])),_instant_query-8                 323.5k ± 0%    267.8k ± 1%   -17.23% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_2000[5m])),_range_query_with_100_steps-8    359.9k ± 0%    534.5k ± 1%   +48.52% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_2000[5m])),_range_query_with_1000_steps-8   702.0k ± 0%   2678.6k ± 0%  +281.59% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_1),_instant_query-8                               569.0 ± 0%     478.0 ± 0%   -15.99% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_1),_range_query_with_100_steps-8                  792.0 ± 0%     605.0 ± 0%   -23.61% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_1),_range_query_with_1000_steps-8                2.749k ± 0%    1.674k ± 0%   -39.11% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_100),_instant_query-8                            14.12k ± 0%    13.44k ± 0%    -4.81% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_100),_range_query_with_100_steps-8               16.14k ± 0%    25.91k ± 0%   +60.58% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_100),_range_query_with_1000_steps-8              33.57k ± 0%   132.44k ± 0%  +294.53% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_2000),_instant_query-8                           274.7k ± 0%    266.5k ± 2%    -2.98% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_2000),_range_query_with_100_steps-8              309.7k ± 4%    531.9k ± 1%   +71.73% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_2000),_range_query_with_1000_steps-8             653.6k ± 0%   2678.8k ± 0%  +309.83% (p=0.002 n=6)
geomean                                                                          21.18k         27.53k        +29.97%

                                                                               │  Prometheus   │                Mimir                │
                                                                               │       B       │      B        vs base               │
Query/histogram_quantile(0.9,_rate(h_1[5m])),_instant_query-8                     70.78Ki ± 1%   70.33Ki ± 3%        ~ (p=0.145 n=6)
Query/histogram_quantile(0.9,_rate(h_1[5m])),_range_query_with_100_steps-8        69.94Ki ± 2%   70.23Ki ± 2%        ~ (p=0.818 n=6)
Query/histogram_quantile(0.9,_rate(h_1[5m])),_range_query_with_1000_steps-8       68.25Ki ± 4%   69.76Ki ± 2%   +2.22% (p=0.004 n=6)
Query/histogram_quantile(0.9,_rate(h_100[5m])),_instant_query-8                   70.09Ki ± 0%   71.55Ki ± 1%   +2.08% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_100[5m])),_range_query_with_100_steps-8      71.14Ki ± 2%   71.12Ki ± 1%        ~ (p=0.937 n=6)
Query/histogram_quantile(0.9,_rate(h_100[5m])),_range_query_with_1000_steps-8     80.30Ki ± 5%   75.46Ki ± 1%   -6.03% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_2000[5m])),_instant_query-8                  81.02Ki ± 4%   83.37Ki ± 3%   +2.91% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_2000[5m])),_range_query_with_100_steps-8    121.04Ki ± 5%   88.88Ki ± 3%  -26.57% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_2000[5m])),_range_query_with_1000_steps-8    299.9Ki ± 1%   125.9Ki ± 4%  -58.02% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_1),_instant_query-8                               70.91Ki ± 4%   70.71Ki ± 4%        ~ (p=0.589 n=6)
Query/histogram_quantile(0.9,_h_1),_range_query_with_100_steps-8                  70.35Ki ± 2%   70.84Ki ± 4%        ~ (p=0.589 n=6)
Query/histogram_quantile(0.9,_h_1),_range_query_with_1000_steps-8                 67.94Ki ± 4%   70.78Ki ± 2%   +4.18% (p=0.009 n=6)
Query/histogram_quantile(0.9,_h_100),_instant_query-8                             70.14Ki ± 2%   71.15Ki ± 1%   +1.45% (p=0.026 n=6)
Query/histogram_quantile(0.9,_h_100),_range_query_with_100_steps-8                71.30Ki ± 3%   71.37Ki ± 2%        ~ (p=1.000 n=6)
Query/histogram_quantile(0.9,_h_100),_range_query_with_1000_steps-8               88.03Ki ± 2%   75.57Ki ± 2%  -14.15% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_2000),_instant_query-8                            78.50Ki ± 4%   83.24Ki ± 1%   +6.04% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_2000),_range_query_with_100_steps-8              116.30Ki ± 2%   94.25Ki ± 5%  -18.96% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_2000),_range_query_with_1000_steps-8              299.8Ki ± 1%   127.6Ki ± 4%  -57.44% (p=0.002 n=6)
geomean                                                                           90.40Ki        79.70Ki       -11.84%

Still doesn't scale well because of how we load series time-wise. I'm not sure if we can do much more without fundamental changes :-/

@charleskorn
Copy link
Contributor

charleskorn commented Nov 27, 2024

The thing that stands out to me in the benchmarks is not the peak memory consumption, which looks good, but the number of allocations. Where are all of the allocations happening in the 1000 step cases?

@jhesketh
Copy link
Contributor Author

The thing that stands out to me in the benchmarks is not the peak memory consumption, which looks good, but the number of allocations. Where are all of the allocations happening in the 1000 step cases?

It's related to the bucketSliceBucketedPool

image

@charleskorn
Copy link
Contributor

The thing that stands out to me in the benchmarks is not the peak memory consumption, which looks good, but the number of allocations. Where are all of the allocations happening in the 1000 step cases?

It's related to the bucketSliceBucketedPool

I suspect that defer is becoming heap-allocated (see here for an explanation). What if you try either defering a single function that returns all the slices when computeOutputSeriesForGroup returns, or looping through all of g.pointBuckets just before returning from computeOutputSeriesForGroup?

@jhesketh
Copy link
Contributor Author

Latest benchmark, fixing the heap-allocation of defers.


                                                                               │  Prometheus  │               Mimir                │
                                                                               │    sec/op    │   sec/op     vs base               │
Query/histogram_quantile(0.9,_rate(h_1[5m])),_instant_query-8                     874.2µ ± 2%   819.6µ ± 2%   -6.24% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_1[5m])),_range_query_with_100_steps-8        1.227m ± 1%   1.012m ± 1%  -17.49% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_1[5m])),_range_query_with_1000_steps-8       4.129m ± 0%   2.411m ± 1%  -41.62% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_100[5m])),_instant_query-8                  11.115m ± 1%   9.783m ± 3%  -11.98% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_100[5m])),_range_query_with_100_steps-8      43.53m ± 0%   24.90m ± 1%  -42.80% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_100[5m])),_range_query_with_1000_steps-8     334.7m ± 1%   154.4m ± 1%  -53.88% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_2000[5m])),_instant_query-8                  201.5m ± 1%   191.8m ± 1%   -4.79% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_2000[5m])),_range_query_with_100_steps-8     895.1m ± 1%   481.5m ± 1%  -46.20% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_2000[5m])),_range_query_with_1000_steps-8     7.752 ± 1%    3.057 ± 2%  -60.56% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_1),_instant_query-8                               846.8µ ± 4%   809.1µ ± 1%   -4.46% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_1),_range_query_with_100_steps-8                 1104.9µ ± 3%   953.0µ ± 2%  -13.75% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_1),_range_query_with_1000_steps-8                 3.195m ± 0%   2.090m ± 1%  -34.57% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_100),_instant_query-8                             9.881m ± 2%   9.714m ± 1%   -1.70% (p=0.026 n=6)
Query/histogram_quantile(0.9,_h_100),_range_query_with_100_steps-8                32.01m ± 1%   21.12m ± 2%  -34.01% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_100),_range_query_with_1000_steps-8               233.8m ± 1%   121.8m ± 1%  -47.89% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_2000),_instant_query-8                            172.6m ± 1%   189.1m ± 1%   +9.56% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_2000),_range_query_with_100_steps-8               664.1m ± 1%   408.7m ± 1%  -38.46% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_2000),_range_query_with_1000_steps-8               5.782 ± 1%    2.397 ± 1%  -58.55% (p=0.002 n=6)
geomean                                                                           41.72m        28.55m       -31.58%

                                                                               │   Prometheus   │                Mimir                │
                                                                               │      B/op      │     B/op      vs base               │
Query/histogram_quantile(0.9,_rate(h_1[5m])),_instant_query-8                     37.42Ki ±  0%   29.31Ki ± 0%  -21.67% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_1[5m])),_range_query_with_100_steps-8        46.22Ki ±  0%   33.14Ki ± 0%  -28.30% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_1[5m])),_range_query_with_1000_steps-8      114.44Ki ±  0%   61.93Ki ± 1%  -45.89% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_100[5m])),_instant_query-8                   1.368Mi ±  0%   1.067Mi ± 1%  -22.04% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_100[5m])),_range_query_with_100_steps-8      1.720Mi ±  0%   1.429Mi ± 1%  -16.95% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_100[5m])),_range_query_with_1000_steps-8     4.176Mi ±  2%   4.022Mi ± 1%   -3.68% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_2000[5m])),_instant_query-8                  27.66Mi ±  0%   23.89Mi ± 3%  -13.65% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_2000[5m])),_range_query_with_100_steps-8     35.94Mi ±  5%   34.14Mi ± 5%   -5.01% (p=0.015 n=6)
Query/histogram_quantile(0.9,_rate(h_2000[5m])),_range_query_with_1000_steps-8    302.8Mi ±  0%   114.8Mi ± 0%  -62.08% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_1),_instant_query-8                               33.18Ki ±  0%   28.05Ki ± 0%  -15.46% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_1),_range_query_with_100_steps-8                  41.90Ki ±  0%   31.86Ki ± 1%  -23.96% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_1),_range_query_with_1000_steps-8                110.02Ki ±  0%   60.99Ki ± 1%  -44.56% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_100),_instant_query-8                             1.237Mi ±  0%   1.053Mi ± 1%  -14.85% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_100),_range_query_with_100_steps-8                1.588Mi ±  1%   1.417Mi ± 0%  -10.72% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_100),_range_query_with_1000_steps-8               4.035Mi ±  1%   3.970Mi ± 1%   -1.61% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_2000),_instant_query-8                            25.16Mi ±  0%   23.93Mi ± 1%   -4.86% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_2000),_range_query_with_100_steps-8               31.82Mi ± 12%   33.08Mi ± 3%        ~ (p=0.065 n=6)
Query/histogram_quantile(0.9,_h_2000),_range_query_with_1000_steps-8              300.3Mi ±  0%   114.8Mi ± 0%  -61.76% (p=0.002 n=6)
geomean                                                                           1.937Mi         1.457Mi       -24.78%

                                                                               │ Prometheus  │               Mimir                │
                                                                               │  allocs/op  │  allocs/op   vs base               │
Query/histogram_quantile(0.9,_rate(h_1[5m])),_instant_query-8                     636.0 ± 0%    505.5 ± 0%  -20.52% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_1[5m])),_range_query_with_100_steps-8        860.0 ± 0%    532.0 ± 0%  -38.14% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_1[5m])),_range_query_with_1000_steps-8      2816.0 ± 0%    689.5 ± 0%  -75.51% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_100[5m])),_instant_query-8                  16.57k ± 0%   13.37k ± 0%  -19.28% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_100[5m])),_range_query_with_100_steps-8     18.59k ± 0%   15.82k ± 0%  -14.91% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_100[5m])),_range_query_with_1000_steps-8    36.04k ± 0%   31.52k ± 0%  -12.55% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_2000[5m])),_instant_query-8                 323.7k ± 0%   264.7k ± 2%  -18.23% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_2000[5m])),_range_query_with_100_steps-8    359.9k ± 1%   314.8k ± 1%  -12.53% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_2000[5m])),_range_query_with_1000_steps-8   702.0k ± 0%   668.5k ± 0%   -4.77% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_1),_instant_query-8                               569.0 ± 0%    477.0 ± 0%  -16.17% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_1),_range_query_with_100_steps-8                  792.5 ± 0%    504.0 ± 0%  -36.40% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_1),_range_query_with_1000_steps-8                2749.0 ± 0%    662.0 ± 0%  -75.92% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_100),_instant_query-8                            14.11k ± 0%   13.34k ± 0%   -5.52% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_100),_range_query_with_100_steps-8               16.14k ± 0%   15.78k ± 0%   -2.19% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_100),_range_query_with_1000_steps-8              33.57k ± 0%   31.46k ± 0%   -6.28% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_2000),_instant_query-8                           275.0k ± 0%   263.1k ± 2%   -4.32% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_2000),_range_query_with_100_steps-8              309.7k ± 1%   316.5k ± 1%   +2.20% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_2000),_range_query_with_1000_steps-8             653.7k ± 0%   668.3k ± 0%   +2.22% (p=0.002 n=6)
geomean                                                                          21.18k        15.86k       -25.12%

                                                                               │   Prometheus   │                Mimir                │
                                                                               │       B        │      B        vs base               │
Query/histogram_quantile(0.9,_rate(h_1[5m])),_instant_query-8                     69.98Ki ±  2%   70.49Ki ± 2%        ~ (p=0.485 n=6)
Query/histogram_quantile(0.9,_rate(h_1[5m])),_range_query_with_100_steps-8        70.07Ki ±  2%   70.07Ki ± 3%        ~ (p=0.853 n=6)
Query/histogram_quantile(0.9,_rate(h_1[5m])),_range_query_with_1000_steps-8       67.52Ki ±  2%   68.88Ki ± 2%   +2.02% (p=0.015 n=6)
Query/histogram_quantile(0.9,_rate(h_100[5m])),_instant_query-8                   70.19Ki ±  1%   71.61Ki ± 1%   +2.03% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_100[5m])),_range_query_with_100_steps-8      69.68Ki ±  2%   70.99Ki ± 2%        ~ (p=0.093 n=6)
Query/histogram_quantile(0.9,_rate(h_100[5m])),_range_query_with_1000_steps-8     80.29Ki ±  1%   73.95Ki ± 2%   -7.90% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_2000[5m])),_instant_query-8                  80.93Ki ±  4%   83.51Ki ± 2%   +3.19% (p=0.004 n=6)
Query/histogram_quantile(0.9,_rate(h_2000[5m])),_range_query_with_100_steps-8    120.41Ki ±  4%   88.57Ki ± 2%  -26.44% (p=0.002 n=6)
Query/histogram_quantile(0.9,_rate(h_2000[5m])),_range_query_with_1000_steps-8    300.0Ki ±  1%   114.4Ki ± 1%  -61.87% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_1),_instant_query-8                               70.79Ki ±  2%   69.76Ki ± 3%        ~ (p=0.132 n=6)
Query/histogram_quantile(0.9,_h_1),_range_query_with_100_steps-8                  69.64Ki ±  3%   69.14Ki ± 3%        ~ (p=0.485 n=6)
Query/histogram_quantile(0.9,_h_1),_range_query_with_1000_steps-8                 68.55Ki ±  3%   69.07Ki ± 2%        ~ (p=0.818 n=6)
Query/histogram_quantile(0.9,_h_100),_instant_query-8                             70.32Ki ±  1%   71.18Ki ± 1%   +1.23% (p=0.015 n=6)
Query/histogram_quantile(0.9,_h_100),_range_query_with_100_steps-8                71.07Ki ±  1%   71.40Ki ± 1%        ~ (p=0.485 n=6)
Query/histogram_quantile(0.9,_h_100),_range_query_with_1000_steps-8               88.48Ki ±  1%   74.91Ki ± 3%  -15.34% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_2000),_instant_query-8                            74.44Ki ± 11%   83.17Ki ± 2%  +11.72% (p=0.009 n=6)
Query/histogram_quantile(0.9,_h_2000),_range_query_with_100_steps-8              115.90Ki ±  7%   87.96Ki ± 4%  -24.11% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_2000),_range_query_with_1000_steps-8              297.1Ki ±  1%   113.5Ki ± 1%  -61.79% (p=0.002 n=6)
geomean                                                                           89.85Ki         77.99Ki       -13.20%


@jhesketh
Copy link
Contributor Author

Latest benchmarks, including native histograms:


                                                                      │  Prometheus  │               Mimir                │
                                                                      │    sec/op    │   sec/op     vs base               │
Query/histogram_quantile(0.9,_h_1),_instant_query-8                      827.8µ ± 1%   803.3µ ± 2%   -2.95% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_1),_range_query_with_100_steps-8        1090.7µ ± 0%   937.2µ ± 1%  -14.07% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_1),_range_query_with_1000_steps-8        3.194m ± 1%   2.041m ± 0%  -36.11% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_100),_instant_query-8                    9.690m ± 5%   9.710m ± 1%        ~ (p=0.699 n=6)
Query/histogram_quantile(0.9,_h_100),_range_query_with_100_steps-8       32.05m ± 1%   20.80m ± 0%  -35.13% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_100),_range_query_with_1000_steps-8      233.4m ± 1%   119.5m ± 1%  -48.82% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_2000),_instant_query-8                   173.5m ± 1%   187.3m ± 1%   +7.98% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_2000),_range_query_with_100_steps-8      659.2m ± 2%   402.1m ± 0%  -39.00% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_2000),_range_query_with_1000_steps-8      5.830 ± 0%    2.351 ± 1%  -59.68% (p=0.002 n=6)
Query/histogram_quantile(0.9,_nh_1),_instant_query-8                     856.0µ ± 1%   823.1µ ± 1%   -3.83% (p=0.002 n=6)
Query/histogram_quantile(0.9,_nh_1),_range_query_with_100_steps-8       1072.3µ ± 2%   972.7µ ± 2%   -9.29% (p=0.002 n=6)
Query/histogram_quantile(0.9,_nh_1),_range_query_with_1000_steps-8       2.908m ± 2%   2.307m ± 2%  -20.67% (p=0.002 n=6)
Query/histogram_quantile(0.9,_nh_100),_instant_query-8                   12.35m ± 2%   12.41m ± 1%        ~ (p=0.093 n=6)
Query/histogram_quantile(0.9,_nh_100),_range_query_with_100_steps-8      30.58m ± 3%   26.34m ± 2%  -13.87% (p=0.002 n=6)
Query/histogram_quantile(0.9,_nh_100),_range_query_with_1000_steps-8     228.2m ± 2%   152.5m ± 2%  -33.16% (p=0.002 n=6)
Query/histogram_quantile(0.9,_nh_2000),_instant_query-8                  223.1m ± 1%   225.4m ± 1%   +1.07% (p=0.041 n=6)
Query/histogram_quantile(0.9,_nh_2000),_range_query_with_100_steps-8     699.0m ± 2%   501.3m ± 2%  -28.28% (p=0.002 n=6)
Query/histogram_quantile(0.9,_nh_2000),_range_query_with_1000_steps-8     5.559 ± 1%    3.009 ± 1%  -45.88% (p=0.002 n=6)
geomean                                                                  38.04m        28.96m       -23.86%

                                                                      │  Prometheus   │                Mimir                │
                                                                      │     B/op      │     B/op      vs base               │
Query/histogram_quantile(0.9,_h_1),_instant_query-8                      33.16Ki ± 0%   28.04Ki ± 0%  -15.44% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_1),_range_query_with_100_steps-8         41.92Ki ± 0%   31.86Ki ± 0%  -24.01% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_1),_range_query_with_1000_steps-8       110.06Ki ± 0%   60.88Ki ± 1%  -44.69% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_100),_instant_query-8                    1.238Mi ± 0%   1.057Mi ± 0%  -14.59% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_100),_range_query_with_100_steps-8       1.588Mi ± 0%   1.413Mi ± 1%  -11.03% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_100),_range_query_with_1000_steps-8      4.044Mi ± 1%   3.967Mi ± 1%   -1.91% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_2000),_instant_query-8                   25.16Mi ± 0%   23.95Mi ± 2%   -4.79% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_2000),_range_query_with_100_steps-8      31.73Mi ± 0%   33.03Mi ± 5%        ~ (p=0.065 n=6)
Query/histogram_quantile(0.9,_h_2000),_range_query_with_1000_steps-8     300.2Mi ± 0%   114.4Mi ± 0%  -61.90% (p=0.002 n=6)
Query/histogram_quantile(0.9,_nh_1),_instant_query-8                     41.14Ki ± 0%   37.68Ki ± 0%   -8.39% (p=0.002 n=6)
Query/histogram_quantile(0.9,_nh_1),_range_query_with_100_steps-8        138.9Ki ± 0%   126.1Ki ± 0%   -9.24% (p=0.002 n=6)
Query/histogram_quantile(0.9,_nh_1),_range_query_with_1000_steps-8       992.1Ki ± 0%   893.9Ki ± 0%   -9.89% (p=0.002 n=6)
Query/histogram_quantile(0.9,_nh_100),_instant_query-8                   1.141Mi ± 0%   1.086Mi ± 1%   -4.86% (p=0.002 n=6)
Query/histogram_quantile(0.9,_nh_100),_range_query_with_100_steps-8     10.913Mi ± 0%   9.415Mi ± 0%  -13.73% (p=0.002 n=6)
Query/histogram_quantile(0.9,_nh_100),_range_query_with_1000_steps-8    100.45Mi ± 0%   85.23Mi ± 0%  -15.15% (p=0.002 n=6)
Query/histogram_quantile(0.9,_nh_2000),_instant_query-8                  22.31Mi ± 1%   21.44Mi ± 0%   -3.92% (p=0.002 n=6)
Query/histogram_quantile(0.9,_nh_2000),_range_query_with_100_steps-8     222.2Mi ± 1%   191.3Mi ± 0%  -13.91% (p=0.002 n=6)
Query/histogram_quantile(0.9,_nh_2000),_range_query_with_1000_steps-8    1.993Gi ± 0%   1.667Gi ± 0%  -16.37% (p=0.002 n=6)
geomean                                                                  3.715Mi        3.089Mi       -16.85%

                                                                      │ Prometheus  │               Mimir                │
                                                                      │  allocs/op  │  allocs/op   vs base               │
Query/histogram_quantile(0.9,_h_1),_instant_query-8                      569.0 ± 0%    477.0 ± 0%  -16.17% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_1),_range_query_with_100_steps-8         793.0 ± 0%    504.0 ± 0%  -36.44% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_1),_range_query_with_1000_steps-8       2749.0 ± 0%    661.5 ± 0%  -75.94% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_100),_instant_query-8                   14.12k ± 0%   13.34k ± 0%   -5.53% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_100),_range_query_with_100_steps-8      16.14k ± 0%   15.78k ± 0%   -2.25% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_100),_range_query_with_1000_steps-8     33.57k ± 0%   31.46k ± 0%   -6.29% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_2000),_instant_query-8                  274.7k ± 0%   265.8k ± 2%   -3.22% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_2000),_range_query_with_100_steps-8     309.7k ± 0%   315.7k ± 1%   +1.93% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_2000),_range_query_with_1000_steps-8    653.7k ± 0%   668.0k ± 0%   +2.19% (p=0.002 n=6)
Query/histogram_quantile(0.9,_nh_1),_instant_query-8                     714.0 ± 0%    629.0 ± 0%  -11.90% (p=0.002 n=6)
Query/histogram_quantile(0.9,_nh_1),_range_query_with_100_steps-8       2.179k ± 0%   1.801k ± 0%  -17.35% (p=0.002 n=6)
Query/histogram_quantile(0.9,_nh_1),_range_query_with_1000_steps-8      14.80k ± 0%   11.73k ± 0%  -20.78% (p=0.002 n=6)
Query/histogram_quantile(0.9,_nh_100),_instant_query-8                  19.30k ± 0%   19.01k ± 0%   -1.50% (p=0.002 n=6)
Query/histogram_quantile(0.9,_nh_100),_range_query_with_100_steps-8     130.1k ± 0%   129.7k ± 0%   -0.35% (p=0.002 n=6)
Query/histogram_quantile(0.9,_nh_100),_range_query_with_1000_steps-8    1.131M ± 0%   1.122M ± 0%   -0.80% (p=0.002 n=6)
Query/histogram_quantile(0.9,_nh_2000),_instant_query-8                 375.2k ± 0%   372.2k ± 0%   -0.81% (p=0.002 n=6)
Query/histogram_quantile(0.9,_nh_2000),_range_query_with_100_steps-8    2.577M ± 0%   2.591M ± 0%   +0.54% (p=0.002 n=6)
Query/histogram_quantile(0.9,_nh_2000),_range_query_with_1000_steps-8   22.42M ± 0%   22.43M ± 0%   +0.01% (p=0.002 n=6)
geomean                                                                 45.67k        39.16k       -14.26%

                                                                      │  Prometheus   │                Mimir                │
                                                                      │       B       │      B        vs base               │
Query/histogram_quantile(0.9,_h_1),_instant_query-8                      70.62Ki ± 1%   70.27Ki ± 1%        ~ (p=0.240 n=6)
Query/histogram_quantile(0.9,_h_1),_range_query_with_100_steps-8         69.56Ki ± 3%   69.60Ki ± 2%        ~ (p=0.729 n=6)
Query/histogram_quantile(0.9,_h_1),_range_query_with_1000_steps-8        67.79Ki ± 1%   69.04Ki ± 2%   +1.84% (p=0.015 n=6)
Query/histogram_quantile(0.9,_h_100),_instant_query-8                    69.89Ki ± 1%   71.25Ki ± 0%   +1.95% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_100),_range_query_with_100_steps-8       71.40Ki ± 1%   71.04Ki ± 1%        ~ (p=0.240 n=6)
Query/histogram_quantile(0.9,_h_100),_range_query_with_1000_steps-8      88.10Ki ± 2%   74.69Ki ± 1%  -15.22% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_2000),_instant_query-8                   78.81Ki ± 2%   82.52Ki ± 2%   +4.71% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_2000),_range_query_with_100_steps-8     116.46Ki ± 1%   88.37Ki ± 4%  -24.11% (p=0.002 n=6)
Query/histogram_quantile(0.9,_h_2000),_range_query_with_1000_steps-8     297.8Ki ± 1%   112.5Ki ± 2%  -62.24% (p=0.002 n=6)
Query/histogram_quantile(0.9,_nh_1),_instant_query-8                     78.46Ki ± 2%   77.82Ki ± 4%        ~ (p=0.180 n=6)
Query/histogram_quantile(0.9,_nh_1),_range_query_with_100_steps-8        73.61Ki ± 1%   72.67Ki ± 1%   -1.27% (p=0.041 n=6)
Query/histogram_quantile(0.9,_nh_1),_range_query_with_1000_steps-8       73.43Ki ± 1%   72.76Ki ± 1%        ~ (p=0.143 n=6)
Query/histogram_quantile(0.9,_nh_100),_instant_query-8                   72.67Ki ± 2%   72.96Ki ± 1%        ~ (p=0.699 n=6)
Query/histogram_quantile(0.9,_nh_100),_range_query_with_100_steps-8      77.10Ki ± 1%   71.82Ki ± 1%   -6.84% (p=0.002 n=6)
Query/histogram_quantile(0.9,_nh_100),_range_query_with_1000_steps-8    160.37Ki ± 1%   75.02Ki ± 1%  -53.22% (p=0.002 n=6)
Query/histogram_quantile(0.9,_nh_2000),_instant_query-8                  75.69Ki ± 1%   75.21Ki ± 1%        ~ (p=0.310 n=6)
Query/histogram_quantile(0.9,_nh_2000),_range_query_with_100_steps-8    242.94Ki ± 5%   82.50Ki ± 1%  -66.04% (p=0.002 n=6)
Query/histogram_quantile(0.9,_nh_2000),_range_query_with_1000_steps-8   1306.0Ki ± 3%   132.3Ki ± 1%  -89.87% (p=0.002 n=6)
geomean                                                                  107.5Ki        78.86Ki       -26.63%


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.

3 participants