Improvements to VMs (especially windows). Should be very simple.


m00nman

Recommended Posts

I've described most of these settings/features extensively here:

 

However, it would be great if these were added to the image by default:

 

1. Add

  <timer name='hypervclock' present='yes'/>

along with the reset of prerequisites to Windows 10/11 VMs by default. This will dramatically reduce idle CPU usage of these VMs

 

2. Add "ksmtuned" daemon to the image for controlling KSM (kernel samepage merging) to reduce RAM usage for those with multiple similar VMs and enable it by default. It only gets triggered at 80% RAM utilization by default. It's really just a shell script.

 

3. Add ability to limit maximum number of cores for a VM without actually pinning the cores to physical cores to let the host kernel distribute the load.

Edited by m00nman
  • Thanks 1
  • Upvote 4
Link to comment
  • 4 weeks later...
On 2/28/2023 at 5:16 AM, m00nman said:

I've described most of these settings/features extensively here:

 

However, it would be great if these were added to the image by default:

 

1. Add

  <timer name='hypervclock' present='yes'/>

along with the reset of prerequisites to Windows 10/11 VMs by default. This will dramatically reduce idle CPU usage of these VMs

 

2. Add "ksmtuned" daemon to the image for controlling KSM (kernel samepage merging) to reduce RAM usage for those with multiple similar VMs and enable it by default. It only gets triggered at 80% RAM utilization by default. It's really just a shell script.

 

3. Add ability to have maximum number of cores for a VM without actually pinning the cores to physical cores to let the host kernel distribute the load.

Hi I will review and look to see if we can add to next release after 6.12. Do you need hyperv as you can disable that also.

Link to comment
  • 2 weeks later...
On 3/26/2023 at 6:13 AM, SimonF said:

Hi I will review and look to see if we can add to next release after 6.12. Do you need hyperv as you can disable that also.

 Thank you for looking into this. Yes, hyperv enligtenments need to be on for hypervclock to work

 

Link to comment
  • 3 months later...
  • 2 weeks later...
  • 2 weeks later...
On 2/28/2023 at 5:16 AM, m00nman said:

I've described most of these settings/features extensively here:

 

However, it would be great if these were added to the image by default:

 

1. Add

  <timer name='hypervclock' present='yes'/>

along with the reset of prerequisites to Windows 10/11 VMs by default. This will dramatically reduce idle CPU usage of these VMs

 

2. Add "ksmtuned" daemon to the image for controlling KSM (kernel samepage merging) to reduce RAM usage for those with multiple similar VMs and enable it by default. It only gets triggered at 80% RAM utilization by default. It's really just a shell script.

 

3. Add ability to limit maximum number of cores for a VM without actually pinning the cores to physical cores to let the host kernel distribute the load.

Hi mOOnman,

 

I have looked at the code and point 1 should already be there. Which version where you running the tests on?

 

            if ($domain['hyperv'] == 1 && $os_type == "windows") {

                $hyperv = "<hyperv>

                            <relaxed state='on'/>

                            <vapic state='on'/>

                            <spinlocks state='on' retries='8191'/>

                            <vendor_id state='on' value='none'/>

                        </hyperv>";

 

                $clock = "<clock offset='" . $domain['clock'] . "'>

                            <timer name='hypervclock' present='yes'/>

                            <timer name='hpet' present='no'/>

                        </clock>";

            }

 

Do these need to be added also?

 

<vpindex state='on'/> <synic state='on'/> <stimer state='on'/>

Link to comment
On 8/28/2023 at 6:25 AM, SimonF said:

Hi mOOnman,

 

I have looked at the code and point 1 should already be there. Which version where you running the tests on?

 

            if ($domain['hyperv'] == 1 && $os_type == "windows") {

                $hyperv = "<hyperv>

                            <relaxed state='on'/>

                            <vapic state='on'/>

                            <spinlocks state='on' retries='8191'/>

                            <vendor_id state='on' value='none'/>

                        </hyperv>";

 

                $clock = "<clock offset='" . $domain['clock'] . "'>

                            <timer name='hypervclock' present='yes'/>

                            <timer name='hpet' present='no'/>

                        </clock>";

            }

 

Do these need to be added also?

 

<vpindex state='on'/> <synic state='on'/> <stimer state='on'/>

Hi SimonF, I believe it was version 6.11.x, the version that was current at the time of writing OP.

 

Yes, it is my understanding that that you need all of the following options <vpindex state='on'/> <synic state='on'/> <stimer state='on'/>, additionally some people reported settings migratable='off' resolved issues with GPU PCIe passthrough stutter. migratable='on' is only useful when miograting VM from one host to another, and unraid does not support it anyway so it's safe to turn it off for everyone.

 

 

Edited by m00nman
Link to comment
  • 2 months later...
On 8/29/2023 at 7:05 PM, m00nman said:

Hi SimonF, I believe it was version 6.11.x, the version that was current at the time of writing OP.

 

Yes, it is my understanding that that you need all of the following options <vpindex state='on'/> <synic state='on'/> <stimer state='on'/>, additionally some people reported settings migratable='off' resolved issues with GPU PCIe passthrough stutter. migratable='on' is only useful when miograting VM from one host to another, and unraid does not support it anyway so it's safe to turn it off for everyone.

 

 

I have created a PR to address these and make timers available from the GUI to change. https://github.com/unraid/webgui/pull/1494

 

migratable is on PR https://github.com/unraid/webgui/pull/1474

  • Like 1
  • Thanks 2
Link to comment
  • 3 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.