forked from docs/doc-exports
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: zhengxiu <zhengxiu@huawei.com> Co-committed-by: zhengxiu <zhengxiu@huawei.com>
271 lines
28 KiB
HTML
271 lines
28 KiB
HTML
<a name="EN-US_TOPIC_0000002352870024"></a><a name="EN-US_TOPIC_0000002352870024"></a>
|
||
|
||
<h1 class="topictitle1">Configuring Large Query Isolation for an OpenSearch Cluster</h1>
|
||
<div id="body0000002352870024"><p id="EN-US_TOPIC_0000002352870024__p135441753320">Large query isolation can be configured to manage queries that have high memory usage or take too long to complete. This helps improve the stability of OpenSearch clusters and prevent out-of-memory (OOM) exceptions.</p>
|
||
<div class="p" id="EN-US_TOPIC_0000002352870024__p18551050123415">As business grows, your OpenSearch clusters may face mounting query pressure. Some complex queries may occupy excessive node memory, triggering frequent garbage collection or even OOM exceptions, which may compromise cluster performance and stability. Large query isolation enables effective management of memory-intensive, time-consuming query requests, ensuring cluster stability. Large query isolation includes the following:<ul id="EN-US_TOPIC_0000002352870024__ul218810513355"><li id="EN-US_TOPIC_0000002352870024__li91881651193515">Isolating large queries: Manages memory-intensive/time-consuming queries separately to avoid impacting other queries.</li><li id="EN-US_TOPIC_0000002352870024__li1818875113518">Query cancelation based on a heap memory usage threshold: Cancels a large query in the isolation pool when the node heap memory usage reaches a predefined threshold.</li><li id="EN-US_TOPIC_0000002352870024__li718895116353">Global query timeout: Automatically cancels tasks when they last longer than a predefined timeout. This timeout applies globally.</li></ul>
|
||
</div>
|
||
<div class="section" id="EN-US_TOPIC_0000002352870024__section7417195582813"><h4 class="sectiontitle">How the Feature Works</h4><ul id="EN-US_TOPIC_0000002352870024__ul183211749173719"><li id="EN-US_TOPIC_0000002352870024__li132124973710">Isolation pool management: Large queries are placed in an isolation pool, where they are managed separately from other normal queries. Tasks in the isolation pool may be canceled based on preset memory or duration thresholds.</li><li id="EN-US_TOPIC_0000002352870024__li432116491374">Query cancelation policies:<ul id="EN-US_TOPIC_0000002352870024__ul10605132863710"><li id="EN-US_TOPIC_0000002352870024__li1460582823713">fair: Selects which query to cancel by considering both memory usage and query duration.</li><li id="EN-US_TOPIC_0000002352870024__li46051628173718">mem-first: Cancels the query that has the highest memory usage.</li><li id="EN-US_TOPIC_0000002352870024__li760572814376">time-first: Cancels the query that has lasted the longest.</li></ul>
|
||
</li><li id="EN-US_TOPIC_0000002352870024__li2032104913718">Native cancel API: OpenSearch's native cancel API can be used to cancel tasks, ensuring compatibility.</li></ul>
|
||
</div>
|
||
<div class="section" id="EN-US_TOPIC_0000002352870024__section174119599287"><h4 class="sectiontitle">Constraints</h4><ul id="EN-US_TOPIC_0000002352870024__ul97341052163516"><li id="EN-US_TOPIC_0000002352870024__li15734195211353">Only OpenSearch 2.19.0 supports large query isolation.</li><li id="EN-US_TOPIC_0000002352870024__li1773411528357">Large query isolation is enabled by default, whereas global query timeout is disabled by default. If you enable them, the configuration will take effect immediately.</li></ul>
|
||
</div>
|
||
<div class="section" id="EN-US_TOPIC_0000002352870024__section253155420232"><h4 class="sectiontitle">Logging In to OpenSearch Dashboards</h4><p id="EN-US_TOPIC_0000002352870024__en-us_topic_0000002338102386_p13118645151118">Log in to OpenSearch Dashboards and go to the command execution page. OpenSearch clusters support multiple access methods. This topic uses OpenSearch Dashboards as an example to describe the operation procedures.</p>
|
||
<ol id="EN-US_TOPIC_0000002352870024__en-us_topic_0000002338102386_ol511804517115"><li id="EN-US_TOPIC_0000002352870024__en-us_topic_0000002338102386_li111185453113"><span id="EN-US_TOPIC_0000002352870024__en-us_topic_0000002338102386_ph134648105316">Log in to the CSS management console.</span></li><li id="EN-US_TOPIC_0000002352870024__en-us_topic_0000002338102386_li1711804571114">In the navigation pane on the left, choose <span class="uicontrol" id="EN-US_TOPIC_0000002352870024__en-us_topic_0000002338102386_uicontrol1511834581115"><b>Clusters > OpenSearch</b></span>.</li><li id="EN-US_TOPIC_0000002352870024__en-us_topic_0000002338102386_li201181045151113">In the cluster list, find the target cluster, and click <strong id="EN-US_TOPIC_0000002352870024__en-us_topic_0000002338102386_b8963520674129">Dashboards</strong> in the <strong id="EN-US_TOPIC_0000002352870024__en-us_topic_0000002338102386_b1363282744129">Operation</strong> column to log in to OpenSearch Dashboards.</li><li id="EN-US_TOPIC_0000002352870024__en-us_topic_0000002338102386_li811824512111">In the left navigation pane, choose <strong id="EN-US_TOPIC_0000002352870024__en-us_topic_0000002338102386_b45261424710">Dev Tools</strong>.<p id="EN-US_TOPIC_0000002352870024__en-us_topic_0000002338102386_p539424154519">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_0000002352870024__section1989015485381"><h4 class="sectiontitle">Configuring Large Query Isolation</h4><p id="EN-US_TOPIC_0000002352870024__p098915292365">Large query isolation places large queries in an isolation pool, where they may be canceled based on preset memory or duration thresholds. Large query isolation is enabled by default. Any change takes effect immediately.</p>
|
||
<ol id="EN-US_TOPIC_0000002352870024__ol145081448102818"><li id="EN-US_TOPIC_0000002352870024__li2508124822812">Run the following command to enable large query isolation:<pre class="screen" id="EN-US_TOPIC_0000002352870024__screen148911248163820">PUT _cluster/settings
|
||
{
|
||
"persistent": {
|
||
"search.isolator.enabled": true
|
||
}
|
||
}</pre>
|
||
|
||
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000002352870024__table1262182817296" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Enabling large query isolation</caption><thead align="left"><tr id="EN-US_TOPIC_0000002352870024__row1262152802914"><th align="left" class="cellrowborder" valign="top" width="30%" id="mcps1.3.6.3.1.2.2.4.1.1"><p id="EN-US_TOPIC_0000002352870024__p17629283291">Parameter</p>
|
||
</th>
|
||
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.6.3.1.2.2.4.1.2"><p id="EN-US_TOPIC_0000002352870024__p166212812295">Type</p>
|
||
</th>
|
||
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.6.3.1.2.2.4.1.3"><p id="EN-US_TOPIC_0000002352870024__p362328102918">Description</p>
|
||
</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody><tr id="EN-US_TOPIC_0000002352870024__row4621328182916"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.6.3.1.2.2.4.1.1 "><p id="EN-US_TOPIC_0000002352870024__p12629286290">search.isolator.enabled</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.6.3.1.2.2.4.1.2 "><p id="EN-US_TOPIC_0000002352870024__p1362928112913">Boolean</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.6.3.1.2.2.4.1.3 "><p id="EN-US_TOPIC_0000002352870024__p14631028102916">Whether to enable large query isolation. When enabled, large queries are managed separately from other normal queries.</p>
|
||
<ul id="EN-US_TOPIC_0000002352870024__ul136372816290"><li id="EN-US_TOPIC_0000002352870024__li1763162882917"><strong id="EN-US_TOPIC_0000002352870024__b12965185413566">true</strong> (default): Enable large query isolation.</li><li id="EN-US_TOPIC_0000002352870024__li76352814290"><strong id="EN-US_TOPIC_0000002352870024__b4880257195610">false</strong>: Disable large query isolation.</li></ul>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</li><li id="EN-US_TOPIC_0000002352870024__li15893248153819">Run the following commands to configure thresholds for defining a large query task:<pre class="screen" id="EN-US_TOPIC_0000002352870024__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_0000002352870024__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_0000002352870024__row1893114811383"><th align="left" class="cellrowborder" valign="top" width="30%" id="mcps1.3.6.3.2.2.2.4.1.1"><p id="EN-US_TOPIC_0000002352870024__p889374818380">Parameter</p>
|
||
</th>
|
||
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.6.3.2.2.2.4.1.2"><p id="EN-US_TOPIC_0000002352870024__p089344893816">Type</p>
|
||
</th>
|
||
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.6.3.2.2.2.4.1.3"><p id="EN-US_TOPIC_0000002352870024__p11893104863810">Description</p>
|
||
</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody><tr id="EN-US_TOPIC_0000002352870024__row15893134819386"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.6.3.2.2.2.4.1.1 "><p id="EN-US_TOPIC_0000002352870024__p58941848163818">search.isolator.memory.task.limit</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.6.3.2.2.2.4.1.2 "><p id="EN-US_TOPIC_0000002352870024__p16894104853819">String</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.6.3.2.2.2.4.1.3 "><p id="EN-US_TOPIC_0000002352870024__p729353714327">Large query memory threshold: When a query requests more memory than specified by this threshold, it is placed into an isolation pool.</p>
|
||
<p id="EN-US_TOPIC_0000002352870024__p31227531282">Value range: <strong id="EN-US_TOPIC_0000002352870024__b55970381232923">0b</strong> to the maximum heap memory of a node.</p>
|
||
<p id="EN-US_TOPIC_0000002352870024__p55131329498">Unit: MB, GB, or other units supported by OpenSearch.</p>
|
||
<p id="EN-US_TOPIC_0000002352870024__p267817549811">The default value is <strong id="EN-US_TOPIC_0000002352870024__b842352706155443">50 MB</strong>.</p>
|
||
</td>
|
||
</tr>
|
||
<tr id="EN-US_TOPIC_0000002352870024__row1589424819386"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.6.3.2.2.2.4.1.1 "><p id="EN-US_TOPIC_0000002352870024__p289454814384">search.isolator.time.management</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.6.3.2.2.2.4.1.2 "><p id="EN-US_TOPIC_0000002352870024__p1489464873812">String</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.6.3.2.2.2.4.1.3 "><p id="EN-US_TOPIC_0000002352870024__p1642194814325">Large query duration threshold: When a query has lasted longer than specified by this threshold, it is placed into an isolation pool.</p>
|
||
<p id="EN-US_TOPIC_0000002352870024__p1643811108123">Value range: ≥ <strong id="EN-US_TOPIC_0000002352870024__b73403752132923">0ms</strong></p>
|
||
<p id="EN-US_TOPIC_0000002352870024__p1439014112129">Unit: s (second), ms (millisecond), m (minute), or h (hour).</p>
|
||
<p id="EN-US_TOPIC_0000002352870024__p13994141241211">The default value is <strong id="EN-US_TOPIC_0000002352870024__b138451741832923">10s</strong>.</p>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</li><li id="EN-US_TOPIC_0000002352870024__li889415488389">Configure the resource usage thresholds for triggering query cancelation.<pre class="screen" id="EN-US_TOPIC_0000002352870024__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_0000002352870024__table9895154812386" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Parameters for configuring query cancelation thresholds</caption><thead align="left"><tr id="EN-US_TOPIC_0000002352870024__row1489544883812"><th align="left" class="cellrowborder" valign="top" width="30%" id="mcps1.3.6.3.3.2.2.4.1.1"><p id="EN-US_TOPIC_0000002352870024__p13895144810383">Parameter</p>
|
||
</th>
|
||
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.6.3.3.2.2.4.1.2"><p id="EN-US_TOPIC_0000002352870024__p15895184823815">Type</p>
|
||
</th>
|
||
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.6.3.3.2.2.4.1.3"><p id="EN-US_TOPIC_0000002352870024__p889511488382">Description</p>
|
||
</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody><tr id="EN-US_TOPIC_0000002352870024__row9895448193811"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.6.3.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000002352870024__p7895154820386">search.isolator.memory.pool.limit</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.6.3.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000002352870024__p88957483382">String</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.6.3.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000002352870024__p180165615137">Isolation pool memory usage threshold, which indicates the maximum node heap memory usage allowed. When the total memory requested by all large queries in the isolation pool exceeds this threshold, one of the large queries is automatically canceled based on a predefined policy.</p>
|
||
<p id="EN-US_TOPIC_0000002352870024__p6729182119145">Value range: 0.0–100.0%</p>
|
||
<p id="EN-US_TOPIC_0000002352870024__p493172681419">The default value is <strong id="EN-US_TOPIC_0000002352870024__b153638785632923">50</strong>.</p>
|
||
</td>
|
||
</tr>
|
||
<tr id="EN-US_TOPIC_0000002352870024__row1489684833810"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.6.3.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000002352870024__p1289612482382">search.isolator.memory.heap.limit</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.6.3.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000002352870024__p138963483387">String</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.6.3.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000002352870024__p1299841121413">Heap memory usage threshold, which indicates the actual node heap memory usage, contributed by both writes and queries. When the node heap memory usage exceeds this threshold, one of the large queries is automatically canceled based on a predefined policy.</p>
|
||
<p id="EN-US_TOPIC_0000002352870024__p6883925141517">Value range: 0.0–100.0%</p>
|
||
<p id="EN-US_TOPIC_0000002352870024__p114572771517">The default value is 90%.</p>
|
||
</td>
|
||
</tr>
|
||
<tr id="EN-US_TOPIC_0000002352870024__row118966484384"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.6.3.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000002352870024__p1089624853815">search.isolator.count.limit</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.6.3.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000002352870024__p13896154883820">Integer</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.6.3.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000002352870024__p1991133083610">The maximum number of queries in the isolation pool. When this threshold is reached, query cancelation is triggered, and no new queries will be accepted.</p>
|
||
<p id="EN-US_TOPIC_0000002352870024__p3896348163812">Value range: <strong id="EN-US_TOPIC_0000002352870024__b168321907811121">10</strong>–<strong id="EN-US_TOPIC_0000002352870024__b95889006011121">50000</strong></p>
|
||
<p id="EN-US_TOPIC_0000002352870024__p11243163591712">The default value is <strong id="EN-US_TOPIC_0000002352870024__b943416286301">1000</strong>.</p>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="note" id="EN-US_TOPIC_0000002352870024__note14896104893811"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000002352870024__p2896144893818">In addition to <span class="parmname" id="EN-US_TOPIC_0000002352870024__parmname4896148143813"><b>search.isolator.memory.pool.limit</b></span> and <span class="parmname" id="EN-US_TOPIC_0000002352870024__parmname1989734843818"><b>search.isolator.count.limit</b></span>, you can configure <span class="parmname" id="EN-US_TOPIC_0000002352870024__parmname189714833814"><b>search.isolator.memory.task.limit</b></span> and <span class="parmname" id="EN-US_TOPIC_0000002352870024__parmname489724819381"><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_0000002352870024__li7897144823816">Configure a policy for selecting queries to cancel in the isolation pool.<pre class="screen" id="EN-US_TOPIC_0000002352870024__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_0000002352870024__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_0000002352870024__row18897148143813"><th align="left" class="cellrowborder" valign="top" width="30%" id="mcps1.3.6.3.4.2.2.4.1.1"><p id="EN-US_TOPIC_0000002352870024__p158971348193812">Parameter</p>
|
||
</th>
|
||
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.6.3.4.2.2.4.1.2"><p id="EN-US_TOPIC_0000002352870024__p28971248193812">Type</p>
|
||
</th>
|
||
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.6.3.4.2.2.4.1.3"><p id="EN-US_TOPIC_0000002352870024__p58977486386">Description</p>
|
||
</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody><tr id="EN-US_TOPIC_0000002352870024__row1289724814389"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.6.3.4.2.2.4.1.1 "><p id="EN-US_TOPIC_0000002352870024__p2089724843818">search.isolator.strategy</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.6.3.4.2.2.4.1.2 "><p id="EN-US_TOPIC_0000002352870024__p138981148203817">String</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.6.3.4.2.2.4.1.3 "><p id="EN-US_TOPIC_0000002352870024__p14785716122513">Policy for selecting which query to cancel when query isolation is triggered.</p>
|
||
<ul id="EN-US_TOPIC_0000002352870024__ul9736310132515"><li id="EN-US_TOPIC_0000002352870024__li1473661015252">fair (default): Selects which query to cancel by considering both memory usage and query duration. If the difference between the memory used by two queries ≤ <span class="parmvalue" id="EN-US_TOPIC_0000002352870024__parmvalue5117347202310"><b>maximum node heap memory x fair policy threshold</b></span>, the query that has lasted the longest is canceled; on the contrary, if it is greater than that, the most memory-intensive query is canceled instead.</li><li id="EN-US_TOPIC_0000002352870024__li197362010122510">mem-first: Cancels the query that has the highest memory usage.</li><li id="EN-US_TOPIC_0000002352870024__li14736161017258">time-first: Cancels the query that has lasted the longest.</li></ul>
|
||
<p id="EN-US_TOPIC_0000002352870024__p128981748163812">The large query isolation pool is checked every second until the heap memory is within the safe range.</p>
|
||
</td>
|
||
</tr>
|
||
<tr id="EN-US_TOPIC_0000002352870024__row19898104813810"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.6.3.4.2.2.4.1.1 "><p id="EN-US_TOPIC_0000002352870024__p58982487384">search.isolator.strategy.ratio</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.6.3.4.2.2.4.1.2 "><p id="EN-US_TOPIC_0000002352870024__p1989844843817">String</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.6.3.4.2.2.4.1.3 "><p id="EN-US_TOPIC_0000002352870024__p1543185014366">Fair policy threshold, which is the ratio of the memory difference between two queries in the isolation pool to the maximum node heap memory. If this threshold is not reached, the query that has lasted the longest will be canceled. Otherwise, the query that occupies the most memory will be canceled.</p>
|
||
<p id="EN-US_TOPIC_0000002352870024__p1489818482383">This parameter is valid only when <span class="parmname" id="EN-US_TOPIC_0000002352870024__parmname17896164812716"><b>search.isolator.strategy</b></span> is set to <span class="parmvalue" id="EN-US_TOPIC_0000002352870024__parmvalue1887855192711"><b>fair</b></span>.</p>
|
||
<p id="EN-US_TOPIC_0000002352870024__p12445849202612">Value range: 0.0–100.0%</p>
|
||
<p id="EN-US_TOPIC_0000002352870024__p987135032614">The default value is <strong id="EN-US_TOPIC_0000002352870024__b160024735432923">1</strong>.</p>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</li></ol>
|
||
</div>
|
||
<div class="section" id="EN-US_TOPIC_0000002352870024__section2589102524919"><h4 class="sectiontitle">Configuring Global Query Timeout</h4><p id="EN-US_TOPIC_0000002352870024__p17289183532620">A global query timeout, as the name indicates, applies to all queries. Global query timeout is disabled by default. Any change takes effect immediately.</p>
|
||
<div class="p" id="EN-US_TOPIC_0000002352870024__p06491241144913">Run the following command to enable and configure a global query timeout:<pre class="screen" id="EN-US_TOPIC_0000002352870024__screen7649204164916">PUT _cluster/settings
|
||
{
|
||
"persistent": {
|
||
"search.isolator.time.enabled": true,
|
||
"search.isolator.time.limit": "110s"
|
||
}
|
||
}</pre>
|
||
|
||
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000002352870024__table76491341184916" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Parameter description</caption><thead align="left"><tr id="EN-US_TOPIC_0000002352870024__row176491418493"><th align="left" class="cellrowborder" valign="top" width="30%" id="mcps1.3.7.3.2.2.4.1.1"><p id="EN-US_TOPIC_0000002352870024__p4650341144920">Parameter</p>
|
||
</th>
|
||
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.7.3.2.2.4.1.2"><p id="EN-US_TOPIC_0000002352870024__p16650641134916">Type</p>
|
||
</th>
|
||
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.7.3.2.2.4.1.3"><p id="EN-US_TOPIC_0000002352870024__p1665074114919">Description</p>
|
||
</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody><tr id="EN-US_TOPIC_0000002352870024__row134131237174120"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.7.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000002352870024__p94131137184117">search.isolator.time.enabled</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.7.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000002352870024__en-us_topic_0000001485533945_en-us_topic_0000001228531978_p51961214407">Boolean</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.7.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000002352870024__p3538192034416">Whether to enable a global query timeout. When enabled, queries are automatically canceled when they last longer than a predefined timeout.</p>
|
||
<ul id="EN-US_TOPIC_0000002352870024__ul6855143719218"><li id="EN-US_TOPIC_0000002352870024__li385517373211">true: Enable global query timeout.</li><li id="EN-US_TOPIC_0000002352870024__li685512371327">false (default): Disable global query timeout.</li></ul>
|
||
</td>
|
||
</tr>
|
||
<tr id="EN-US_TOPIC_0000002352870024__row106501841104911"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.7.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0000002352870024__p1165016411493">search.isolator.time.limit</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.7.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0000002352870024__p46508418491">String</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.7.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0000002352870024__p78888315457">The value of the global query timeout.</p>
|
||
<p id="EN-US_TOPIC_0000002352870024__p057743912216">Value range: ≥ 0 ms</p>
|
||
<p id="EN-US_TOPIC_0000002352870024__p17509123752211">The default value is 120s.</p>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="section" id="EN-US_TOPIC_0000002352870024__section189463525012"><h4 class="sectiontitle">Configuring the Maximum Number of Log Records Retained for Query Cancelation</h4><div class="p" id="EN-US_TOPIC_0000002352870024__p16810046105011">Run the following command to set the maximum number of log records retained for canceled queries:<pre class="screen" id="EN-US_TOPIC_0000002352870024__screen781018461500">PUT _cluster/settings
|
||
{
|
||
"persistent": {
|
||
"search.isolator.log.count": "100"
|
||
}
|
||
}</pre>
|
||
|
||
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000002352870024__table78101746175016" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0000002352870024__row8810146155013"><th align="left" class="cellrowborder" valign="top" width="29.67%" id="mcps1.3.8.2.2.1.4.1.1"><p id="EN-US_TOPIC_0000002352870024__p6810114645018">Parameter</p>
|
||
</th>
|
||
<th align="left" class="cellrowborder" valign="top" width="11.32%" id="mcps1.3.8.2.2.1.4.1.2"><p id="EN-US_TOPIC_0000002352870024__p4810446125018">Data Type</p>
|
||
</th>
|
||
<th align="left" class="cellrowborder" valign="top" width="59.01%" id="mcps1.3.8.2.2.1.4.1.3"><p id="EN-US_TOPIC_0000002352870024__p198101146125020">Description</p>
|
||
</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody><tr id="EN-US_TOPIC_0000002352870024__row581019469508"><td class="cellrowborder" valign="top" width="29.67%" headers="mcps1.3.8.2.2.1.4.1.1 "><p id="EN-US_TOPIC_0000002352870024__p15810846105018">search.isolator.log.count</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="11.32%" headers="mcps1.3.8.2.2.1.4.1.2 "><p id="EN-US_TOPIC_0000002352870024__p188101746155013">Integer</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="59.01%" headers="mcps1.3.8.2.2.1.4.1.3 "><p id="EN-US_TOPIC_0000002352870024__p7811124635017">Maximum number of log records retained for canceled queries. Canceled query requests are recorded in the memory for the purpose of analyzing and optimizing large queries. Excess records will be discarded.</p>
|
||
<p id="EN-US_TOPIC_0000002352870024__p122239443321">This parameter is valid only when <span class="parmname" id="EN-US_TOPIC_0000002352870024__parmname6311131018331"><b>search.isolator.enabled</b></span> is set to <span class="parmvalue" id="EN-US_TOPIC_0000002352870024__parmvalue3594192514315"><b>true</b></span>.</p>
|
||
<p id="EN-US_TOPIC_0000002352870024__p7218185212300">Value range: 0–5000</p>
|
||
<p id="EN-US_TOPIC_0000002352870024__p1648814719318">The default value is <strong id="EN-US_TOPIC_0000002352870024__b210810450532923">100</strong>.</p>
|
||
<p id="EN-US_TOPIC_0000002352870024__p413823713319">You can use the following API to check query cancelation logs:</p>
|
||
<ul id="EN-US_TOPIC_0000002352870024__ul10557194563215"><li id="EN-US_TOPIC_0000002352870024__li1555764573216">Query all nodes:<pre class="screen" id="EN-US_TOPIC_0000002352870024__screen6176827123317">GET /_isolator_metrics</pre>
|
||
</li><li id="EN-US_TOPIC_0000002352870024__li1955720459324">Query a single node:<pre class="screen" id="EN-US_TOPIC_0000002352870024__screen14887133218332">GET /_isolator_metrics/{nodeId}</pre>
|
||
</li><li id="EN-US_TOPIC_0000002352870024__li1055774513325">Query details about canceled queries on all nodes:<pre class="screen" id="EN-US_TOPIC_0000002352870024__screen198268563334">GET /_isolator_metrics?detailed</pre>
|
||
</li><li id="EN-US_TOPIC_0000002352870024__li555714452324">Query details about canceled queries on a single node:<pre class="screen" id="EN-US_TOPIC_0000002352870024__screen2539161463414">GET /_isolator_metrics/{nodeId}?detailed</pre>
|
||
</li></ul>
|
||
<p id="EN-US_TOPIC_0000002352870024__p14177832153117">In the commands above, <strong id="EN-US_TOPIC_0000002352870024__b14207182032923">nodeId</strong> indicates the node ID. Example response:</p>
|
||
<pre class="screen" id="EN-US_TOPIC_0000002352870024__screen65957220591">{
|
||
"_nodes": {
|
||
"total": 1,
|
||
"successful": 1,
|
||
"failed": 0
|
||
},
|
||
"cluster_name": "test",
|
||
"nodes": {
|
||
"CTqrZFXWTzmLonSZyNMKkQ": {
|
||
"name": "test-ess-esn-1-1",
|
||
"host": "172.16.101.116",
|
||
"total_cancel": 0, //Total number of canceled queries
|
||
"isolator_cancel": 0, //Number of queries canceled because isolation pool thresholds were exceeded
|
||
"out_of_time_cancel": 0 //Number of queries canceled due to timeout
|
||
}
|
||
}
|
||
}</pre>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div>
|
||
<div class="familylinks">
|
||
<div class="parentlink"><strong>Parent topic:</strong> <a href="css_01_0095.html">Enhancing Search Capabilities for OpenSearch Clusters</a></div>
|
||
</div>
|
||
</div>
|
||
|