pub struct Stats {Show 15 fields
pub live_objects: u64,
pub stored_objects: u64,
pub dead_objects: u64,
pub live_ratio: f32,
pub files: usize,
pub total_file_size: u64,
pub compressed_bytes_written: u64,
pub compressed_bytes_read: u64,
pub decompressed_bytes_written: u64,
pub decompressed_bytes_read: u64,
pub high_level_user_bytes_written: u64,
pub read_compression_ratio: f32,
pub written_compression_ratio: f32,
pub write_amplification: f32,
pub space_amplification: f32,
}
Expand description
Statistics for file contents, to base decisions around
calls to maintenance
.
Fields§
§live_objects: u64
The number of live objects stored in the backing storage files.
stored_objects: u64
The total number of (potentially duplicated) objects stored in the backing storage files.
dead_objects: u64
The number of dead objects that have been replaced or removed in other storage files, contributing to fragmentation.
live_ratio: f32
The ratio of all objects on disk that are live to all objects in total. This is another way of expressing fragmentation.
files: usize
The number of backing storage files that exist and are being held open.
total_file_size: u64
The sum of the sizes of all files currently on-disk.
compressed_bytes_written: u64
The number of compressed bytes that have been written due
to calls to both write_batch
and rewrites caused by
calls to maintenance
since this instance of Marble
was recovered.
compressed_bytes_read: u64
The number of compressed bytes that have been read since
this instance of Marble
was recovered.
decompressed_bytes_written: u64
The number of decompressed bytes that have been written due
to calls to both write_batch
and rewrites caused by
calls to maintenance
since this instance of Marble
was recovered.
decompressed_bytes_read: u64
The number of decompressed bytes that have been read since
this instance of Marble
was recovered.
high_level_user_bytes_written: u64
This is the number of bytes that are written from user
calls to crate::Marble::write_batch
since this instance
was recovered.
read_compression_ratio: f32
Compression ratio for read objects since this Marble
instance was recovered. 1.0 means no compression, 2.0 means that we saved 50% space by compressing, etc…
written_compression_ratio: f32
Compression ratio for objects written since this Marble
instance was recovered. 1.0 means no compression, 2.0 means that we saved 50% space by compressing, etc…
write_amplification: f32
The ratio of all decompressed writes performed to high-level user data
since this instance of Marble
was recovered. This is basically the
maintenance overhead of on-disk GC in response to objects being rewritten
and defragmentation maintenance copying old data to new homes. 1.0 is “perfect”.
If all data needs to be copied once, this will be 2.0, etc… For reference,
many LSM tries will see write amplifications of a few dozen, and b-trees can often
see write amplifications of several hundred. So, if you’re under 10 for serious workloads,
you’re doing much better than most industrial systems.
space_amplification: f32
The ratio of the sum of the size of all compressed files written to the sum of the size of all high-level user data written
since this instance of Marble
was recovered. This goes up with fragmentation, and is
brought back down with calls to maintenance
that defragment storage files. Higher
compression levels also cause this to be lower.