|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * scalability_and_performance/recommended-host-practices.adoc |
| 4 | + |
| 5 | +[id="recommended-node-host-practices-{context}"] |
| 6 | += Recommended node host practices |
| 7 | + |
| 8 | +The {product-title} node configuration file contains important options. For |
| 9 | +example, two parameters control the maximum number of pods that can be scheduled |
| 10 | +to a node: `podsPerCore` and `maxPods`. |
| 11 | + |
| 12 | +When both options are in use, the lower of the two values limits the number of |
| 13 | +pods on a node. Exceeding these values can result in: |
| 14 | + |
| 15 | +* Increased CPU utilization. |
| 16 | +* Slow pod scheduling. |
| 17 | +* Potential out-of-memory scenarios, depending on the amount of memory in the node. |
| 18 | +* Exhausting the pool of IP addresses. |
| 19 | +* Resource overcommitting, leading to poor user application performance. |
| 20 | + |
| 21 | +[IMPORTANT] |
| 22 | +==== |
| 23 | +In Kubernetes, a pod that is holding a single container actually uses two |
| 24 | +containers. The second container is used to set up networking prior to the |
| 25 | +actual container starting. Therefore, a system running 10 pods will actually |
| 26 | +have 20 containers running. |
| 27 | +==== |
| 28 | + |
| 29 | +`podsPerCore` sets the number of pods the node can run based on the number of |
| 30 | +processor cores on the node. For example, if `podsPerCore` is set to `10` on a |
| 31 | +node with 4 processor cores, the maximum number of pods allowed on the node will |
| 32 | +be `40`. |
| 33 | + |
| 34 | +---- |
| 35 | +kubeletConfig: |
| 36 | + podsPerCore: 10 |
| 37 | +---- |
| 38 | + |
| 39 | +Setting `podsPerCore` to `0` disables this limit. The default is `0`. |
| 40 | +`podsPerCore` cannot exceed `maxPods`. |
| 41 | + |
| 42 | +`maxPods` sets the number of pods the node can run to a fixed value, regardless |
| 43 | +of the properties of the node. |
| 44 | + |
| 45 | +---- |
| 46 | + kubeletConfig: |
| 47 | + maxPods: 250 |
| 48 | +---- |
0 commit comments