Skip to content
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

[virt] DPDK cluster config: Enable AlignCPUs #69713

Merged
merged 1 commit into from Jan 8, 2024

Conversation

orelmisan
Copy link
Member

@orelmisan orelmisan commented Jan 1, 2024

In case the user's worker nodes have SMT [1] enabled, they will probably encounter CNV-31584 [2].

Add an instruction to enable the AlignCPUs enabler in HCO [3], so it will enable [4] KubeVirt to request up to two additional dedicated CPUs in order to complete the total CPU count to an even parity when using
emulator thread isolation.

[1] https://en.wikipedia.org/wiki/Simultaneous_multithreading
[2] https://issues.redhat.com/browse/CNV-31584
[3] kubevirt/hyperconverged-cluster-operator#2695
[4] kubevirt/kubevirt#10872

Version(s):

4.15+

Issue:

https://issues.redhat.com/browse/CNV-31584

Link to docs preview:

https://69713--ocpdocs-pr.netlify.app/openshift-enterprise/latest/virt/vm_networking/virt-using-dpdk-with-sriov#virt-configuring-cluster-dpdk_virt-using-dpdk-with-sriov

QE review:

  • QE has approved this change.

Additional information:

@orelmisan
Copy link
Member Author

/cc @RamLavi @segevyos

@openshift-ci openshift-ci bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jan 1, 2024
@orelmisan
Copy link
Member Author

/cc @bellka5

@openshift-ci openshift-ci bot requested a review from bell-lev January 1, 2024 10:19
@ocpdocs-previewbot
Copy link

ocpdocs-previewbot commented Jan 1, 2024

🤖 Mon Jan 08 14:06:37 - Prow CI generated the docs preview: https://69713--ocpdocs-pr.netlify.app

@orelmisan orelmisan force-pushed the dpdk-cluster-config branch 4 times, most recently from 26bc838 to 737e416 Compare January 1, 2024 11:19
@openshift-ci openshift-ci bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jan 1, 2024
@segevyos
Copy link

segevyos commented Jan 1, 2024

/lgtm (CNV network QE)

@orelmisan
Copy link
Member Author

/cc @sjhala-ccs

@openshift-ci openshift-ci bot requested a review from sjhala-ccs January 1, 2024 15:08
Copy link
Contributor

@RamLavi RamLavi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 2, 2024
@sjhala-ccs sjhala-ccs added CNV Label for all CNV PRs branch/enterprise-4.15 labels Jan 2, 2024
@sjhala-ccs sjhala-ccs added this to the Planned for 4.15 GA milestone Jan 2, 2024
@sjhala-ccs sjhala-ccs changed the title Virt, DPDK cluster config: Enable AlignCPUs [virt] DPDK cluster config: Enable AlignCPUs Jan 2, 2024
Copy link
Contributor

@sjhala-ccs sjhala-ccs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few suggestions, otherwise LGTM

@@ -94,10 +94,21 @@ $ oc get performanceprofiles.performance.openshift.io profile-1 -o=jsonpath='{.s
$ oc patch hyperconverged kubevirt-hyperconverged -n {CNVNamespace} \
--type='json' -p='[{"op": "add", "path": "/spec/defaultRuntimeClass", "value":"<runtimeclass-name>"}]'
----

. In case your DPDK-enabled worker nodes are using SMT (Simultaneous multithreading), enable the `AlignCPUs` enabler by editing the `HyperConverged` custom resource (CR):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
. In case your DPDK-enabled worker nodes are using SMT (Simultaneous multithreading), enable the `AlignCPUs` enabler by editing the `HyperConverged` custom resource (CR):
. If your DPDK-enabled compute nodes use Simultaneous multithreading (SMT), enable the `AlignCPUs` enabler by editing the `HyperConverged` CR:

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also changed the end of the previous instruction to match.

+
[NOTE]
====
Editing the `HyperConverged` CR changes a global setting that affects all VMs that are created after the change is applied.

Enabling `AlignCPUs`, allows KubeVirt to request up to two additional dedicated CPUs in order to complete the total CPU count to an even parity when using
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Enabling `AlignCPUs`, allows KubeVirt to request up to two additional dedicated CPUs in order to complete the total CPU count to an even parity when using
By enabling `AlignCPUs`, you can request up to two additional dedicated CPUs to bring the total CPU count to an even parity when using

This can be a separate note after step 7

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is done automatically by KubeVirt, no user involvement required.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, suggestion to change KubeVirt to {VirtProductName} which will render as "OpenShift Virtualization" in the published doc. Plus, a couple of minor edits.

Suggested change
Enabling `AlignCPUs`, allows KubeVirt to request up to two additional dedicated CPUs in order to complete the total CPU count to an even parity when using
Enabling `AlignCPUs` allows {VirtProductName} to request up to two additional dedicated CPUs to bring the total CPU count to an even parity when using

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

----
$ oc patch hyperconverged kubevirt-hyperconverged -n {CNVNamespace} \
--type='json' -p='[{"op": "replace", "path": "/spec/featureGates/alignCPUs", "value": true}]'
----
+
[NOTE]
====
Editing the `HyperConverged` CR changes a global setting that affects all VMs that are created after the change is applied.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Editing the `HyperConverged` CR changes a global setting that affects all VMs that are created after the change is applied.
Editing the `HyperConverged` CR changes a global setting that affects all VMs that are created after the change is applied.

I feel like this note should still be placed after step 6 because step 7 is conditional and might not apply to all users?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Separated the note to two distinct notes.

@sjhala-ccs sjhala-ccs added the peer-review-done Signifies that the peer review team has reviewed this PR label Jan 2, 2024
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jan 3, 2024
Copy link
Contributor

@RamLavi RamLavi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 3, 2024
@@ -87,7 +87,7 @@ The compute nodes automatically restart after you apply the `MachineConfigPool`
$ oc get performanceprofiles.performance.openshift.io profile-1 -o=jsonpath='{.status.runtimeClass}{"\n"}'
----

. Set the previously obtained `RuntimeClass` name as the default container runtime class for the `virt-launcher` pods by editing the `HyperConverged` custom resource (CR):
. Set the previously obtained `RuntimeClass` name as the default container runtime class for the `virt-launcher` pods by editing the `HyperConverged` CR:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because this is the first instance of "CR", I would suggest keeping it as it was previously, spelling out custom resource (CR)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

+
[NOTE]
====
Editing the `HyperConverged` CR changes a global setting that affects all VMs that are created after the change is applied.

Enabling `AlignCPUs`, allows KubeVirt to request up to two additional dedicated CPUs in order to complete the total CPU count to an even parity when using
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, suggestion to change KubeVirt to {VirtProductName} which will render as "OpenShift Virtualization" in the published doc. Plus, a couple of minor edits.

Suggested change
Enabling `AlignCPUs`, allows KubeVirt to request up to two additional dedicated CPUs in order to complete the total CPU count to an even parity when using
Enabling `AlignCPUs` allows {VirtProductName} to request up to two additional dedicated CPUs to bring the total CPU count to an even parity when using

In case the user's worker nodes have SMT [1] enabled,
they will probably encounter CNV-31584 [2].

Add an instruction to enable the `AlignCPUs` enabler
in HCO [3], so it will enable [4] KubeVirt to request
up to two additional dedicated CPUs in order to complete
the total CPU count to an even parity when using
emulator thread isolation.

[1] https://en.wikipedia.org/wiki/Simultaneous_multithreading
[2] https://issues.redhat.com/browse/CNV-31584
[3] kubevirt/hyperconverged-cluster-operator#2695
[4] kubevirt/kubevirt#10872

Signed-off-by: Orel Misan <omisan@redhat.com>
@sjhala-ccs
Copy link
Contributor

/retest

Copy link

openshift-ci bot commented Jan 8, 2024

@orelmisan: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@sjhala-ccs sjhala-ccs merged commit 779e98e into openshift:main Jan 8, 2024
2 checks passed
@sjhala-ccs
Copy link
Contributor

/cherrypick enterprise-4.15

@openshift-cherrypick-robot

@sjhala-ccs: new pull request created: #69903

In response to this:

/cherrypick enterprise-4.15

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@orelmisan orelmisan deleted the dpdk-cluster-config branch January 8, 2024 15:45
aireilly pushed a commit to aireilly/openshift-docs that referenced this pull request Jan 8, 2024
[virt] DPDK cluster config: Enable AlignCPUs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch/enterprise-4.15 CNV Label for all CNV PRs lgtm Indicates that a PR is ready to be merged. peer-review-done Signifies that the peer review team has reviewed this PR size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants