↑ ↓ select, Enter open, Esc close

Show Redis memory usage and limit

user@server
redis-cli INFO memory | grep -E '^(used_memory_human|used_memory_peak_human|maxmemory_human|maxmemory_policy|mem_fragmentation_ratio):'

Filters the five most important values from the memory section. maxmemory_human:0B means no limit, so Redis keeps growing until RAM runs short. For a pure object cache, allkeys-lru is the usual policy, while with noeviction Redis rejects writes once the limit is reached.

Note: A mem_fragmentation_ratio well above 1.5 indicates wasted memory, while a value below 1 suggests the server is swapping.

Also searched as

  • how much ram does redis use
  • check redis maxmemory
  • redis memory full

Related one-liners

All in Redis and Memcached

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.