Memory analyzer
functionalMemory by data type, the biggest keys, and a TTL histogram from a bounded sample.
The Memory Analyzer answers "what is using the memory in this database?" with three reports: memory by data type, the largest keys, and how keys are spread across TTL ranges. Right-click a Redis database in the explorer and choose Memory Analyzer… - it sits next to the database's Tools › Disk Usage, which gives the per-database overview this drills into. The same report opens from the Redis Memory Analyzer… command and from a Server Dashboard link beside Disk Usage.
The three reports
- Memory by type - sampled key count and bytes per type (string, hash, list, set, zset, stream…), the share of sampled bytes, and an estimate scaled to the whole database.
- Top keys - the 25 largest sampled keys by
MEMORY USAGE, with type and TTL. - TTL distribution - how many keys have no expiry, expire within an hour, within a day, within a week, or later.
SCAN (never KEYS *) of up to 1,000 keys and reads TYPE, TTL and MEMORY USAGE … SAMPLES 5 for each, in batches of 200. All three reports come from that one sample, so their counts agree and the server is walked once per refresh. Keys that disappear while the sample is being taken are left out rather than shown as a none type. Columns named sampled_* are measured; estimated_* columns scale the sample linearly to the key count. A line under the reports says how many keys were sampled out of how many, and whether the walk covered the whole database (the figures are exact) or only part of it (the estimates are extrapolated).
Editing the analysis
The pane's Copy editable script button copies the same commands with a header comment: SQLLY.MEMSUMMARY (the sample summary), SQLLY.MEMBYTYPE, SQLLY.TOPKEYS and SQLLY.TTLBUCKETS. Change the sample size (up to 50,000 keys) or the top-keys count and run it in any query tab. Commands in one run that use the same sample size share one sample; each new run takes a fresh one.
When the server cannot measure memory, because it doesn't support MEMORY USAGE or your ACL user isn't allowed to run it (NOPERM), the type and TTL reports still show their key counts. Byte columns stay empty rather than showing zeros, the top-keys list is empty, and the pane says why. Other errors are shown as errors, and any report that finished before the error stays on screen.
If the pane is already open and you pick Memory Analyzer… on a different database or connection, it switches to that database and takes a new sample.