In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces you how to automatically clean up memory fragments in Redis4.0, the content is very detailed, interested friends can refer to, I hope it can be helpful to you.
By setting up config set activedefrag yes
# redis-cli info memory
# Memory
Used_memory:94924567648
Used_memory_human:88.41G
Used_memory_rss:122715869184
Used_memory_rss_human:114.29G
Used_memory_peak:138010337568
Used_memory_peak_human:128.53G
Used_memory_peak_perc:68.78%
Used_memory_overhead:21483503188
Used_memory_startup:6123112
Used_memory_dataset:73441064460
Used_memory_dataset_perc:77.37%
Total_system_memory:202987839488
Total_system_memory_human:189.05G
Used_memory_lua:37888
Used_memory_lua_human:37.00K
Maxmemory:128849018880
Maxmemory_human:120.00G
Maxmemory_policy:noeviction
Mem_fragmentation_ratio:1.29
Mem_allocator:jemalloc-4.0.3
Active_defrag_running:0
Lazyfree_pending_objects:0
The value of retio is 1.29, indicating that there are a lot of memory fragments.
Execute the following command to start sorting:
[root@redis-cache-225 conf] # redis-cli-p 6379 config set activedefrag yes
OK
It is found that the value of ratio is getting smaller and smaller, indicating that the automatic cleanup feature takes effect:
# redis-cli info memory | grep ratio
Mem_fragmentation_ratio:1.16
# redis-cli info memory | grep ratio
Mem_fragmentation_ratio:1.12
# redis-cli info memory | grep ratio
Mem_fragmentation_ratio:1.09
On how to automatically clean up memory fragments in Redis4.0 to share here, I hope the above content can be of some help to you, you can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.