This article mainly shares with you the method code of how to check the memory size occupied by redis. I hope it can help you.
How to check the memory size occupied by redis
redis-cli
auth password
info
# Memory used_memory:13490096 //数据占用了多少内存(字节) used_memory_human:12.87M //数据占用了多少内存(带单位的,可读性好) used_memory_rss:13490096 //redis占用了多少内存 used_memory_peak:15301192 //占用内存的峰值(字节) used_memory_peak_human:14.59M //占用内存的峰值(带单位的,可读性好) used_memory_lua:31744 //lua引擎所占用的内存大小(字节) mem_fragmentation_ratio:1.00 //内存碎片率 mem_allocator:libc //redis内存分配器版本,在编译时指定的。有libc、jemalloc、tcmalloc这3种。
Related recommendations:
Analysis of memory occupied by ordered sets and lists in Redis
The above is the detailed content of How to check the memory size occupied by redis. For more information, please follow other related articles on the PHP Chinese website!