The specific viewing steps are as follows:
(Learning video sharing: redis video tutorial)
redis-cli
auth password
info
# Memory
used_memory:13490096 //How much memory does the data occupy (bytes)
used_memory_human:12.87M //How much memory does the data occupy (bytes) With units, good readability)
used_memory_rss:13490096 //How much memory does redis occupy?
used_memory_peak:15301192 //Peak memory usage (bytes)
used_memory_peak_human:14.59M //Peak memory usage (with units, good readability)
used_memory_lua:31744 //Memory size occupied by the lua engine (bytes)
mem_fragmentation_ratio: 1.00 //Memory fragmentation rate
mem_allocator:libc //redis memory allocator version, specified at compile time. There are three types: libc, jemalloc, and tcmalloc.
Just look at used_memory
Related recommendations:redis database tutorial
The above is the detailed content of How to check the memory occupied by redis data. For more information, please follow other related articles on the PHP Chinese website!