High Memory Fragmentation Ratio Even When Active Defragmentation is Enabled

114 views
Skip to first unread message

Ankit Gupta

unread,
Apr 2, 2021, 5:28:33 AM4/2/21
to Redis DB
Hi Experts,

We are using open redis and have enabled active defragmentation. 

We are inserting around 6-7 gb of data and then deleting it, during this process we see that mem fragmentation ratio jumps to 2.87 which gets reduced to 1.8 -ish and stays there (we are assuming mem frag ratio will be less than 1.5 if active defragmentation is enabled)

How do we ensure that memory fragmentation ratio is never greater > 1.5. 

-------config sample
We are using below config:-

# Enabled active defragmentation
activedefrag yes

# Minimum amount of fragmentation waste to start active defrag
active-defrag-ignore-bytes 1

# Minimum percentage of fragmentation to start active defrag Permitted values: 1-100
active-defrag-threshold-lower 1

# Maximum percentage of fragmentation at which we use maximum effort Permitted values: 1-100
active-defrag-threshold-upper 10

# Minimal effort for defrag in CPU percentage, to be used when the lower
# threshold is reached Permitted values: 1-75
active-defrag-cycle-min 10

# Maximal effort for defrag in CPU percentage, to be used when the upper
# threshold is reached Permitted values: 1-75
active-defrag-cycle-max 25


Thanks in advance.


Ankit Gupta

unread,
Apr 2, 2021, 6:14:55 AM4/2/21
to Redis DB
I am seeing below log in redis.log

allocated=118474872, active=119046144, resident=195366912, frag=0% (65% rss), frag_bytes=571272 (76892040 rss)

What should be our expectation ? Should active defrag be triggered.
Reply all
Reply to author
Forward
0 new messages