Repository navigation
kvm: use the base CPU frequency as the host speed and expose the maximum frequency as a host detail - #14383
Open
winterhazel wants to merge 1 commit into
Open
kvm: use the base CPU frequency as the host speed and expose the maximum frequency as a host detail#14383winterhazel wants to merge 1 commit into
winterhazel wants to merge 1 commit into
Conversation
…mum frequency as a host detail
Member
Author
|
@blueorangutan package |
|
@winterhazel a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.22 #14383 +/- ##
============================================
- Coverage 18.02% 18.01% -0.01%
+ Complexity 16247 16246 -1
============================================
Files 5936 5936
Lines 535823 535880 +57
Branches 65612 65615 +3
============================================
- Hits 96572 96564 -8
- Misses 428252 428317 +65
Partials 10999 10999
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
1 of 7 tasks
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 19514 |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR is a minimal follow-up to #12190. A few refactorings and adjustments will be done in a separate PR targeting
main.#12190 changed the order in which the KVM Agent retrieves the CPU speed from
lscpu, so thatCPU max MHzis preferred over the frequency advertised in the model name. However, the host CPU speed is not only informative. It is used to:cores * speed);VM speed / host speed).CPU max MHzmay include the turbo frequency, which the CPU is not able to sustain; thus, it is not a suitable value for these calculations. Besides that, its meaning depends on the cpufreq driver in use: withintel_pstate/amd-pstateit is the turbo frequency, withacpi-cpufreqit is the base frequency plus 1 MHz, and without a cpufreq driver it is not reported at all.As a consequence, the change impacts existing VMs with CPU cap enabled. Considering a host with a base frequency of 2.9 GHz and a maximum frequency of 4.8 GHz, a VM using a CPU cap enabled offering with 2.9 GHz does not have its CPU time limited. After #12190, once the Agent reconnects and the VM is started or migrated, it is able to use only ~60% of the CPU time, making users feel that the performance of their VMs degraded out of nowhere.
Therefore, this PR:
lscpuchecks to the same behavior that existed before Fix lscpu speed checking order #12190;host.cpu.max.speed.mhz), which is returned in thedetailsof thelistHostsAPI and shown in the details of the host in the UI asCPU maximum frequency (turbo). This value is only informative; it is not used in capacity or CPU quota calculations.Operators that want a host to be registered with a specific CPU speed, such as the turbo frequency, can still do so through the
host.cpu.manual.speed.mhzproperty inagent.properties.Types of changes
Feature/Enhancement Scale or Bug Severity
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
Tests are still pending.