narwhal icon indicating copy to clipboard operation
narwhal copied to clipboard

Add support for tracking memory consumption of selected structures

Open aschran opened this issue 3 years ago • 4 comments

Summarizing input from François:

Look into integrating a trait-based crate for tracking heap memory usage, perhaps:

  1. https://github.com/paritytech/parity-common/tree/master/parity-util-mem
  2. 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

aschran avatar Aug 25 '22 18:08 aschran