doc-exports/docs/css/umn/css_01_0147.html
Wuwan, Qi 050b395397 CSS UMN 23.2.1 20230926
Reviewed-by: Kacur, Michal <michal.kacur@t-systems.com>
Co-authored-by: Wuwan, Qi <wuwanqi1@noreply.gitea.eco.tsi-dev.otc-service.com>
Co-committed-by: Wuwan, Qi <wuwanqi1@noreply.gitea.eco.tsi-dev.otc-service.com>
2024-01-10 14:23:15 +00:00

93 lines
10 KiB
HTML
Raw Permalink 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="css_01_0147"></a><a name="css_01_0147"></a>
<h1 class="topictitle1">CPU Flow Control</h1>
<div id="body0000001273691633"><div class="section" id="css_01_0147__en-us_topic_0000001273691633_section104847386416"><h4 class="sectiontitle">Context</h4><p id="css_01_0147__en-us_topic_0000001273691633_p194073135467">CPU flow control can be implemented based on the CPU usage of a node.</p>
<p id="css_01_0147__en-us_topic_0000001273691633_p146651329543">You can configure the CPU usage threshold of a node to prevent the node from breaking down due to heavy traffic. You can determine the CPU usage threshold based on the traffic threshold. If the CPU usage of a node exceeds the configured threshold, CPU flow control discards excess node requests to protect the cluster. Traffic within the node or passing through Elasticsearch monitoring APIs are not affected.</p>
<p id="css_01_0147__en-us_topic_0000001273691633_p1327218103711">The following table describes CPU flow control parameters.</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="css_01_0147__en-us_topic_0000001273691633_table14407101344613" frame="border" border="1" rules="all"><caption><b>Table 1 </b>CPU flow control parameters</caption><thead align="left"><tr id="css_01_0147__en-us_topic_0000001273691633_row17407161324617"><th align="left" class="cellrowborder" valign="top" width="31.10688931106889%" id="mcps1.3.1.5.2.4.1.1"><p id="css_01_0147__en-us_topic_0000001273691633_p16407141334617">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15.13848615138486%" id="mcps1.3.1.5.2.4.1.2"><p id="css_01_0147__en-us_topic_0000001273691633_p1440710134467">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="53.75462453754625%" id="mcps1.3.1.5.2.4.1.3"><p id="css_01_0147__en-us_topic_0000001273691633_p1540715134464">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="css_01_0147__en-us_topic_0000001273691633_row640815138461"><td class="cellrowborder" valign="top" width="31.10688931106889%" headers="mcps1.3.1.5.2.4.1.1 "><p id="css_01_0147__en-us_topic_0000001273691633_p5408131344615">flowcontrol.cpu.enabled</p>
</td>
<td class="cellrowborder" valign="top" width="15.13848615138486%" headers="mcps1.3.1.5.2.4.1.2 "><p id="css_01_0147__en-us_topic_0000001273691633_p540891374617">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="53.75462453754625%" headers="mcps1.3.1.5.2.4.1.3 "><p id="css_01_0147__en-us_topic_0000001273691633_p2040811304618">Whether to enable CPU flow control. If this function is enabled, the node access performance may be affected.</p>
<p id="css_01_0147__en-us_topic_0000001273691633_p17408151316462">Value: <strong id="css_01_0147__en-us_topic_0000001273691633_b47434978031750">true</strong> or <strong id="css_01_0147__en-us_topic_0000001273691633_b136000950831750">false</strong></p>
<p id="css_01_0147__en-us_topic_0000001273691633_p15408613124613">Default value: <strong id="css_01_0147__en-us_topic_0000001273691633_b88189508131750">false</strong></p>
</td>
</tr>
<tr id="css_01_0147__en-us_topic_0000001273691633_row1140871314466"><td class="cellrowborder" valign="top" width="31.10688931106889%" headers="mcps1.3.1.5.2.4.1.1 "><p id="css_01_0147__en-us_topic_0000001273691633_p4409813174617">flowcontrol.cpu.percent_limit</p>
</td>
<td class="cellrowborder" valign="top" width="15.13848615138486%" headers="mcps1.3.1.5.2.4.1.2 "><p id="css_01_0147__en-us_topic_0000001273691633_p17410171364610">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="53.75462453754625%" headers="mcps1.3.1.5.2.4.1.3 "><p id="css_01_0147__en-us_topic_0000001273691633_p19410913114620">Maximum CPU usage of a node.</p>
<p id="css_01_0147__en-us_topic_0000001273691633_p7410181315466">Value range: 0100</p>
<p id="css_01_0147__en-us_topic_0000001273691633_p641181320464">Default value: <strong id="css_01_0147__en-us_topic_0000001273691633_b37083175431750">90</strong></p>
</td>
</tr>
<tr id="css_01_0147__en-us_topic_0000001273691633_row1248374514562"><td class="cellrowborder" valign="top" width="31.10688931106889%" headers="mcps1.3.1.5.2.4.1.1 "><p id="css_01_0147__en-us_topic_0000001273691633_p204838454568">flowcontrol.cpu.allow_path</p>
</td>
<td class="cellrowborder" valign="top" width="15.13848615138486%" headers="mcps1.3.1.5.2.4.1.2 "><p id="css_01_0147__en-us_topic_0000001273691633_p448394545612">List</p>
</td>
<td class="cellrowborder" valign="top" width="53.75462453754625%" headers="mcps1.3.1.5.2.4.1.3 "><p id="css_01_0147__en-us_topic_0000001273691633_p6483245195610">Path whitelist for CPU flow control. The paths specified in the <strong id="css_01_0147__en-us_topic_0000001273691633_b187811146132511">allow_path</strong> whitelist are not under CPU flow control.</p>
<p id="css_01_0147__en-us_topic_0000001273691633_p121619635918">The default value is null.</p>
<p id="css_01_0147__en-us_topic_0000001273691633_p193111305918">A path can contain up to 32 characters. A maximum of 10 request paths can be configured. Wildcard characters are supported. For example, if this parameter is set to <strong id="css_01_0147__en-us_topic_0000001273691633_b19112181912487">auto_*/_search</strong>, all the search requests of the indexes prefixed with <strong id="css_01_0147__en-us_topic_0000001273691633_b7721105064810">auto_</strong> are not under the flow control.</p>
</td>
</tr>
<tr id="css_01_0147__en-us_topic_0000001273691633_row1240975373918"><td class="cellrowborder" valign="top" width="31.10688931106889%" headers="mcps1.3.1.5.2.4.1.1 "><p id="css_01_0147__en-us_topic_0000001273691633_p1543653217440">flowcontrol.cpu.*.filter_path</p>
</td>
<td class="cellrowborder" valign="top" width="15.13848615138486%" headers="mcps1.3.1.5.2.4.1.2 "><p id="css_01_0147__en-us_topic_0000001273691633_p44104533391">String</p>
</td>
<td class="cellrowborder" valign="top" width="53.75462453754625%" headers="mcps1.3.1.5.2.4.1.3 "><p id="css_01_0147__en-us_topic_0000001273691633_p278035844311">Paths under CPU flow control.</p>
<p id="css_01_0147__en-us_topic_0000001273691633_p10780958184317">Maximum length: 32 characters</p>
<p id="css_01_0147__en-us_topic_0000001273691633_p57801958124314">Example:</p>
<p id="css_01_0147__en-us_topic_0000001273691633_p778005813439">"flowcontrol.cpu.search.filter_path": "/index/_search",</p>
<p id="css_01_0147__en-us_topic_0000001273691633_p12780145819434">"flowcontrol.cpu.search.limit": 60,</p>
<p id="css_01_0147__en-us_topic_0000001273691633_p107801858144312">The default value is <strong id="css_01_0147__en-us_topic_0000001273691633_b15459173595011">**</strong>, indicating all paths. If <strong id="css_01_0147__en-us_topic_0000001273691633_b12601719135112">limit</strong> is configured and <strong id="css_01_0147__en-us_topic_0000001273691633_b18266121955110">filter_path</strong> is not, it indicates that all the paths, except those in the whitelist, are under control. The whitelist takes precedence over the single-path rule. If a path is specified in both <strong id="css_01_0147__en-us_topic_0000001273691633_b16194143619518">allow_path</strong> and <strong id="css_01_0147__en-us_topic_0000001273691633_b1319413366511">filter_path</strong>, the requests from the path will be allowed.</p>
<p id="css_01_0147__en-us_topic_0000001273691633_p1678095854311">For example, if both <strong id="css_01_0147__en-us_topic_0000001273691633_b9712434145417">filter_path</strong> and <strong id="css_01_0147__en-us_topic_0000001273691633_b953611377541">allow_path</strong> both set to <strong id="css_01_0147__en-us_topic_0000001273691633_b18599248195514">abc/_search</strong>, then <strong id="css_01_0147__en-us_topic_0000001273691633_b79291795565">abc/_search</strong> will not be under flow control.</p>
</td>
</tr>
<tr id="css_01_0147__en-us_topic_0000001273691633_row1998963404018"><td class="cellrowborder" valign="top" width="31.10688931106889%" headers="mcps1.3.1.5.2.4.1.1 "><p id="css_01_0147__en-us_topic_0000001273691633_p11410105317394">flowcontrol.cpu.*.limit</p>
</td>
<td class="cellrowborder" valign="top" width="15.13848615138486%" headers="mcps1.3.1.5.2.4.1.2 "><p id="css_01_0147__en-us_topic_0000001273691633_p798913348409">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="53.75462453754625%" headers="mcps1.3.1.5.2.4.1.3 "><p id="css_01_0147__en-us_topic_0000001273691633_p111014568455">CPU threshold of request paths. If the CPU usage exceeds the threshold, flow control will be triggered.</p>
<p id="css_01_0147__en-us_topic_0000001273691633_p51035664519">Value range: 0100</p>
<p id="css_01_0147__en-us_topic_0000001273691633_p610105619451">Default value: <strong id="css_01_0147__en-us_topic_0000001273691633_b64419827431750">90</strong></p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="css_01_0147__en-us_topic_0000001273691633_section08193139418"><h4 class="sectiontitle">Procedure</h4><ol id="css_01_0147__en-us_topic_0000001273691633_ol927111214106"><li id="css_01_0147__en-us_topic_0000001273691633_li1274916552817">Log in to the CSS management console.</li><li id="css_01_0147__en-us_topic_0000001273691633_li1274935516811">Choose <strong id="css_01_0147__en-us_topic_0000001273691633_b260510220439">Clusters</strong> in the navigation pane. On the <strong id="css_01_0147__en-us_topic_0000001273691633_b1818033320533">Clusters</strong> page, locate the target cluster and click <strong id="css_01_0147__en-us_topic_0000001273691633_b13186033115320">Access Kibana</strong> in the <strong id="css_01_0147__en-us_topic_0000001273691633_b5186193316531">Operation</strong> column.</li><li id="css_01_0147__en-us_topic_0000001273691633_li927171291011">In the navigation pane on the left, choose <strong id="css_01_0147__en-us_topic_0000001273691633_b16381651443">Dev Tools</strong> and run commands to enable or disable memory flow control.<ul id="css_01_0147__en-us_topic_0000001273691633_ul881330175718"><li id="css_01_0147__en-us_topic_0000001273691633_li149113015572">Enabling CPU flow control<pre class="screen" id="css_01_0147__en-us_topic_0000001273691633_screen192030125717">PUT /_cluster/settings
{
"persistent": {
"flowcontrol.cpu.enabled": true,
"flowcontrol.cpu.percent_limit": 80,
"flowcontrol.cpu.allow_path": ["index/_search"]
}
}</pre>
</li><li id="css_01_0147__en-us_topic_0000001273691633_li149123055713">Disabling CPU flow control<pre class="screen" id="css_01_0147__en-us_topic_0000001273691633_screen20923045713">PUT /_cluster/settings
{
"persistent": {
"flowcontrol.cpu.enabled": false
}
}</pre>
</li></ul>
</li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="css_01_0139.html">Flow Control 1.0</a></div>
</div>
</div>