New issue
Advanced search Search tips

Issue 750812 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 1
Type: Feature

Blocking:
issue 750751



Sign in to add a comment

Track leveldb iterators for memory-infra.

Project Member Reported by cmumford@chromium.org, Jul 31 2017

Issue description

Create a class, similar to DBTracker, for tracking instances of leveldb::iterator. This will likely involve instrumenting LevelDBIterator and possibly creating a common leveldb::iterator wrapper so that all iterators are reported.
 
Labels: -Type-Task Type-Feature
Blocking: 750751
Status: Started (was: Assigned)
Labels: Needs-Feedback
Owner: dskiba@chromium.org
dskiba@ There's no API, and no good way to obtain the amount of memory used by a leveldb::Iterator. I can create a function to calculate an estimated minimum, but to do more would require that we modify leveldb. I highly doubt those changes will be allowed upstream which means we'd need to fork leveldb for this estimate. What are your thoughts on the usefulness of an estimate?
I was acting on that postmortem where leveldb iterators were eating all the memory.

I think that simply reporting number of iterators should be a good first step. If we ever see that the number is high, we can think of adding more instrumentation. But even reporting that number requires us to wrap iterators, although we can probably avoid keeping actual track of iterators - wrapper iterators would just increase / decrease DB's iterator counter upon construction / destruction.

Comment 6 by jsb...@chromium.org, Jan 18 2018

Components: -Blink>Storage Internals>Storage

Comment 7 by dskiba@chromium.org, May 21 2018

Owner: ----
Status: Available (was: Started)

Sign in to add a comment