doc-exports/docs/dcs/umn/dcs-faq-0730052.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

15 lines
1.6 KiB
HTML

<a name="dcs-faq-0730052"></a><a name="dcs-faq-0730052"></a>
<h1 class="topictitle1">Why Is Used Memory Greater Than Available Memory?</h1>
<div id="body1596093777162"><p id="dcs-faq-0730052__en-us_topic_0152099101_p185291234153011">For single-node and master/standby DCS instances, the used instance memory is measured by the Redis-server process. For cluster DCS instances, the used cluster memory is the sum of used memory of all shards in the cluster.</p>
<p id="dcs-faq-0730052__en-us_topic_0152099101_p8060118">Due to the internal implementation of the open-source redis-server, the <span class="keyword" id="dcs-faq-0730052__keyword168585310816">used instance memory is normally slightly higher than the available instance memory</span>.</p>
<p id="dcs-faq-0730052__en-us_topic_0152099101_p1529719812119"><strong id="dcs-faq-0730052__b162366546815">Why is used_memory higher than max_memory?</strong></p>
<p id="dcs-faq-0730052__en-us_topic_0152099101_p1631153451815">Redis allocates memory using zmalloc. It does not check whether used_memory exceeds max_memory every time the memory is allocated. Instead, it checks whether the current used_memory exceeds max_memory at the beginning of a periodic task or command processing. If used_memory exceeds max_memory, eviction is triggered. Therefore, the restrictions of the max_memory policy are not implemented in real time or rigidly. A case in which the used_memory is greater than the max_memory may occur occasionally.</p>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dcs-faq-0326023.html">Monitoring and Alarm</a></div>
</div>
</div>