-
Notifications
You must be signed in to change notification settings - Fork 14.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Topology Manager documentation to include the scope feature #24781
Update Topology Manager documentation to include the scope feature #24781
Conversation
Deploy preview for kubernetes-io-vnext-staging processing. Building with commit 4255393 https://app.netlify.com/sites/kubernetes-io-vnext-staging/deploys/5fbd06620af54a0008a770e9 |
Welcome @k-wiatrzyk! |
/milestone 1.20 |
3f6ae6c
to
87d2d40
Compare
based on the comment kubernetes/enhancements#693 (comment) this PR will be on /hold until an exception has been filed/approved. |
exception approved |
/assign |
Hi @k-wiatrzyk If it's ready to be reviewed, could you also remove WIP from the title? Thank you! |
Hi @annajung |
87d2d40
to
149d2af
Compare
/hold cancel |
149d2af
to
deb47f6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @k-wiatrzyk
LGTM!
Here's some optional feedback. What I mean is, I'd be happy to have this feedback accepted, but it's also OK to merge without it.
These changes need technical review; can you recommend someone who can provide that?
### container scope | ||
|
||
This scope was available before any other scope was implemented, and it remains as the default setting in the kubelet. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
### container scope | |
This scope was available before any other scope was implemented, and it remains as the default setting in the kubelet. | |
### container scope | |
The `container` scope is used by default. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 to suggested change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
### pod scope | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
### pod scope | |
### pod scope | |
To select the `pod` scope, start the kubelet with the command line option `--topology-manager-scope=pod`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
* all containers can be and are allocated to a single NUMA node; | ||
* all containers can be and are allocated to a shared set of NUMA nodes. | ||
|
||
The total amount of particular resource demanded for the entire pod is calculated according to [effective requests/limits](/docs/concepts/workloads/pods/init-containers/#resources) formula, and thus, this total value is equal to the maximum of: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about the link to the init container concept - topology scope is relevant even if you never use init containers. Instead, I recommend duplicating the text here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be honest, I'm not sure if duplicating here is needed. The init container link also has other details (i.e. regarding scheduling).
Below the selected part there are two bullet points that describe the formula shortly. Init containers are taken into consideration if they exist in the pod. If not, only the maximum of app containers is considered.
...this total value is equal to the maximum of:
* the sum of all app container requests,
* the maximum of init container requests,
* the maximum of init container requests, | ||
for a resource. | ||
|
||
The scope in tandem with `single-numa-node` Topology Manager Policy is specifically valuable for high-performance applications. By combining both options, we are able to place all containers in a pod on a single NUMA node; hence, the inter-NUMA communication overhead can be eliminated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The scope in tandem with `single-numa-node` Topology Manager Policy is specifically valuable for high-performance applications. By combining both options, we are able to place all containers in a pod on a single NUMA node; hence, the inter-NUMA communication overhead can be eliminated. | |
Using the `pod` scope in tandem with `single-numa-node` Topology Manager policy is specifically valuable for workloads that are latency sensitive or for high-throughput applications that perform IPC. By combining both options, you are able to place all containers in a pod onto a single NUMA node; hence, the inter-NUMA communication overhead can be eliminated for that pod. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(this is a bunch of suggestions in one - some might not be technically accurate)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
||
Within this scope, the Topology Manager performs a number of sequential resource alignments, i.e., for each container (in a pod) a separate alignment is computed. In other words, there is no notion of grouping the containers to a specific set of NUMA nodes, for this particular scope. In effect, the Topology Manager performs an arbitrary alignment of individual containers to NUMA nodes. | ||
|
||
The notion of grouping the containers was endorsed and implemented on purpose in the following scope, i.e. the Pod Scope. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: s/i.e./for example/
nit: What do you think about removing the capitalization of:
... for example, the pod
scope.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, capitalization was inconsistent with the rest. Done
Hi @k-wiatrzyk . |
/label tide/merge-method-squash |
I only see 1 commit |
ee5daf2
to
dfe5fa7
Compare
### Topology Manager Scopes | ||
|
||
The Topology Manager can deal with the alignment of resources in a couple of distinct scopes: | ||
|
||
* `container` (default) | ||
* `pod` | ||
|
||
Either option can be selected at a time of the kubelet startup, with `--topology-manager-scope` flag. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would probably combine the Scope and Policy sections into 1 (i.e. Topology Manager Scopes and Policies
). That way you can have a quick intro into what both of them are and how they interact before diving into the details of them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I will prepare such an update today.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think after this is addressed then this is good to go(?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hope so. I won't change any content here, only rearrange stuff.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3b54845
to
de37944
Compare
Hi @klueska @kubernetes/sig-node-pr-reviews can you please provide tech review / lgtm? |
@@ -51,6 +51,52 @@ The hint is then stored in the Topology Manager for use by the *Hint Providers* | |||
|
|||
Support for the Topology Manager requires `TopologyManager` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) to be enabled. It is enabled by default starting with Kubernetes 1.18. | |||
|
|||
## Topology Manager Scopes and Policies | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you move the intro text from the policy section to here and then reword what you currently have here to the following:
The Topology Manager currently:
- Aligns Pods of all QoS classes.
- Aligns the requested resources that Hint Provider provides topology hints for.
If these conditions are met, the Topology Manager will align the requested resources.
In order to customise how this alignment is carried out, the Topology Manager provides two distinct knobs: 'scope` and `policy`.
The `scope` defines the granularity at which you would like resource alignment to be performed (e.g. at the `pod` or `container` level). And the `policy` defines the the actual strategy used to carry out the alignment (e.g. `best-effort`, `restricted`, `single-numa-node`, etc.).
Details on the various `scopes` and `policies` available today can be found below.
{{< note >}}
To align CPU resources with other requested resources in a Pod Spec, the CPU Manager should be enabled and proper CPU Manager policy should be configured on a Node. See [control CPU Management Policies](/docs/tasks/administer-cluster/cpu-management-policies/).
{{< /note >}}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, applying now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Thanks!
064d178
to
eaa0810
Compare
Signed-off-by: Krzysztof Wiatrzyk <[email protected]>
eaa0810
to
4255393
Compare
/approve |
LGTM label has been added. Git tree hash: d2fef34dcb088b0cee486253b9857e3d3a441d1b
|
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: annajung, klueska The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
PR refers to:
Signed-off-by: Krzysztof Wiatrzyk [email protected]