-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
store: add histogram for postings size #5814
Conversation
Add a metric that shows the distribution of how many postings (in bytes) were needed for each Series() call. Useful for determining limits. Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>
9415e19
to
b979361
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, cc @douglascamata
@@ -1137,6 +1146,7 @@ func (s *BucketStore) Series(req *storepb.SeriesRequest, srv storepb.Store_Serie | |||
s.metrics.cachedPostingsCompressionTimeSeconds.WithLabelValues(labelDecode).Add(stats.CachedPostingsDecompressionTimeSum.Seconds()) | |||
s.metrics.cachedPostingsOriginalSizeBytes.Add(float64(stats.CachedPostingsOriginalSizeSum)) | |||
s.metrics.cachedPostingsCompressedSizeBytes.Add(float64(stats.CachedPostingsCompressedSizeSum)) | |||
s.metrics.postingsSizeBytes.Observe(float64(int(stats.PostingsFetchedSizeSum) + int(stats.PostingsTouchedSizeSum))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@GiedriusS: Am I correct in assuming that "touched" means downloaded from cache and "fetched" means downloaded from object storage? Seems like so but I am not sure. 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing to note is that, we also update PostingsTouchedSizeSum
when we write encoded postings back to cache even if we fetch those postings from object storage. I feel like this behavior makes the metric not that accurate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this deserves fixing and its own issue, @yeya24. WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I don't know if this is by design. @GiedriusS Do you know more about this
@GiedriusS thanks a lot for this. 🙇 |
Add a metric that shows the distribution of how many postings (in bytes) were needed for each Series() call. Useful for determining limits. Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com> Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>
Add a metric that shows the distribution of how many postings (in bytes) were needed for each Series() call. Useful for determining limits. Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com> Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>
Add a metric that shows the distribution of how many postings (in bytes) were needed for each Series() call. Useful for determining limits.
Signed-off-by: Giedrius Statkevičius giedrius.statkevicius@vinted.com