MEMORY DOCTOR
MEMORY DOCTOR
- Group
- Server
- Complexity
- O(N) where N is the number of client connections
- Arity
- 2 (exactly, counting the command name)
- HotKV Cloud
- All plans
- On-Premise
- no license needed
MEMORY DOCTOR looks at the server’s memory figures and reports anything
that needs attention, with a hint about what to do. It checks for:
- the process holding much more memory than it uses (for example after a peak or many deletes), with a pointer to MEMORY PURGE
- a peak well above the current use
- memory use close to
maxmemory, and whether writes will then be refused or keys evicted, depending onmaxmemory-policy - a client with a large backlog of replies it has not read (a slow consumer;
the
omemfield of CLIENT LIST shows which) - a replication backlog that takes a large share of the memory in use
When nothing is found, it summarises memory in use, memory held by the process, and the peak.
Return value
Section titled “Return value”The report as text: a bulk string in RESP2, a verbatim string (txt) in
RESP3.
Examples
Section titled “Examples”127.0.0.1:6379> MEMORY DOCTORNo memory problems found. In use: 88.21M, held by the process: 101.40M, peak: 92.35M.127.0.0.1:6379> MEMORY DOCTORMemory report:- Memory in use is 93.4% of maxmemory (1.00G): writes will evict keys (allkeys-lru) once it is reached.Compatibility
Section titled “Compatibility”Redis 7 and Valkey 8 have the same command. The report’s wording and the checks it makes are HotKV’s own, so don’t parse the text.
See also
Section titled “See also”Was this page helpful?
Thanks for the feedback.