title: How to reduce mem_fragmentation_ratio in Redis?
body: <p>By <code>info</code> command, I get </p>
  
  <p><code>mem_fragmentation_ratio:1.24</code></p>
  
  <p>which is greater than <code>1</code>.</p>
  
  <p>I know it means redis hold some free memory which can be released. </p>
  
  <p>How can I release this memory and reduce this ratio?</p>
  
  <p>I tried <code>MEMORY PURGE</code>, but the ratio does not change.</p>
  
  <p><code>redis_version:4.0.9</code></p>
  
  <pre><code># Memory
  used_memory:8347302992
  used_memory_human:7.77G
  used_memory_rss:9236336640
  used_memory_rss_human:8.60G
  used_memory_peak:17919661152
  used_memory_peak_human:16.69G
  used_memory_peak_perc:46.58%
  used_memory_overhead:519883816
  used_memory_startup:1215600
  used_memory_dataset:7827419176
  used_memory_dataset_perc:93.79%
  total_system_memory:270383198208
  total_system_memory_human:251.81G
  used_memory_lua:37888
  used_memory_lua_human:37.00K
  maxmemory:21474836480
  maxmemory_human:20.00G
  maxmemory_policy:noeviction
  mem_fragmentation_ratio:1.11
  mem_allocator:jemalloc-4.0.3
  active_defrag_running:0
  lazyfree_pending_objects:0
  </code></pre>