diff options
author | dormando <dormando@rydia.net> | 2017-06-24 01:07:03 -0700 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2017-06-24 01:07:03 -0700 |
commit | 1174994a6cb977785fdf38aea915d23c1cfb5a56 (patch) | |
tree | a487bdea1b9eb1c96bcb65ee0e049330efefed39 /doc | |
parent | b52da9e98add7cf6d72bb905acf003fea4b6d701 (diff) | |
download | memcached-1174994a6cb977785fdf38aea915d23c1cfb5a56.tar.gz |
hot_max_age is now hot_max_factor
defaults at 20% of COLD age.
hot_max_age was added because many people's caches were sitting at 32% memory
utilized (exactly the size of hot). Capping the LRU's by percentage and age
would promote some fairness, but I made a mistake making WARM dynamic but HOT
static. This is now fixed.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/new_lru.txt | 4 | ||||
-rw-r--r-- | doc/protocol.txt | 8 |
2 files changed, 7 insertions, 5 deletions
diff --git a/doc/new_lru.txt b/doc/new_lru.txt index a944671..bf19233 100644 --- a/doc/new_lru.txt +++ b/doc/new_lru.txt @@ -14,8 +14,10 @@ Now, enabling `-o lru_maintainer` changes all of the behavior below: HOT, move to WARM, if active in WARM, stay in WARM. If active in COLD, move to WARM. The exception is that items active in COLD are immediately moved to WARM. - * HOT/WARM each capped at 32% of memory available for that slab class. COLD + * HOT/WARM each capped at N% of memory available for that slab class. COLD is uncapped (by default, as of this writing). + * HOT/WARM are also age capped by ratios of COLD's age. IE: HOT is capped at + N% of memory, or 10% of the age of COLD, whichever comes first. * Items flow from HOT/WARM into COLD. * A background thread exists which shuffles items between/within the LRU's as limits are reached. This includes moves from COLD to WARM. diff --git a/doc/protocol.txt b/doc/protocol.txt index d39bf2b..e718aa6 100644 --- a/doc/protocol.txt +++ b/doc/protocol.txt @@ -418,10 +418,10 @@ HOT, WARM, COLD. There is also a TEMP LRU. See doc/new_lru.txt for details. lru <tune|mode|temp_ttl> <option list> - "tune" takes numeric arguments "percent hot", "percent warm", - "max hot age", "max warm age factor". IE: "lru tune 10 25 3600 2.0". + "max hot factor", "max warm age factor". IE: "lru tune 10 25 0.1 2.0". This would cap HOT_LRU at 10% of the cache, or tail is idle longer than - 3600s. WARM_LRU is up to 25% of cache, or tail is idle longer than 2x - COLD_LRU. + 10% of COLD_LRU. WARM_LRU is up to 25% of cache, or tail is idle longer + than 2x COLD_LRU. - "mode" <flat|segmented>: "flat" is traditional mode. "segmented" uses HOT|WARM|COLD split. "segmented" mode requires `-o lru_maintainer` at start @@ -789,7 +789,7 @@ other stats command. | | bool | Split LRU mode and background threads | | hot_lru_pct | 32 | Pct of slab memory reserved for HOT LRU | | warm_lru_pct | 32 | Pct of slab memory reserved for WARM LRU | -| hot_max_age | 32u | Max idle age of items in HOT LRU | +| hot_max_factor | float | Set idle age of HOT LRU to COLD age * this | | warm_max_factor | float | Set idle age of WARM LRU to COLD age * this | | temp_lru | bool | If yes, items < temporary_ttl use TEMP_LRU | | temporary_ttl | 32u | Items with TTL < this are marked temporary | |