Redis cache is efficient, but it will take up the valuable memory resources in our system, especially when our project has been running for some time, we need to see how much memory the Redis occupies, then we can use the "info" command to view.
After executing the info command, find the memory column, and you can see the memory usage information, as shown in the following figure:
# Memory
used_memory:13490096//Data consumption of memory (bytes)
used_memory_human:12.87m//Data consumption of memory (with unit, readable good)
How much memory is consumed by used_memory_rss:13490096//redis
used_memory_peak:15301192//Memory Peak (bytes)
used_memory_peak_human:14.59m//Occupancy peak memory (with unit, readable)
used_memory_lua:31744 the memory size of the//lua engine (bytes)
mem_fragmentation_ratio:1.00//Memory fragmentation rate
MEM_ALLOCATOR:LIBC//redis The memory allocator version, specified at compile time. There are libc, Jemalloc, tcmalloc these 3 kinds.
If a project has a large amount of data, it is necessary to use info to see the amount of memory used, so that the project can be more stable