Each of the Redis Instance in the cluster has total RAM of 15G. And each Redis instance has "maxmemory" set to 12G (80% of total RAM).
However, we noticed in our xymon monitoring system that Redis is using swap (sometimes all the swap 100%) even if it seems that there is still free memory. Is this because setting maxmeory in Redis to 80% means that when all 80% memory is used, Redis will start using swap (or push other processes to use swap) instead of maybe just deleting some data? I really do not understand why Redis is using swap at all.
The system snappiness is set to =0 on all Redis instances. So far, i was just able to release the swap and did not adjust the system value for snappiness.
Below is what is being logged by our monitoring system xymon:
redis-2-1.memory (ip_address) yellow (1089813 seconds)
yellow Wed Nov 18 14:16:38 CST 2015 - Memory low
Memory Used Total Percentage
&green Physical 15234M 16043M 94%
&green Actual 11733M 16043M 73%
&yellow Swap 839M 953M 88%
redis-2-1.memory (ip_addresss) red (1077170 seconds)
red Wed Nov 18 10:46:21 CST 2015 - Memory CRITICAL
Memory Used Total Percentage
&green Physical 15193M 16043M 94%
&green Actual 11698M 16043M 72%
&red Swap 953M 953M 100%