Closed happybeing closed 2 years ago
Note:
checking if/how storage information is saved to disk (refer to safe_network node source)
A node is told how much space is allocated for its use, and tracks how much it has used in a struct UsedSpace
which is accessed by the individual stores (i.e. ChunkDiskStore
, RegisterStorage
). Before each write this is checked to ensure sufficient space remains, and is increased if data is written. The space used is output after each write as three values: 'Used space', 'Max capacity' and 'Used space ratio'. Separately a 'storage level' is maintained with each level representing ~10% of total storage capacity, and a message ('Next level for storage has been reached') is output each time this value increases. These metrics are held in the struct DataStore
.
check with MaidSafe if the current solution is temporary, and so whether we should defer this until more stable
There doesn't seem to be an easy way to output the storage used for individual data types (immutable and register) so this will no longer be shown.
For now we are limited to showing total 'Used space' against total 'Max capacity'.
I think it would be better if this was contained in a single info message rather than the current three, one each for Used space, Max capacity and Used space ratio (here.) @joshuef - could you slip that change into an existing PR if you agree? For now I'll have vdash
pick it out as is until you make the change. For ex:
info!("Used space: {:?}, Max capacity: {:?}, Used space ratio: {:?}", used, max_capacity, sed_space_ratio);
vdash
used to show storage used for the local disk, and for each data type as a horizontal bar. This no longer works because the datavdash
used to obtain this is no longer saved on disk by the node.Ideally we'd like to show disk space used/available in first bar, and a bar under that for each data type (i.e. mutable and register).
This issue is for:
Note:
We have options for obtaining metrics for the storage device.
vdash
currently calls the system functionstatvfs()
with the path for the storage location so that could continue to be used. Alternatively issue #5 is planned to gather disk related stats which could be used instead.