Bartlomiej Plotka
c4eefd1b3a
storage: Removed SelectSorted method; Simplified interface; Added requirement for remote read to sort response.
...
This is technically BREAKING CHANGE, but it was like this from the beginning: I just notice that we rely in
Prometheus on remote read being sorted. This is because we use selected data from remote reads in MergeSeriesSet
which rely on sorting.
I found during work on https://github.com/prometheus/prometheus/pull/5882 that
we do so many repetitions because of this, for not good reason. I think
I found a good balance between convenience and readability with just one method.
Smaller the interface = better.
Also I don't know what TestSelectSorted was testing, but now it's testing sorting.
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
2020-03-20 21:14:43 +01:00
Julien Pivotto
52630ad0c7
Make head Postings only return series in time range
...
benchmark old ns/op new ns/op delta
BenchmarkQuerierSelect/Head/1of1000000-8 405805161 120436132 -70.32%
BenchmarkQuerierSelect/Head/10of1000000-8 403079620 120624292 -70.07%
BenchmarkQuerierSelect/Head/100of1000000-8 404678647 120923522 -70.12%
BenchmarkQuerierSelect/Head/1000of1000000-8 403145813 118636563 -70.57%
BenchmarkQuerierSelect/Head/10000of1000000-8 405020046 125716206 -68.96%
BenchmarkQuerierSelect/Head/100000of1000000-8 426305002 175808499 -58.76%
BenchmarkQuerierSelect/Head/1000000of1000000-8 619002108 567013003 -8.40%
BenchmarkQuerierSelect/SortedHead/1of1000000-8 1276316086 120281094 -90.58%
BenchmarkQuerierSelect/SortedHead/10of1000000-8 1282631170 121836526 -90.50%
BenchmarkQuerierSelect/SortedHead/100of1000000-8 1325824787 121174967 -90.86%
BenchmarkQuerierSelect/SortedHead/1000of1000000-8 1271386268 121025117 -90.48%
BenchmarkQuerierSelect/SortedHead/10000of1000000-8 1280223345 130838948 -89.78%
BenchmarkQuerierSelect/SortedHead/100000of1000000-8 1271401620 243635515 -80.84%
BenchmarkQuerierSelect/SortedHead/1000000of1000000-8 1360256090 1307744674 -3.86%
BenchmarkQuerierSelect/Block/1of1000000-8 748183120 707888498 -5.39%
BenchmarkQuerierSelect/Block/10of1000000-8 741084129 716317249 -3.34%
BenchmarkQuerierSelect/Block/100of1000000-8 722157273 735624256 +1.86%
BenchmarkQuerierSelect/Block/1000of1000000-8 727587744 731981838 +0.60%
BenchmarkQuerierSelect/Block/10000of1000000-8 727518578 726860308 -0.09%
BenchmarkQuerierSelect/Block/100000of1000000-8 765577046 757382386 -1.07%
BenchmarkQuerierSelect/Block/1000000of1000000-8 1126722881 1084779083 -3.72%
benchmark old allocs new allocs delta
BenchmarkQuerierSelect/Head/1of1000000-8 4000018 24 -100.00%
BenchmarkQuerierSelect/Head/10of1000000-8 4000036 82 -100.00%
BenchmarkQuerierSelect/Head/100of1000000-8 4000216 625 -99.98%
BenchmarkQuerierSelect/Head/1000of1000000-8 4002016 6028 -99.85%
BenchmarkQuerierSelect/Head/10000of1000000-8 4020016 60037 -98.51%
BenchmarkQuerierSelect/Head/100000of1000000-8 4200016 600047 -85.71%
BenchmarkQuerierSelect/Head/1000000of1000000-8 6000016 6000016 +0.00%
BenchmarkQuerierSelect/SortedHead/1of1000000-8 4000055 28 -100.00%
BenchmarkQuerierSelect/SortedHead/10of1000000-8 4000073 87 -100.00%
BenchmarkQuerierSelect/SortedHead/100of1000000-8 4000253 630 -99.98%
BenchmarkQuerierSelect/SortedHead/1000of1000000-8 4002053 6036 -99.85%
BenchmarkQuerierSelect/SortedHead/10000of1000000-8 4020053 60054 -98.51%
BenchmarkQuerierSelect/SortedHead/100000of1000000-8 4200053 600074 -85.71%
BenchmarkQuerierSelect/SortedHead/1000000of1000000-8 6000053 6000053 +0.00%
BenchmarkQuerierSelect/Block/1of1000000-8 6000021 6000021 +0.00%
BenchmarkQuerierSelect/Block/10of1000000-8 6000057 6000057 +0.00%
BenchmarkQuerierSelect/Block/100of1000000-8 6000417 6000417 +0.00%
BenchmarkQuerierSelect/Block/1000of1000000-8 6004017 6004017 +0.00%
BenchmarkQuerierSelect/Block/10000of1000000-8 6040017 6040017 +0.00%
BenchmarkQuerierSelect/Block/100000of1000000-8 6400017 6400017 +0.00%
BenchmarkQuerierSelect/Block/1000000of1000000-8 10000018 10000018 +0.00%
benchmark old bytes new bytes delta
BenchmarkQuerierSelect/Head/1of1000000-8 176001177 1392 -100.00%
BenchmarkQuerierSelect/Head/10of1000000-8 176002329 4368 -100.00%
BenchmarkQuerierSelect/Head/100of1000000-8 176013849 33520 -99.98%
BenchmarkQuerierSelect/Head/1000of1000000-8 176129056 321456 -99.82%
BenchmarkQuerierSelect/Head/10000of1000000-8 177281049 3427376 -98.07%
BenchmarkQuerierSelect/Head/100000of1000000-8 188801049 35055408 -81.43%
BenchmarkQuerierSelect/Head/1000000of1000000-8 304001059 304001049 -0.00%
BenchmarkQuerierSelect/SortedHead/1of1000000-8 229192188 2488 -100.00%
BenchmarkQuerierSelect/SortedHead/10of1000000-8 229193340 5568 -100.00%
BenchmarkQuerierSelect/SortedHead/100of1000000-8 229204860 35536 -99.98%
BenchmarkQuerierSelect/SortedHead/1000of1000000-8 229320060 345104 -99.85%
BenchmarkQuerierSelect/SortedHead/10000of1000000-8 230472060 3894672 -98.31%
BenchmarkQuerierSelect/SortedHead/100000of1000000-8 241992060 40511632 -83.26%
BenchmarkQuerierSelect/SortedHead/1000000of1000000-8 357192060 357192060 +0.00%
BenchmarkQuerierSelect/Block/1of1000000-8 227201516 227201506 -0.00%
BenchmarkQuerierSelect/Block/10of1000000-8 227203057 227203041 -0.00%
BenchmarkQuerierSelect/Block/100of1000000-8 227217161 227217165 +0.00%
BenchmarkQuerierSelect/Block/1000of1000000-8 227358279 227358289 +0.00%
BenchmarkQuerierSelect/Block/10000of1000000-8 228769485 228769475 -0.00%
BenchmarkQuerierSelect/Block/100000of1000000-8 242881487 242881477 -0.00%
BenchmarkQuerierSelect/Block/1000000of1000000-8 384001705 384001705 +0.00%
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-02-20 22:41:46 +01:00
Bartlomiej Plotka
34426766d8
Unify Iterator interfaces. All point to storage now.
...
This is part of https://github.com/prometheus/prometheus/pull/5882 that can be done to simplify things.
All todos I added will be fixed in follow up PRs.
* querier.Querier, querier.Appender, querier.SeriesSet, and querier.Series interfaces merged
with storage interface.go. All imports that.
* querier.SeriesIterator replaced by chunkenc.Iterator
* Added chunkenc.Iterator.Seek method and tests for xor implementation (?)
* Since we properly handle SelectParams for Select methods I adjusted min max
based on that. This should help in terms of performance for queries with functions like offset.
* added Seek to deletedIterator and test.
* storage/tsdb was removed as it was only a unnecessary glue with incompatible structs.
No logic was changed, only different source of abstractions, so no need for benchmarks.
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
2020-02-17 18:03:54 +00:00
Thor
17d8c49919
made stripe size configurable ( #6644 )
...
Signed-off-by: Thor <thansen@digitalocean.com>
2020-01-30 12:42:43 +05:30
Brian Brazil
61262159c4
Simplify benchmark given the new API
...
Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>
2020-01-28 14:38:09 +00:00
Brian Brazil
d682731efc
Extend BenchmarkQuerierSelect to use multiple blocks.
...
Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>
2020-01-28 09:14:56 +00:00
Brian Brazil
1d1732bc25
Add benchmark for Querier.Select over blocks and head.
...
Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>
2019-12-17 18:56:58 +00:00
Brian Brazil
aff9f7a9e8
Extend PostingsForMatchers benchmark to cover Blocks too.
...
Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>
2019-12-11 19:59:31 +00:00