forked from docs/doc-exports
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: Zheng, Xiu <zhengxiu@huawei.com> Co-committed-by: Zheng, Xiu <zhengxiu@huawei.com>
26 lines
2.6 KiB
HTML
26 lines
2.6 KiB
HTML
<a name="css_02_0130"></a><a name="css_02_0130"></a>
|
|
|
|
<h1 class="topictitle1">How Do I Clear the Cache of a CSS Cluster?</h1>
|
|
<div id="body0000001425336608"><ul id="css_02_0130__ul1956313202719"><li id="css_02_0130__li18563202172714"><strong id="css_02_0130__b419555412267">Clear the fielddata</strong><p id="css_02_0130__p825964911386">During aggregation and sorting, data are converted to the fielddata structure, which occupies a large amount of memory.</p>
|
|
<ol id="css_02_0130__ol758905917414"><li id="css_02_0130__li65899595417">Run the following commands on Kibana to check the memory occupied by index fielddata:<pre class="screen" id="css_02_0130__screen1098311138429">DELETE /_search/scroll
|
|
{
|
|
"scroll_id" :
|
|
"DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ=="
|
|
}</pre>
|
|
</li><li id="css_02_0130__li3784101194219">If the memory usage of fielddata is too high, you can run the following command to clear fielddata:<pre class="screen" id="css_02_0130__screen20831916193017">POST /<i><span class="varname" id="css_02_0130__varname191412047103019">test</span></i>/_cache/clear?fielddata=true </pre>
|
|
</li></ol>
|
|
<p id="css_02_0130__p4926751153012">In the preceding command, <em id="css_02_0130__i8234135662012">test</em> indicates the name of the index whose fielddata occupies a large amount of memory.</p>
|
|
</li><li id="css_02_0130__li1462533213119"><strong id="css_02_0130__b137511656133210">Clear segments</strong><p id="css_02_0130__p86866333314">The FST structure of each segment is loaded to the memory and will not be cleared. If the number of index segments is too large, the memory usage will be high. You are advised to periodically clear the segments.</p>
|
|
<ol id="css_02_0130__ol19358171616342"><li id="css_02_0130__li73582161346">Run the following command on Kibana to check the number of segments and their memory usage on each node:<pre class="screen" id="css_02_0130__screen133581516173412">GET /_cat/nodes?v&h=segments.count,segments.memory&s=segments.memory:desc</pre>
|
|
</li><li id="css_02_0130__li835821619341">If the memory usage of segments is too high, you can delete or disable unnecessary indexes, or periodically combine indexes that are not updated.</li></ol>
|
|
</li><li id="css_02_0130__li1832892973110"><strong id="css_02_0130__b541105813359">Clear the cache</strong><p id="css_02_0130__p1068311953612">Run the following command on Kibana to clear the cache:</p>
|
|
<pre class="screen" id="css_02_0130__screen431743313367">POST _cache/clear</pre>
|
|
</li></ul>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="css_02_0066.html">Resource Usage and Change</a></div>
|
|
</div>
|
|
</div>
|
|
|