horaedb icon indicating copy to clipboard operation
horaedb copied to clipboard

Track memory usage in `MemUsageCollector`

Open waynexia opened this issue 3 years ago • 0 comments

Description

We have implemented a MemUsageCollector in https://github.com/CeresDB/ceresdb/blob/6b929ca19a/analytic_engine/src/instance/mem_collector.rs but no one reports memory consumptions to it.

One of the use cases is deciding whether to schedule a flush job based on memory usage: https://github.com/CeresDB/ceresdb/blob/6b929ca19abf48ba9afd1cb554ec9a25c7783a42/analytic_engine/src/instance/write.rs#L307-L331

Proposal

Tracking allocation using this collector. For now I think tracks memtable is enough

Additional context

waynexia avatar Jun 30 '22 09:06 waynexia