Reference: https://jingyan.baidu.com/article/2c8c281dbd079f0008252a0f.html
https://blog.csdn.net/qq_36663951/article/details/78340303
The Redis cache is efficient, but it takes up valuable memory resources in our system, especially when our project is running for a while, and we need to look at how much memory Redis occupies, so you can view it with the "info" command.
After executing the info command, find the memory column and you will be able to see the usage information of the RAM, as shown below:
# Memory
used_memory:13490096//How much memory is consumed in the data (bytes)
How much memory used_memory_human:12.87m//data occupies (with unit, readability)
used_memory_rss:13490096//redis How much memory it takes
used_memory_peak:15301192//Peak memory consumption (bytes)
used_memory_peak_human:14.59m//Peak memory consumption (with unit, readability)
used_memory_lua:31744//lua engine occupies memory size (bytes)
mem_fragmentation_ratio:1.00//Memory fragmentation rate
MEM_ALLOCATOR:LIBC//redis Memory allocator version, specified at compile time. There are 3 kinds of libc, Jemalloc and Tcmalloc.