forked from docs/doc-exports
Reviewed-by: Eotvos, Oliver <oliver.eotvos@t-systems.com> Co-authored-by: qiujiandong1 <qiujiandong1@huawei.com> Co-committed-by: qiujiandong1 <qiujiandong1@huawei.com>
67 lines
8.4 KiB
HTML
67 lines
8.4 KiB
HTML
<a name="ucs_01_0260"></a><a name="ucs_01_0260"></a>
|
||
|
||
<h1 class="topictitle1">Setting Container Specifications</h1>
|
||
<div id="body0000001503129644"><div class="section" id="ucs_01_0260__en-us_topic_0000001244101065_section1642219227611"><h4 class="sectiontitle">Scenario</h4><p id="ucs_01_0260__en-us_topic_0000001244101065_p179892274615">UCS allows you to set resource limits for added containers during workload creation. You can apply for and limit the CPU and memory quotas used by each pod in the workload.</p>
|
||
</div>
|
||
<div class="section" id="ucs_01_0260__en-us_topic_0000001244101065_section1550317594522"><h4 class="sectiontitle">Configuration Description</h4><ul id="ucs_01_0260__en-us_topic_0000001244101065_ul14091057191617"><li id="ucs_01_0260__en-us_topic_0000001244101065_li1540915578163">CPU quotas:
|
||
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ucs_01_0260__en-us_topic_0000001244101065_table362417589103" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Description of CPU quotas</caption><thead align="left"><tr id="ucs_01_0260__en-us_topic_0000001244101065_row186251758111012"><th align="left" class="cellrowborder" valign="top" width="17%" id="mcps1.3.2.2.1.1.2.3.1.1"><p id="ucs_01_0260__en-us_topic_0000001244101065_p762595815102">Parameter</p>
|
||
</th>
|
||
<th align="left" class="cellrowborder" valign="top" width="83%" id="mcps1.3.2.2.1.1.2.3.1.2"><p id="ucs_01_0260__en-us_topic_0000001244101065_p8625105813106">Description</p>
|
||
</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody><tr id="ucs_01_0260__en-us_topic_0000001244101065_row162511587103"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.2.2.1.1.2.3.1.1 "><p id="ucs_01_0260__en-us_topic_0000001244101065_p2625135851014">CPU request</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="83%" headers="mcps1.3.2.2.1.1.2.3.1.2 "><p id="ucs_01_0260__en-us_topic_0000001244101065_p262515818104">Minimum number of CPU cores required by a container. Resources are scheduled for the container based on this value. The container can be scheduled to this node only when the total available CPU on the node is greater than or equal to the number of containerized CPU applications.</p>
|
||
</td>
|
||
</tr>
|
||
<tr id="ucs_01_0260__en-us_topic_0000001244101065_row172431422171112"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.2.2.1.1.2.3.1.1 "><p id="ucs_01_0260__en-us_topic_0000001244101065_p1424472219115">CPU limit</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="83%" headers="mcps1.3.2.2.1.1.2.3.1.2 "><p id="ucs_01_0260__en-us_topic_0000001244101065_p524412223119">Maximum number of CPU cores available for a container.</p>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<p id="ucs_01_0260__en-us_topic_0000001244101065_p4169184362110"><strong id="ucs_01_0260__en-us_topic_0000001244101065_b636117273596">Recommended configuration</strong></p>
|
||
<p id="ucs_01_0260__en-us_topic_0000001244101065_p19191030192017">Actual available CPU of a node ≥ Sum of CPU limits of all containers of the current pod ≥ Sum of CPU requests of all containers on the current pod. You can view the actual available CPUs of a node by choosing <strong id="ucs_01_0260__en-us_topic_0000001244101065_b932844405164038">Clusters</strong> in the navigation pane, clicking the name of the target cluster, and choosing <strong id="ucs_01_0260__en-us_topic_0000001244101065_b2028946788164038">Nodes</strong> on the displayed page.</p>
|
||
</li><li id="ucs_01_0260__en-us_topic_0000001244101065_li115125173539">Memory quotas:
|
||
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ucs_01_0260__en-us_topic_0000001244101065_table164121625191912" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Description of memory quotas</caption><thead align="left"><tr id="ucs_01_0260__en-us_topic_0000001244101065_row64131325111910"><th align="left" class="cellrowborder" valign="top" width="18%" id="mcps1.3.2.2.2.1.2.3.1.1"><p id="ucs_01_0260__en-us_topic_0000001244101065_p154131025111914">Parameter</p>
|
||
</th>
|
||
<th align="left" class="cellrowborder" valign="top" width="82%" id="mcps1.3.2.2.2.1.2.3.1.2"><p id="ucs_01_0260__en-us_topic_0000001244101065_p16413325111912">Description</p>
|
||
</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody><tr id="ucs_01_0260__en-us_topic_0000001244101065_row1241310258194"><td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.2.2.2.1.2.3.1.1 "><p id="ucs_01_0260__en-us_topic_0000001244101065_p15413225131915">Memory request</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="82%" headers="mcps1.3.2.2.2.1.2.3.1.2 "><p id="ucs_01_0260__en-us_topic_0000001244101065_p541362541919">Minimum amount of memory required by a container. Resources are scheduled for the container based on this value. The container can be scheduled to this node only when the total available memory on the node is greater than or equal to the number of containerized memory applications.</p>
|
||
</td>
|
||
</tr>
|
||
<tr id="ucs_01_0260__en-us_topic_0000001244101065_row1413325101918"><td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.2.2.2.1.2.3.1.1 "><p id="ucs_01_0260__en-us_topic_0000001244101065_p241312517195">Memory Limit</p>
|
||
</td>
|
||
<td class="cellrowborder" valign="top" width="82%" headers="mcps1.3.2.2.2.1.2.3.1.2 "><p id="ucs_01_0260__en-us_topic_0000001244101065_p1241352520199">Maximum amount of memory available for a container. When the memory usage exceeds the specified memory limit, the pod may be restarted, which affects the normal use of the workload.</p>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<p id="ucs_01_0260__en-us_topic_0000001244101065_p19399171422017"><strong id="ucs_01_0260__en-us_topic_0000001244101065_b71614421416">Recommended configuration</strong></p>
|
||
<p id="ucs_01_0260__en-us_topic_0000001244101065_p151281711539">Actual available memory of a node ≥ Sum of memory limits of all containers on the current pod ≥ Sum of memory requests of all containers on the current pod. You can view the actual available memory of a node by choosing <strong id="ucs_01_0260__b28631124112314">Clusters</strong> in the navigation pane, clicking the name of the target cluster, and choosing <strong id="ucs_01_0260__b1486322442313">Nodes</strong> on the displayed page.</p>
|
||
</li></ul>
|
||
<div class="note" id="ucs_01_0260__en-us_topic_0000001244101065_note96535331218"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="ucs_01_0260__en-us_topic_0000001244101065_p73492457214">The allocatable resources are calculated based on the resource request value (<strong id="ucs_01_0260__en-us_topic_0000001244101065_b921033217215">Request</strong>), which indicates the upper limit of resources that can be requested by pods on this node, but does not indicate the actual available resources of the node. The calculation formula is as follows:</p>
|
||
<ul id="ucs_01_0260__en-us_topic_0000001244101065_ul259653921"><li id="ucs_01_0260__en-us_topic_0000001244101065_li1259253828">Allocatable CPU = Total CPU – Requested CPU of all pods – Reserved CPU for other resources</li><li id="ucs_01_0260__en-us_topic_0000001244101065_li15913539216">Allocatable memory = Total memory – Requested memory of all pods – Reserved memory for other resources</li></ul>
|
||
</div></div>
|
||
</div>
|
||
<div class="section" id="ucs_01_0260__en-us_topic_0000001244101065_section17887209103612"><h4 class="sectiontitle">Example</h4><p id="ucs_01_0260__en-us_topic_0000001244101065_p526873310363">Assume that a cluster contains a node with 4 cores and 8 GB. A workload containing two pods has been deployed on the cluster. The resources of the two pods (pods 1 and 2) are as follows: {CPU request, CPU limit, memory request, memory limit} = {1 core, 2 cores, 2 GB, 2 GB}.</p>
|
||
<p id="ucs_01_0260__en-us_topic_0000001244101065_p13764132011525">The CPU and memory usage of the node is as follows:</p>
|
||
<ul id="ucs_01_0260__en-us_topic_0000001244101065_ul137361942132916"><li id="ucs_01_0260__en-us_topic_0000001244101065_li0736342162910">Allocatable CPU = 4 cores - (1 core requested by pod 1 + 1 core requested by pod 2) = 2 cores</li><li id="ucs_01_0260__en-us_topic_0000001244101065_li6737194215295">Allocatable memory = 8 GB - (2 GB requested by pod 1 + 2 GB requested by pod 2) = 4 GB</li></ul>
|
||
<p id="ucs_01_0260__en-us_topic_0000001244101065_p54416407291">The remaining 2 cores and 4 GB can be used by the next new pod.</p>
|
||
</div>
|
||
</div>
|
||
<div>
|
||
<div class="familylinks">
|
||
<div class="parentlink"><strong>Parent topic:</strong> <a href="ucs_01_0258.html">Container Settings</a></div>
|
||
</div>
|
||
</div>
|
||
|