Setting method:
(Learning video sharing: redis video tutorial)
Redis settings occupy a physical machine Maximum memory
#占用最大20G maxmemory 20480mb
Redis setting memory cannot be loaded, limited deletion is about to expire.
When the currently used memory exceeds the maxmemory limit, the active cleanup policy is triggered
volatile-lru: Only perform LRU on keys with an expiration time set (default value)
allkeys-lru: Delete the lru algorithm's
keyvolatile-random: Random deletion is about to expire
keyallkeys-random: Randomly delete
#超过后删除即将过期的 maxmemory-policy volatile-ttlRelated recommendations:
The above is the detailed content of How to set the maximum memory occupied by redis. For more information, please follow other related articles on the PHP Chinese website!