-
Notifications
You must be signed in to change notification settings - Fork 473
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
db: add custom profile for open iterators #1597
Comments
Building on top of this profiling mechanism, we could also keep track of when iters were created (and where), and provide a means of introspecting "long lived iters". If we wire that up into Cockroach, I can imagine something like a debug page that prints out all the open iters sorted in descending order of age, along with where they were allocated, and possibly all the other iter stats (bytes scanned, skipped, etc.). |
Linking #1609, cockroachdb/cockroach#68303 and cockroachlabs/support#1403 (internal), as they all would have benefited from the additional observability proposed here. |
Linking cockroachdb/cockroach#71481. |
Linking cockroachdb/cockroach#79879. |
We have marked this issue as stale because it has been inactive for |
Open iterators pin memtables and sstables. Iterators must not be kept open for a long duration to avoid bloating memory or disk space usage. Go supports custom pprof profiles, which we could leverage here. We would
pprof.Profile.Add
when an iterator is opened, andpprof.Profile.Remove
when an iterator is closed, using the iterator pointer itself as thevalue
argument.Tangentially related to #723, another custom profile issue.
The text was updated successfully, but these errors were encountered: