doc-exports/docs/dcs/umn/dcs-faq-0730022.html
Chen, Junjie ea05d1a734 DCS UMN Initial Version
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Chen, Junjie <chenjunjie@huawei.com>
Co-committed-by: Chen, Junjie <chenjunjie@huawei.com>
2022-12-12 14:07:56 +00:00

17 lines
3.5 KiB
HTML

<a name="dcs-faq-0730022"></a><a name="dcs-faq-0730022"></a>
<h1 class="topictitle1">What Is the Default Data Eviction Policy?</h1>
<div id="body1596093268950"><p id="dcs-faq-0730022__en-us_topic_0152099097_p891453012313">Data is evicted from cache based on a user-defined space limit in order to make space for new data.</p>
<p id="dcs-faq-0730022__p28092072506">You can change the eviction policy by configuring the <strong id="dcs-faq-0730022__b1461933614396">maxmemory-policy</strong> parameter.</p>
<p id="dcs-faq-0730022__en-us_topic_0152099097_p24119933153714">When <strong id="dcs-faq-0730022__b9411301292">maxmemory</strong> is reached, you can select one of the following eight eviction policies:</p>
<ul id="dcs-faq-0730022__ul63511053153341"><li id="dcs-faq-0730022__li46713159155023"><strong id="dcs-faq-0730022__b148525218919">noeviction</strong>: When the memory limit is reached, DCS instances return errors to clients and no longer process write requests and other requests that could result in more memory to be used. However, <strong id="dcs-faq-0730022__b23887235114">DEL</strong> and a few more exception requests can continue to be processed.</li><li id="dcs-faq-0730022__li33146435153341"><strong id="dcs-faq-0730022__b12386224217">allkeys-lru</strong>: DCS instances try to evict the least recently used keys first, in order to make space for new data.</li><li id="dcs-faq-0730022__li62982494153346"><strong id="dcs-faq-0730022__b1523412252113">volatile-lru</strong>: DCS instances try to evict the least recently used keys with an expire set first, in order to make space for new data.</li><li id="dcs-faq-0730022__li61473187153348"><strong id="dcs-faq-0730022__b9967425718">allkeys-random</strong>: DCS instances recycle random keys so that new data can be stored.</li><li id="dcs-faq-0730022__li9870151153350"><strong id="dcs-faq-0730022__b15787152616119">volatile-random</strong>: DCS instances evict random keys with an expire set, in order to make space for new data.</li><li id="dcs-faq-0730022__li3073190415343"><strong id="dcs-faq-0730022__b989313618914">volatile-ttl</strong>: DCS instances evict keys with an expire set, and try to evict keys with a shorter time to live (TTL) first, in order to make space for new data.</li><li id="dcs-faq-0730022__li1918134611344"><strong id="dcs-faq-0730022__b188119815917">allkeys-lfu</strong>: DCS instances evict the least frequently used keys from all keys.</li><li id="dcs-faq-0730022__li188701956123617"><strong id="dcs-faq-0730022__b12439131113918">volatile-lfu</strong>: DCS instances evict the least frequently used keys with an <strong id="dcs-faq-0730022__b1944015111698">expire</strong> field from all keys.</li></ul>
<div class="note" id="dcs-faq-0730022__en-us_topic_0152099097_note33192730155638"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dcs-faq-0730022__en-us_topic_0152099097_p30299119155638">If no key can be recycled, <strong id="dcs-faq-0730022__b122631228518">volatile-lru</strong>, <strong id="dcs-faq-0730022__b626410282110">volatile-random</strong>, and <strong id="dcs-faq-0730022__b62641528915">volatile-ttl</strong> are the same as <strong id="dcs-faq-0730022__b1526417284111">noeviction</strong>. For details, see the description of <strong id="dcs-faq-0730022__b42649283119">noeviction</strong>.</p>
</div></div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dcs-faq-0326021.html">Redis Usage</a></div>
</div>
</div>