MEMORY
Memory introspection subcommands.
MEMORY USAGE key [SAMPLES count] | STATS | DOCTOR | PURGE | MALLOC-STATS
Complexity
USAGE: O(1) — the accounting is exact, not sampled. STATS: O(1) from the instance-wide gauges
Complexity and compatibility are read out of kevy's implementation, not copied from Redis's reference. Several genuinely differ.
Redis compatibility
Differs
USAGE's SAMPLES count is parsed and ignored (our accounting is exact); PURGE is a no-op (system allocator, no arena); DOCTOR and MALLOC-STATS return canned strings; STATS is a trimmed 8-field set
See also
BGREWRITEAOFBGSAVECLIENTCLUSTERCOMMANDCONFIGDBSIZEDEBUGFLUSHALLFLUSHDBINFOSAVESHUTDOWNSLOWLOG