Add num-running-compaction-iterators statistic #13299
Draft
+38
−7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
The context for this PR is that I am currently working on a separate project, where I am trying to tune the read request sizes made by
FilePrefetchBuffer
to the storage backend. In this particular case, this means thatFilePrefetchBuffer
would issue large reads and have to buffer larger read responses. At least for the initial rollout, we only want to enable this optimization for compaction reads.I want some way to get a sense of what the memory usage impact would be if the prefetch read request sizes is increased. Actually computing the total amount of memory allocated across
FilePrefetchBuffer
s is possible, and I have another PR for that. However, it is more error prone and still does not give me exactly the information I want.Basically, I want the number of files that compactions are actively reading from. With that information, I can determine how much memory would be used across these
FilePrefetchBuffers
for compaction only.Test Plan