반응형
https://redis.io/docs/reference/eviction/
Eviction policies
The exact behavior Redis follows when the maxmemory limit is reached is configured using the maxmemory-policy configuration directive.
The following policies are available:
Policy | ||
noeviction | New values aren’t saved when memory limit is reached. When a database uses replication, this applies to the primary database | 설전된 maxmemory 제한에 도달하면 새 값이 저장되지 않으며, 추가되는 command 실행 실패 |
allkeys-lru | Keeps most recently used keys; removes least recently used (LRU) keys | 가장 최근에 사용한 keys 유지 및 가장 최근에 사용되지 않은 keys를 삭제 |
allkeys-lfu | Keeps frequently used keys; removes least frequently used (LFU) keys | 자주 사용하는 keys를 보관 및 참조 횟수가 가장 적은 keys를 삭제 |
volatile-lru | Removes least recently used keys with the expire field set to true. | EXPIRE SET 내의 keys를 대상으로 LRU 알고리즘 적용하여 keys를 삭제 |
volatile-lfu | Removes least frequently used keys with the expire field set to true. | EXPIRE SET 내의 keys를 대상으로 LFU 알고리즘 적용하여 keys를 삭제 |
allkeys-random | Randomly removes keys to make space for the new data added. | 추가된 새로운 데이터를 위한 메모리 공간을 만들기 위해 무작위로 keys를 삭제 |
volatile-random | Randomly removes keys with expire field set to true. | EXPIRE SET 내의 keys를 대상으로 무작위로 keys를 삭제 |
volatile-ttl | Removes keys with expire field set to true and the shortest remaining time-to-live (TTL) value. | EXPIRE SET 내의 keys를 대상으로 TTL이 짧은 순서로 keys를 삭제 |
https://chagokx2.tistory.com/102
Redis 내부 동작 원리와 최적화 방안
반응형
'개발' 카테고리의 다른 글
Redis Fragmentation (0) | 2023.06.18 |
---|---|
캐싱 전략 (0) | 2023.06.17 |
OS 메모리 관리 (0) | 2023.06.15 |
Generics / Variance (0) | 2023.06.04 |
BASE Principle (0) | 2023.06.04 |