-
Notifications
You must be signed in to change notification settings - Fork 1.2k
KVM HyperV Enlightment for Improved Windows Server 2008+ Performance #2870
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
Conversation
| * features.addHyperVFeature(hyv); | ||
| * } | ||
| */ | ||
| //for rhel 6.5 and above, hyperv enlightenment feature is added |
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 for the PR @kiwiflyer!
Would you mind extracting the code 2105-2114 to a method, document it, and then create a unit test case?
This createVMFromSpec is too big already.
|
@blueorangutan package |
|
@borisstoyanov a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2326 |
|
@blueorangutan test |
|
@borisstoyanov a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
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.
@rafaelweingartner point (extract to a new method) seems fair to me. Code LGTM.
Thanks for the PR @kiwiflyer!
|
Trillian test result (tid-3051)
|
|
Ok, thanks for the feedback guys. I'll refactor this when I have some time later this week. |
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.
LGTM
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.
Lgtm
1fa4f10 to
fcc87d9
Compare
| } | ||
|
|
||
| protected void enlightenWindowsVm(VirtualMachineTO vmTO, FeaturesDef features) { | ||
| // If OS is Windows PV, then enable the features. Features supported on Windows 2008 and later |
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.
minor nit - Fix indent of comment to match that of statements inside method.
|
@kiwiflyer can you see travis error and fix the checkstyle issue. |
|
@kiwiflyer still the same error, please check your changes: |
|
Simon, a question here (since we have been using this internally in production for 1.5+years, but never pushed upstream...) Why don't implement this on all Windows* OS types, not just Windows PV - reason being, that, afaik, this is not related only to paravirtualization (Windows PV vs "regular" WIndows OS type in CloudStack), and the main reason for us was NOT the performance (which is there, as you described) - but mainly to avoid the very frequent BSOD with Windows 2008 with heavily loaded MSSQL servers and such. I believe it makes sense to implement for all OS types matching "Windows*" And we have been using this on Ubuntu 14.04 hosts all the time (means tested on Ubuntu, as you asked) hv_relaxed vs. BSOD - slide 15: |
|
@andrijapanic I'm open to changing it to use all Windows OS types. My mine reason for picking one was some backwards compatibility. At least in the KVM world, I'm unsure why we continue to maintain tons of different OS types/names, as running any OS without virtio is extremely painful in terms of performance. |
|
I agree on VirtIO stuff absolutely. It's just that, even with all FAQ and so on, still end-user sometimes continue to use specific a Windows OS type instead of Windows PV, so it makes sense to solve all Windows OS types with this nice patch. As for future support of OS types inside ACS, that is a good point, but doesn't warrant not applying patch for all of Win OS types, in my opinion. |
|
@kiwiflyer I'll proceed with merging as I agree that for sake of backward compatibility let's avoiding having the feature enabled by default for any windows guest. If we decide to make it available for all windows guests, please submit another PR separately. Thanks. |


Description
Windows has support for several paravirt features that it will use when running on Hyper-V, Microsoft's hypervisor. These features are called enlightenments. Many of the features are similar to paravirt functionality that exists with Linux on KVM (virtio, kvmclock, PV EOI, etc.)
Nowadays QEMU/KVM can also enable support for several Hyper-V enlightenments. When enabled, Windows VMs running on KVM will use many of the same paravirt optimizations they would use when running on Hyper-V.
A number of years ago, a PR was introduced that added a good portion of the code to enable this feature set, but it was never completed. This PR enables the existing features. The previous patch set detailed in #1013 also included the tests.
By selecting Windows PV, the enlightenment additions will be applied to the libvirt configuration. This is support on Windows Server 2008 and beyond, so all currently supported versions of Windows Server.
In our testing, we've seen benchmark improvements of around 20-25% running on Centos 7 hosts and it is also supported on Centos/RHEL 6.5 and later. Testing on Ubuntu would be appreciated.
Types of changes
How Has This Been Tested?
We've tested this in a lab and QA environment. I'll post some screenshots related to the libvirt xml changes and also provide some performance metric information over the next 24 hours.
Checklist:
##Testing: