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

Queries over long time ranges balloon index usage #1192

Closed
robskillington opened this issue Nov 21, 2018 · 7 comments
Closed

Queries over long time ranges balloon index usage #1192

robskillington opened this issue Nov 21, 2018 · 7 comments
Labels
area:index All issues pertaining to m3ninx and m3db's index T: Perf T: Reliability

Comments

@robskillington
Copy link
Collaborator

Reported by Yoram Hekma @yhekma

Queries over a long range that return a significant number of IDs (just a single time series seems to be fine) greatly balloon the memory usage of an M3DB usage.

Query (over 14 day range):

sum(rate(nginx_http_requests_total{host="$service"}[1m]))

Estimate of number of time series being returned:

3196

Setup:

2 namespaces, 1 unaggregated with 96h retention and blocksize of 4h, and one aggregated with 336h retention and blocksize of 24h

Memory usage ballooning:
m3db_memory_usage

Heap profile flamegraph shows 16gb consumed in alloc_space for QueryIDs:
screen shot 2018-11-21 at 10 22 38 am

Heap profile:
https://www.dropbox.com/s/viiy934bp67zix8/heap.prof?dl=0

@robskillington robskillington added T: Perf T: Reliability area:index All issues pertaining to m3ninx and m3db's index labels Nov 21, 2018
@favoretti
Copy link

I'll be listening in on this, as @yhekma and myself are on the same team. Thanks for looking into this folks!

@richardartoul
Copy link
Contributor

@favoretti @yhekma

We just tested an index performance improvement that resolves this issue and saw order of magnitude improvements, so we will have a fix for this soon.

We need to contribute code to one of our dependencies (you can follow along in this issue if you like) so it may take a week or two, but this will be resolved soon.

@yhekma
Copy link

yhekma commented Nov 30, 2018

Awesome! Thanks bunches!

@richardartoul
Copy link
Contributor

@yhekma We still have a few more large index performance P.Rs coming in, but I just merged #1238 to master which should really help with the issue you were seeing. If you have a chance to test out master let us know how it looks!

@yhekma
Copy link

yhekma commented Dec 21, 2018

@richardartoul great! I'll test it out tomorrow and will let you know. Thanks again

@yhekma
Copy link

yhekma commented Dec 22, 2018

@richardartoul wow, that make a BIG difference! I think this means this issue can be closed

@richardartoul
Copy link
Contributor

@yhekma Great! @robskillington Has some more very large index performance improvements coming soon so stay tuned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:index All issues pertaining to m3ninx and m3db's index T: Perf T: Reliability
Projects
None yet
Development

No branches or pull requests

4 participants