Files
doc-exports/docs/css/umn/css_01_0132.html
zhengxiu 93d856d5c5 css umn 25.6.0 version
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: zhengxiu <zhengxiu@huawei.com>
Co-committed-by: zhengxiu <zhengxiu@huawei.com>
2025-11-25 11:34:43 +00:00

256 lines
29 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<a name="EN-US_TOPIC_0000001938377744"></a><a name="EN-US_TOPIC_0000001938377744"></a>
<h1 class="topictitle1">Configuring Large Query Isolation for an Elasticsearch Cluster</h1>
<div id="body0000001225857867"><div class="section" id="EN-US_TOPIC_0000001938377744__section7417195582813"><h4 class="sectiontitle">Scenario</h4><p id="EN-US_TOPIC_0000001938377744__p3938125711281">You can isolate query requests that consume a large amount of memory or take a long period of time. This way, you ensure service availability for other requests. If the heap memory usage of a node is too high, an interrupt control program will be triggered to terminate a large query based on the policies you configured. You can also configure a global query timeout duration. Long queries will be intercepted by an Elasticsearch-native cancel API.</p>
<div class="p" id="EN-US_TOPIC_0000001938377744__p9911436153215">Large query isolation can effectively solve the following problems and improve the search performance of clusters:<ul id="EN-US_TOPIC_0000001938377744__en-us_topic_0000001223914392_ul2627173217595"><li id="EN-US_TOPIC_0000001938377744__en-us_topic_0000001223914392_li20627153218599">A small number of queries occupy large chunks of node heap memory, resulting in frequent Garbage Collection (GC) and even out of memory (OOM) exceptions.</li><li id="EN-US_TOPIC_0000001938377744__en-us_topic_0000001223914392_li1447142015010">Frequent GC causes node disconnections. As a result, queries cannot get response and may fail.</li><li id="EN-US_TOPIC_0000001938377744__en-us_topic_0000001223914392_li460219571721">The CPU usage is high due to heavy query load, affecting online services.</li></ul>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0000001938377744__section174119599287"><h4 class="sectiontitle">Constraints</h4><p id="EN-US_TOPIC_0000001938377744__p6662155817386">Only Elasticsearch 7.6.2 and Elasticsearch 7.10.2 clusters support large query isolation.</p>
</div>
<div class="section" id="EN-US_TOPIC_0000001938377744__section14917133118375"><h4 class="sectiontitle">Logging In to Kibana</h4><p id="EN-US_TOPIC_0000001938377744__en-us_topic_0000002338102386_en-us_topic_0000002271391393_p84498183236">Log in to Kibana and go to the command execution page. Elasticsearch clusters support multiple access methods. This topic uses Kibana as an example to describe the operation procedures.</p>
<ol id="EN-US_TOPIC_0000001938377744__en-us_topic_0000002338102386_en-us_topic_0000002271391393_ol13172153674611"><li id="EN-US_TOPIC_0000001938377744__en-us_topic_0000002338102386_en-us_topic_0000002271391393_en-us_topic_0000001268594549_li5509181942419"><span id="EN-US_TOPIC_0000001938377744__en-us_topic_0000002338102386_ph152259618315">Log in to the CSS management console.</span></li><li id="EN-US_TOPIC_0000001938377744__en-us_topic_0000002338102386_en-us_topic_0000002271391393_li4250043448">In the navigation pane on the left, choose <span class="uicontrol" id="EN-US_TOPIC_0000001938377744__en-us_topic_0000002338102386_uicontrol192689888185117"><b>Clusters &gt; Elasticsearch</b></span>.</li><li id="EN-US_TOPIC_0000001938377744__en-us_topic_0000002338102386_en-us_topic_0000002271391393_en-us_topic_0000001268154521_li6012554340">In the cluster list, find the target cluster, and click <strong id="EN-US_TOPIC_0000001938377744__en-us_topic_0000002338102386_b18928803044129">Kibana</strong> in the <strong id="EN-US_TOPIC_0000001938377744__en-us_topic_0000002338102386_b5255083364129">Operation</strong> column to log in to the Kibana console.</li><li id="EN-US_TOPIC_0000001938377744__en-us_topic_0000002338102386_en-us_topic_0000002271391393_li270075935613">In the left navigation pane, choose <strong id="EN-US_TOPIC_0000001938377744__en-us_topic_0000002338102386_b3927845824129">Dev Tools</strong>.<p id="EN-US_TOPIC_0000001938377744__en-us_topic_0000002338102386_p1810995434510">The left part of the console is the command input box, and the triangle icon in its upper-right corner is the execution button. The right part shows the execution result.</p>
</li></ol>
</div>
<div class="section" id="EN-US_TOPIC_0000001938377744__section1989015485381"><h4 class="sectiontitle">Enabling Large Query Isolation</h4><p id="EN-US_TOPIC_0000001938377744__p1389074810381">Large query isolation is enabled by default, while global query timeout is disabled by default. If you enable them, the configuration will take effect immediately.</p>
<div class="p" id="EN-US_TOPIC_0000001938377744__p1484525634017">Run the following commands to enable large query isolation and global query timeout:<pre class="screen" id="EN-US_TOPIC_0000001938377744__screen148911248163820">PUT _cluster/settings
{
"persistent": {
"search.isolator.enabled": true,
"search.isolator.time.enabled": true
}
}</pre>
</div>
<p id="EN-US_TOPIC_0000001938377744__p1189115481382">The two features each has an independent switch. <a href="#EN-US_TOPIC_0000001938377744__table289124893815">Table 1</a> describes their parameters.</p>
<div class="tablenoborder"><a name="EN-US_TOPIC_0000001938377744__table289124893815"></a><a name="table289124893815"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001938377744__table289124893815" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameters for configuring large query isolation and global query timeout</caption><thead align="left"><tr id="EN-US_TOPIC_0000001938377744__row489117481381"><th align="left" class="cellrowborder" valign="top" width="22.81%" id="mcps1.3.4.5.2.4.1.1"><p id="EN-US_TOPIC_0000001938377744__p889115483388">Switch</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="32.1%" id="mcps1.3.4.5.2.4.1.2"><p id="EN-US_TOPIC_0000001938377744__p1789124819385">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="45.09%" id="mcps1.3.4.5.2.4.1.3"><p id="EN-US_TOPIC_0000001938377744__p16891648183815">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001938377744__row19891164823817"><td class="cellrowborder" rowspan="3" valign="top" width="22.81%" headers="mcps1.3.4.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001938377744__p1189113487386">search.isolator.enabled</p>
</td>
<td class="cellrowborder" valign="top" width="32.1%" headers="mcps1.3.4.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001938377744__p1989134813386">search.isolator.memory.task.limit</p>
<p id="EN-US_TOPIC_0000001938377744__p108911948183814">search.isolator.time.management</p>
</td>
<td class="cellrowborder" valign="top" width="45.09%" headers="mcps1.3.4.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001938377744__p1689218487388">Thresholds for identifying a single shard query task as a large query.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001938377744__row3892948183819"><td class="cellrowborder" valign="top" headers="mcps1.3.4.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001938377744__p689214489386">search.isolator.memory.pool.limit</p>
<p id="EN-US_TOPIC_0000001938377744__p9892194823811">search.isolator.memory.heap.limit</p>
<p id="EN-US_TOPIC_0000001938377744__p689216486386">search.isolator.count.limit</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.4.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001938377744__p13892448163818">Resource usage thresholds for isolation. If the resource usage of a query task exceeds one of these thresholds, the task will be paused.</p>
<div class="note" id="EN-US_TOPIC_0000001938377744__note2892748153819"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="EN-US_TOPIC_0000001938377744__p88921648113818"><span class="parmname" id="EN-US_TOPIC_0000001938377744__en-us_topic_0000001223914380_parmname14867422141414"><b>search.isolator.memory.heap.limit</b></span> defines the limit on the heap memory consumed by write, query, and other operations of a node. If this limit is exceeded, large query tasks in the isolation pool will be paused.</p>
</div></div>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001938377744__row1489217489387"><td class="cellrowborder" valign="top" headers="mcps1.3.4.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001938377744__p0892248193818">search.isolator.strategy</p>
<p id="EN-US_TOPIC_0000001938377744__p28921448123810">search.isolator.strategy.ratio</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.4.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001938377744__p15892134820383">Policy for selecting query tasks to pause in the isolation pool.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001938377744__row68921448143810"><td class="cellrowborder" valign="top" width="22.81%" headers="mcps1.3.4.5.2.4.1.1 "><p id="EN-US_TOPIC_0000001938377744__p1389244819382">search.isolator.time.enabled</p>
</td>
<td class="cellrowborder" valign="top" width="32.1%" headers="mcps1.3.4.5.2.4.1.2 "><p id="EN-US_TOPIC_0000001938377744__p5893174813817">search.isolator.time.limit</p>
</td>
<td class="cellrowborder" valign="top" width="45.09%" headers="mcps1.3.4.5.2.4.1.3 "><p id="EN-US_TOPIC_0000001938377744__p18936485383">Global timeout for query tasks.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0000001938377744__section1228710519418"><h4 class="sectiontitle">Configuring Large Query Isolation Thresholds</h4><ul id="EN-US_TOPIC_0000001938377744__ul189324803817"><li id="EN-US_TOPIC_0000001938377744__li15893248153819">Run the following commands to configure thresholds for defining a large query task:<pre class="screen" id="EN-US_TOPIC_0000001938377744__screen389314482385">PUT _cluster/settings
{
"persistent": {
"search.isolator.memory.task.limit": "50MB",
"search.isolator.time.management": "10s"
}
}</pre>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001938377744__table589364815382" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameters for configuring large query isolation thresholds</caption><thead align="left"><tr id="EN-US_TOPIC_0000001938377744__row1893114811383"><th align="left" class="cellrowborder" valign="top" width="30%" id="mcps1.3.5.2.1.2.2.4.1.1"><p id="EN-US_TOPIC_0000001938377744__p889374818380">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.2.1.2.2.4.1.2"><p id="EN-US_TOPIC_0000001938377744__p089344893816">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.5.2.1.2.2.4.1.3"><p id="EN-US_TOPIC_0000001938377744__p11893104863810">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001938377744__row15893134819386"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.5.2.1.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001938377744__p58941848163818">search.isolator.memory.task.limit</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.2.1.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001938377744__p16894104853819">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001938377744__p1989434833816">Threshold of the memory requested by a query task to perform aggregation or other operations. If the requested memory exceeds the threshold, the task will be isolated and observed.</p>
<ul id="EN-US_TOPIC_0000001938377744__ul389494833810"><li id="EN-US_TOPIC_0000001938377744__li16894948133812">Value range: <strong id="EN-US_TOPIC_0000001938377744__b81660824011325">0b</strong> to the maximum heap memory of a node</li><li id="EN-US_TOPIC_0000001938377744__li68941048203814">Default value: <strong id="EN-US_TOPIC_0000001938377744__b88020801111325">50MB</strong></li></ul>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001938377744__row1589424819386"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.5.2.1.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001938377744__p289454814384">search.isolator.time.management</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.2.1.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001938377744__p1489464873812">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001938377744__p4894144817387">Threshold of the duration of a query (started when cluster resources are used for query). If the duration of a query exceeds the threshold, it will be isolated and observed.</p>
<ul id="EN-US_TOPIC_0000001938377744__ul389474815384"><li id="EN-US_TOPIC_0000001938377744__li2089414483382">Value range: ≥ <strong id="EN-US_TOPIC_0000001938377744__b32504079611325">0ms</strong></li><li id="EN-US_TOPIC_0000001938377744__li148942481388">Default value: <strong id="EN-US_TOPIC_0000001938377744__b1429178102312">10s</strong></li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="EN-US_TOPIC_0000001938377744__li889415488389">Configure the resource usage thresholds for triggering the isolation of query tasks.<pre class="screen" id="EN-US_TOPIC_0000001938377744__screen16894144863817">PUT _cluster/settings
{
"persistent": {
"search.isolator.memory.pool.limit": "50%",
"search.isolator.memory.heap.limit": "90%",
"search.isolator.count.limit": 1000
}
}</pre>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001938377744__table9895154812386" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Parameters for configuring isolation pool thresholds</caption><thead align="left"><tr id="EN-US_TOPIC_0000001938377744__row1489544883812"><th align="left" class="cellrowborder" valign="top" width="30%" id="mcps1.3.5.2.2.2.2.4.1.1"><p id="EN-US_TOPIC_0000001938377744__p13895144810383">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.2.2.2.2.4.1.2"><p id="EN-US_TOPIC_0000001938377744__p15895184823815">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.5.2.2.2.2.4.1.3"><p id="EN-US_TOPIC_0000001938377744__p889511488382">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001938377744__row9895448193811"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.5.2.2.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001938377744__p7895154820386">search.isolator.memory.pool.limit</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.2.2.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001938377744__p88957483382">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.2.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001938377744__p1289517482381">Threshold of the heap memory percentage of the current node. If the total memory requested by large query tasks in the isolation pool exceeds the threshold, the interrupt control program will be triggered to cancel one of the tasks.</p>
<ul id="EN-US_TOPIC_0000001938377744__ul38951548133813"><li id="EN-US_TOPIC_0000001938377744__li1689594883819">Value range: <strong id="EN-US_TOPIC_0000001938377744__b55629693211325">0.0</strong> to <strong id="EN-US_TOPIC_0000001938377744__b37147400911325">100.0%</strong></li><li id="EN-US_TOPIC_0000001938377744__li38951485386">Default value: <strong id="EN-US_TOPIC_0000001938377744__b123986728911325">50%</strong></li></ul>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001938377744__row1489684833810"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.5.2.2.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001938377744__p1289612482382">search.isolator.memory.heap.limit</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.2.2.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001938377744__p138963483387">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.2.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001938377744__p4896114873815">Heap memory threshold of the current node. If the heap memory of the node exceeds the threshold, the interrupt control program will be triggered to cancel a large query task in the isolation pool.</p>
<ul id="EN-US_TOPIC_0000001938377744__ul10896448143817"><li id="EN-US_TOPIC_0000001938377744__li78962048173810">Value range: <strong id="EN-US_TOPIC_0000001938377744__b2686651611325">0.0</strong> to <strong id="EN-US_TOPIC_0000001938377744__b31454809711325">100.0%</strong></li><li id="EN-US_TOPIC_0000001938377744__li12896448183811">Default value: <strong id="EN-US_TOPIC_0000001938377744__b54260103611325">90%</strong></li></ul>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001938377744__row118966484384"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.5.2.2.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001938377744__p1089624853815">search.isolator.count.limit</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.2.2.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001938377744__p13896154883820">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.2.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001938377744__p3896348163812">Threshold of the number of large query tasks in the current node isolation pool. If the number of observed query tasks exceeds the threshold, the interrupt control program will be triggered to stop accepting new large queries. New large query requests will be directly canceled.</p>
<ul id="EN-US_TOPIC_0000001938377744__ul3896184818388"><li id="EN-US_TOPIC_0000001938377744__li189664853816">Value range: <strong id="EN-US_TOPIC_0000001938377744__b106202835511325">10</strong><strong id="EN-US_TOPIC_0000001938377744__b131723207711325">50000</strong></li><li id="EN-US_TOPIC_0000001938377744__li1896134818384">Default value: <strong id="EN-US_TOPIC_0000001938377744__b168343721611325">1000</strong></li></ul>
</td>
</tr>
</tbody>
</table>
</div>
<div class="note" id="EN-US_TOPIC_0000001938377744__note14896104893811"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001938377744__p2896144893818">In addition to <span class="parmname" id="EN-US_TOPIC_0000001938377744__parmname11887666411325"><b>search.isolator.memory.pool.limit</b></span> and <span class="parmname" id="EN-US_TOPIC_0000001938377744__parmname71675397411325"><b>search.isolator.count.limit</b></span> parameters, you can configure <span class="parmname" id="EN-US_TOPIC_0000001938377744__parmname116505225311325"><b>search.isolator.memory.task.limit</b></span> and <span class="parmname" id="EN-US_TOPIC_0000001938377744__parmname47363958211325"><b>search.isolator.time.management</b></span> to control the number of query tasks that enter the isolation pool.</p>
</div></div>
</li><li id="EN-US_TOPIC_0000001938377744__li7897144823816">Configure a policy for selecting query tasks to pause in the isolation pool.<pre class="screen" id="EN-US_TOPIC_0000001938377744__screen1189710483382">PUT _cluster/settings
{
"persistent": {
"search.isolator.strategy": "fair",
"search.isolator.strategy.ratio": "0.5%"
}
}</pre>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001938377744__table289711482384" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Parameters for configuring a query cancelation policy</caption><thead align="left"><tr id="EN-US_TOPIC_0000001938377744__row18897148143813"><th align="left" class="cellrowborder" valign="top" width="30%" id="mcps1.3.5.2.3.2.2.4.1.1"><p id="EN-US_TOPIC_0000001938377744__p158971348193812">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.2.3.2.2.4.1.2"><p id="EN-US_TOPIC_0000001938377744__p28971248193812">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.5.2.3.2.2.4.1.3"><p id="EN-US_TOPIC_0000001938377744__p58977486386">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001938377744__row1289724814389"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.5.2.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001938377744__p2089724843818">search.isolator.strategy</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.2.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001938377744__p138981148203817">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001938377744__p1889824853812">Policy for selecting large queries when the interrupt control program is triggered. The selected queries will be interrupted.</p>
<div class="note" id="EN-US_TOPIC_0000001938377744__note19898448143820"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="EN-US_TOPIC_0000001938377744__p128981748163812">The large query isolation pool is checked every second until the heap memory is within the safe range.</p>
</div></div>
<div class="p" id="EN-US_TOPIC_0000001938377744__p589824863813">Values: <strong id="EN-US_TOPIC_0000001938377744__b39667412211325">fair</strong>, <strong id="EN-US_TOPIC_0000001938377744__b61916116111325">mem-first</strong>, or <strong id="EN-US_TOPIC_0000001938377744__b115087448111325">time-first</strong><ul id="EN-US_TOPIC_0000001938377744__ul1789813483385"><li id="EN-US_TOPIC_0000001938377744__li08981748183817"><strong id="EN-US_TOPIC_0000001938377744__b47704680511325">mem-first</strong>: The query task that uses the most heap memory in the isolation pool is interrupted.</li><li id="EN-US_TOPIC_0000001938377744__li1898164814384"><strong id="EN-US_TOPIC_0000001938377744__b53721171211325">time-first</strong>: The query task that has been running for the longest time in the isolation pool is interrupted.</li><li id="EN-US_TOPIC_0000001938377744__li1489834817384"><strong id="EN-US_TOPIC_0000001938377744__b172140948511325">fair</strong>: If the difference between the heap memory of shard queries is smaller than <em id="EN-US_TOPIC_0000001938377744__i211136910811325">Maximum_heap_memory</em> x <strong id="EN-US_TOPIC_0000001938377744__b34878028111325">search.isolator.strategy.ratio</strong>, the query that takes the longest time should be interrupted. Otherwise, the query that uses the most heap memory is interrupted.</li></ul>
</div>
<p id="EN-US_TOPIC_0000001938377744__p128981248153811">Default value: <strong id="EN-US_TOPIC_0000001938377744__b198365660211325">fair</strong></p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001938377744__row19898104813810"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.5.2.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001938377744__p58982487384">search.isolator.strategy.ratio</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.2.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001938377744__p1989844843817">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001938377744__p1489818482383">Threshold of the <strong id="EN-US_TOPIC_0000001938377744__b149233042211325">fair</strong> policy. This parameter takes effect only if <strong id="EN-US_TOPIC_0000001938377744__b140793405011325">search.isolator.strategy</strong> is set to <strong id="EN-US_TOPIC_0000001938377744__b19105467511325">fair</strong>. If the difference between the memory usage of large query tasks does not exceed the threshold, the query that takes the longest time should be interrupted. If the difference between the memory usage of large query tasks exceeds the threshold, the query that uses the most memory is interrupted.</p>
<ul id="EN-US_TOPIC_0000001938377744__ul1489844873811"><li id="EN-US_TOPIC_0000001938377744__li689814812383">Value range: <strong id="EN-US_TOPIC_0000001938377744__b88317938911325">0.0</strong> to <strong id="EN-US_TOPIC_0000001938377744__b191753926611325">100.0%</strong></li><li id="EN-US_TOPIC_0000001938377744__li178981248173812">Default value: <strong id="EN-US_TOPIC_0000001938377744__b270466715104945">1%</strong></li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0000001938377744__section2589102524919"><h4 class="sectiontitle">Configuring the Global Query Timeout</h4><div class="p" id="EN-US_TOPIC_0000001938377744__p06491241144913">Run the following command to set the global timeout of query tasks:<pre class="screen" id="EN-US_TOPIC_0000001938377744__screen7649204164916">PUT _cluster/settings
{
"persistent": {
"search.isolator.time.limit": "120s"
}
}</pre>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001938377744__table76491341184916" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Description</caption><thead align="left"><tr id="EN-US_TOPIC_0000001938377744__row176491418493"><th align="left" class="cellrowborder" valign="top" width="30%" id="mcps1.3.6.2.2.2.4.1.1"><p id="EN-US_TOPIC_0000001938377744__p4650341144920">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.6.2.2.2.4.1.2"><p id="EN-US_TOPIC_0000001938377744__p16650641134916">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.6.2.2.2.4.1.3"><p id="EN-US_TOPIC_0000001938377744__p1665074114919">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001938377744__row106501841104911"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.6.2.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001938377744__p1165016411493">search.isolator.time.limit</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.6.2.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001938377744__p46508418491">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.6.2.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001938377744__p8650941164910">Global query timeout duration. Any query task that exceeds this duration will be canceled.</p>
<ul id="EN-US_TOPIC_0000001938377744__ul9650184119497"><li id="EN-US_TOPIC_0000001938377744__li13650341124915">Value range: ≥ <strong id="EN-US_TOPIC_0000001938377744__b187926155011325">0ms</strong></li><li id="EN-US_TOPIC_0000001938377744__li665084194917">Default value: <strong id="EN-US_TOPIC_0000001938377744__b720508198104945">120s</strong></li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0000001938377744__section189463525012"><h4 class="sectiontitle">Configuring the Maximum Number of Log Records for Canceled Query Requests</h4><div class="p" id="EN-US_TOPIC_0000001938377744__p16810046105011">Run the following command to set the maximum number of log records kept for canceled query requests:<pre class="screen" id="EN-US_TOPIC_0000001938377744__screen781018461500">PUT _cluster/settings
{
"persistent": {
"search.isolator.log.count": "100"
}
}</pre>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001938377744__table78101746175016" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0000001938377744__row8810146155013"><th align="left" class="cellrowborder" valign="top" width="29.67%" id="mcps1.3.7.2.2.1.4.1.1"><p id="EN-US_TOPIC_0000001938377744__p6810114645018">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="11.32%" id="mcps1.3.7.2.2.1.4.1.2"><p id="EN-US_TOPIC_0000001938377744__p4810446125018">Data Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="59.01%" id="mcps1.3.7.2.2.1.4.1.3"><p id="EN-US_TOPIC_0000001938377744__p198101146125020">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001938377744__row581019469508"><td class="cellrowborder" valign="top" width="29.67%" headers="mcps1.3.7.2.2.1.4.1.1 "><p id="EN-US_TOPIC_0000001938377744__p15810846105018">search.isolator.log.count</p>
</td>
<td class="cellrowborder" valign="top" width="11.32%" headers="mcps1.3.7.2.2.1.4.1.2 "><p id="EN-US_TOPIC_0000001938377744__p188101746155013">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="59.01%" headers="mcps1.3.7.2.2.1.4.1.3 "><p id="EN-US_TOPIC_0000001938377744__p7811124635017">Maximum number of records of canceled query requests that can be recorded in the memory.</p>
<ul id="EN-US_TOPIC_0000001938377744__ul18111146125015"><li id="EN-US_TOPIC_0000001938377744__li18112460500">Value range: 05000</li><li id="EN-US_TOPIC_0000001938377744__li1811174635017">Default value: <strong id="EN-US_TOPIC_0000001938377744__b127627921882153">100</strong></li></ul>
<div class="note" id="EN-US_TOPIC_0000001938377744__note138112468505"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="EN-US_TOPIC_0000001938377744__p1681164618509">You can use the following APIs to query canceled requests:</p>
<ul id="EN-US_TOPIC_0000001938377744__ul7811174645012"><li id="EN-US_TOPIC_0000001938377744__li1681111465507">GET /_isolator_metrics: Queries all nodes.</li><li id="EN-US_TOPIC_0000001938377744__li10811124655012">GET /_isolator_metrics/{nodeId}: Queries a single node.</li><li id="EN-US_TOPIC_0000001938377744__li2081119468502">GET /_isolator_metrics? detailed: Queries request cancellation details of all nodes.</li><li id="EN-US_TOPIC_0000001938377744__li20811104615501">GET /_isolator_metrics/{nodeId}?detailed: Queries request cancellation details of a single node.</li></ul>
<p id="EN-US_TOPIC_0000001938377744__p5811194618505">In the commands above, <strong id="EN-US_TOPIC_0000001938377744__b1873573717251">nodeId</strong> indicates the node ID.</p>
</div></div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="css_01_0111.html">Enhancing Search Capabilities for Elasticsearch Clusters</a></div>
</div>
</div>