-
Notifications
You must be signed in to change notification settings - Fork 357
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
Use query insead of query_range when we do not need full data. #2736
Use query insead of query_range when we do not need full data. #2736
Conversation
@miq-bot add_label bug, compute/containers, gaprindashvili/yes @simon3z @moolitayer @zeari @himdel @martinpovolny please review https://bugzilla.redhat.com/show_bug.cgi?id=1511402 target: 5.9.0 |
@joelddiaz @ilackarms , this may have impact on the OPS effort, PTAL |
…theus proxy service
fcd6234
to
510fc86
Compare
Checked commit yaacov@510fc86 with ruby 2.3.3, rubocop 0.47.1, haml-lint 0.20.0, and yamllint 1.10.0 |
👍 this should definitely help with the timeouts we were seeing last week |
@ilackarms can you make an image with this, so @joelddiaz can test it in the wild and compare with an image without this fix ? |
Code looks good, has anyone tested this? (EngLab-prometheus gives me |
Checking EngLab-prometheus ... a moment :-) |
@himdel sorry about that, machines are up now. |
Perfect, thanks! :) LGTM, I'm getting the same set of tags :). |
@yaacov Just a note here though... on my dev setup, this makes the time go from about 5.89 seconds on master to about 6.12s with this PR. (But not sure if this is statistically significant or anything, just not seeing that huge performance gain ;).) |
@himdel I have a small setup, on @joelddiaz machine this made a big improvement, but we only tested this query vs query_range, once on a "real" machine. |
…-to-get-metrics-tags Use query insead of query_range when we do not need full data. (cherry picked from commit 6b6a87e) https://bugzilla.redhat.com/show_bug.cgi?id=1514523
Gaprindashvili backport details:
|
Compute > Containers > Providers - click a provider - toolbar Monitoring > Ad Hoc Metrics
Description
The ad hoc page use a the same query from Prometheus to get data and to get only labels.
We query labels for all the metrics in the system, this query may take a lot of time (e.g. more then 10s) on large system scales.
This PR changes the query we use when we only want labels. Now we use the less stressful
query
instead ofquery_range
, when we do not need to get data.More info
On my small system this reduced query time from 900ms to 600ms, on bigger systems this can change from several s' to the ms' range.
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1511402
Screenshots
Before, query takes ~900ms on my very small system:
After, query takes ~600ms on my very small system: