pub struct MemoryStats {Show 29 fields
pub peak_allocated: usize,
pub total_allocated: usize,
pub startup_allocated: usize,
pub replication_backlog: usize,
pub clients_slaves: usize,
pub clients_normal: usize,
pub cluster_links: usize,
pub aof_buffer: usize,
pub lua_caches: usize,
pub functions_caches: usize,
pub databases: HashMap<usize, DatabaseOverhead>,
pub overhead_total: usize,
pub keys_count: usize,
pub keys_bytes_per_key: usize,
pub dataset_bytes: usize,
pub dataset_percentage: f64,
pub peak_percentage: f64,
pub allocator_allocated: usize,
pub allocator_active: usize,
pub allocator_resident: usize,
pub allocator_fragmentation_ratio: f64,
pub allocator_fragmentation_bytes: usize,
pub allocator_rss_ratio: f64,
pub allocator_rss_bytes: usize,
pub rss_overhead_ratio: f64,
pub rss_overhead_bytes: usize,
pub fragmentation: f64,
pub fragmentation_bytes: usize,
pub additional_stats: HashMap<String, Value>,
}Expand description
Result for the memory_stats command.
Fields§
§peak_allocated: usizePeak memory consumed by Redis in bytes
(see INFO’s used_memory_peak)
total_allocated: usizeTotal number of bytes allocated by Redis using its allocator
(see INFO’s used_memory)
startup_allocated: usizeInitial amount of memory consumed by Redis at startup in bytes
(see INFO’s used_memory_startup)
replication_backlog: usizeSize in bytes of the replication backlog
(see INFO’s repl_backlog_active)
clients_slaves: usizeThe total size in bytes of all replicas overheads (output and query buffers, connection contexts)
clients_normal: usizeThe total size in bytes of all clients overheads (output and query buffers, connection contexts)
cluster_links: usizeMemory usage by cluster links
(Added in Redis 7.0, see INFO’s mem_cluster_links).
aof_buffer: usizeThe summed size in bytes of AOF related buffers.
lua_caches: usizethe summed size in bytes of the overheads of the Lua scripts’ caches
functions_caches: usizethe summed size in bytes of the overheads of the functions’ caches
databases: HashMap<usize, DatabaseOverhead>For each of the server’s databases (key = db index), the overheads of the main and expiry dictionaries are reported in bytes
overhead_total: usizeThe sum of all overheads, i.e. startup.allocated, replication.backlog,
clients.slaves, clients.normal, aof.buffer and those of the internal data structures
that are used in managing the Redis keyspace (see INFO’s used_memory_overhead)
keys_count: usizeThe total number of keys stored across all databases in the server
keys_bytes_per_key: usizeThe ratio between net memory usage (total.allocated minus startup.allocated) and keys.count
dataset_bytes: usizeThe size in bytes of the dataset, i.e. overhead.total subtracted from total.allocated
(see INFO’s used_memory_dataset)
dataset_percentage: f64The percentage of dataset.bytes out of the net memory usage
peak_percentage: f64The percentage of peak.allocated out of total.allocated
allocator_allocated: usize§allocator_active: usize§allocator_resident: usize§allocator_fragmentation_ratio: f64§allocator_fragmentation_bytes: usize§allocator_rss_ratio: f64§allocator_rss_bytes: usize§rss_overhead_ratio: f64§rss_overhead_bytes: usize§fragmentation: f64See INFO’s mem_fragmentation_ratio
fragmentation_bytes: usize§additional_stats: HashMap<String, Value>