narwhal
narwhal copied to clipboard
Add support for tracking memory consumption of selected structures
Summarizing input from François:
Look into integrating a trait-based crate for tracking heap memory usage, perhaps:
- https://github.com/paritytech/parity-common/tree/master/parity-util-mem
- https://github.com/Aeledfyr/deepsize/
Validate the approach by carefully instrumenting a set of types on Narwhal with trait implementations (ideally derived as often as possible), up to what's needed to track the memory usage of the following table: https://github.com/MystenLabs/narwhal/blob/main/consensus/src/consensus.rs#L33
Export the memory usage gauge in a metric.
Related work in Sui: https://github.com/MystenLabs/sui/issues/3835