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

Handle many vCPUs -- backport #315

Merged
merged 2 commits into from
Apr 26, 2022

Conversation

mz-pdm
Copy link
Member

@mz-pdm mz-pdm commented Apr 26, 2022

  • Always limit the maximum numbers of vCPUs to reasonable values.
  • Increase TSEG size for large VMs.

See the commit messages for more details.

Bug-Url: https://bugzilla.redhat.com/2075486

With the lifted limit on the maximum number of CPU sockets implemented
in commit a4c0858, the maximum
possible number of vCPUs increased significantly.  But it is not
without its price.  The increased maximum number of vCPUs reduces
memory available to the guest OS and may cause some problems,
especially with UEFI firmware.

There is already MaxNumOfCpusCoefficient config value limiting the
maximum number of vCPUs.  But it is not enforced strictly, the maximum
number of vCPUs can still be significantly higher, to be consistent
with the previous behavior.  Let’s be more cautious and clearer and
apply MaxNumOfCpusCoefficient strictly, unless the maximum number of
vCPUs is not very large, in the sense of the newly introduced
ManyVmCpus config value.

Bug-Url: https://bugzilla.redhat.com/2075486
Large VMs using UEFI may not start if the TSEG size is not big
enough.  There is no clear rule when the TSEG size must be increased.
We increase it in the following cases:

- If the maximum number of VM vCPUs is at least 128.

- If the maximum memory is at least 16 GB, i.e. the memory taken from
  the guest by changing the TSEG size is negligible.

We increase the TSEG size by wild-guess values based on various
comments from Bugzilla, see the comment in the code for more details.
As the TSEG size is taken from the memory available to the guest, we
do not want to make it unnecessarily large by default.  On the other
hand, it’s better to be on the safe side and allocate a bit more than
perhaps needed rather than causing the VM not to start.

We introduce config values for both the limits mentioned above, in
case the selected values don’t work well enough.

Bug-Url: https://bugzilla.redhat.com/2075486
@mz-pdm mz-pdm added this to the ovirt-4.5.0-1 milestone Apr 26, 2022
@mz-pdm mz-pdm requested review from ahadas and removed request for ahadas April 26, 2022 11:02
@ahadas ahadas merged commit e5ab082 into oVirt:ovirt-engine-4.5.0.z Apr 26, 2022
@mz-pdm mz-pdm deleted the uefi-many-vcpus-backport branch May 3, 2022 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants