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

Metrics for merge buffer usage #4345

Open
gianm opened this issue May 31, 2017 · 7 comments · May be fixed by #16342
Open

Metrics for merge buffer usage #4345

gianm opened this issue May 31, 2017 · 7 comments · May be fixed by #16342

Comments

@gianm
Copy link
Contributor

gianm commented May 31, 2017

Would be nice to have two metrics for merge buffers, so operators can know if they are frequently maxed out on merge buffers.

  • number of merge buffers currently allocated. I imagine it'd emit the instantaneous number of merge buffers used, once a minute. So it might miss brief spikes but should catch prolonged ones.
  • amount of time spent waiting for a merge buffer. I imagine this would be per query.
@Sarvesh1990
Copy link

Hey. Can I take up this issue? I have recently started using druid in one of my project and really liked the product. I am new to open source so don't want to pick something big at this stage.

@gianm
Copy link
Contributor Author

gianm commented Mar 16, 2018

Hi @Sarvesh1990, definitely!

For the first thing (number of merge buffers allocated), that should probably be the number of merge buffers outstanding at a point in time. For an example of another metric that does this, check jetty/numOpenConnections in JettyServerModule. And then consider adding something similar to DruidProcessingModule.

For the second thing (amount of time spent waiting for a merge buffer), that should probably be a query metric, so the thing to do would be to add a new method like reportMergeBufferWaitTime(long timeNs) to QueryMetrics. And then call it with the amount of time it took to call mergeBufferPool.take() in GroupByMergingQueryRunnerV2.

These could be done as separate PRs since they are not related.

@Sarvesh1990
Copy link

Hey @gianm

Sorry for delay. Had to go out of station for some urgent work.
Please find PR for Point 1 : #5541

Let me know if this works. Will start working on Point 2 now.

@gianm
Copy link
Contributor Author

gianm commented Mar 27, 2018

No worries @Sarvesh1990. I left a review on your PR.

@stale
Copy link

stale bot commented Jun 21, 2019

This issue has been marked as stale due to 280 days of inactivity. It will be closed in 2 weeks if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the dev@druid.apache.org list. Thank you for your contributions.

@stale stale bot added the stale label Jun 21, 2019
@stale
Copy link

stale bot commented Jul 5, 2019

This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time.

@stale stale bot closed this as completed Jul 5, 2019
@TessaIO
Copy link

TessaIO commented Apr 22, 2024

@gianm Can you re-open the issue? I think this is still an important feature to have.

@LakshSingla LakshSingla reopened this Apr 22, 2024
@TessaIO TessaIO linked a pull request Apr 27, 2024 that will close this issue
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants