goleveldb icon indicating copy to clipboard operation
goleveldb copied to clipboard

Metrics/stats retrieval API

Open karalabe opened this issue 10 years ago • 0 comments

Hi,

We're using leveldb for quite large datasets (30-40+ GB), and have experienced various issues with high disk usage, too frequent compression, etc. These issues are almost surely our sub-optimal usage of leveldb, or a bad schema design. We have various ideas to make things better, but it's really hard to objectively compare different schemas, parameters and optimizations.

The primary reason for this is because we cannot really see and monitor what goes on inside leveldb. We have a metrics system in place to measure the amount and rate of data we throw at the database, but it's very hard to see what goes on under the hood.

The leveldb.stats property - and others beside it - is really useful to see what leveldb does compaction wise, but it just generates a user-friendly dump, that's brittle to parse programatically (it works now, but any change to the table layout will immediately break parsing code). Would it be possible to provide API level access to these properties, instead of textual dumps?

Thanks, Peter

karalabe avatar Jun 29 '15 08:06 karalabe