我正在使用KVM/libvirt/qemu和Windows 10虚拟机运行Ubuntu16.04服务器。在将Windows 10升级到最新的1803版本(2018年4月更新)之后,我注意到VM响应速度减慢,主机CPU负载过高。我所做的测试:
我能做什么?我用的是正确的车夫吗?
谢谢
发布于 2018-06-17 16:45:25
在这里找到了具有相同问题的人,并可能对此进行修复:https://forum.proxmox.com/threads/high-cpu-load-for-windows-10-guests-when-idle.44531/
测试了更改我自己的配置,并在vm中将hpet设置为yes,并为我修复了它。
<clock offset='localtime'>
<timer name='rtc' tickpolicy='catchup'/>
<timer name='pit' tickpolicy='delay'/>
<timer name='hpet' present='yes'/>
<timer name='hypervclock' present='yes'/>
</clock>宠物部分是很重要的。
发布于 2021-09-22 20:43:34
Windows1021H1和qemu-kvm-4.2.0也有同样的问题。当windows机器空闲时,我获得了大约30%的cpu使用率。修复后,我得到了大约5%。
通过添加hv_synic和hv_stimer hyperv的启发,解决了这个问题。您可能会遇到以下错误
error: Failed to start domain mymachine.local
error: internal error: process exited while connecting to monitor: Hyper-V synthetic timers (hv-stimer) requires Hyper-V clocksources (hv-time)
Hyper-V synthetic interrupt controller (hv-synic) requires Hyper-V VP_INDEX MSR (hv-vpindex)
2021-09-22T20:30:06.440656Z qemu-kvm: kvm_init_vcpu failed: Function not implemented为了使上面的启发工作,您必须添加hv_time (它在libvirt中被翻译成hypervclock )和hv_vpindex启发。
我的最后一个libvirt XML文件看起来像
<features>
<acpi/>
<apic/>
<hyperv>
<relaxed state='on'/>
<vapic state='on'/>
<spinlocks state='on' retries='8191'/>
<vpindex state='on'/>
<synic state='on'/>
<stimer state='on'/>
</hyperv>
<smm state='on'/>
</features>
<clock offset='localtime'>
<timer name='rtc' tickpolicy='catchup'/>
<timer name='pit' tickpolicy='discard'/>
<timer name='hpet' present='yes'/>
<timer name='hypervclock' present='yes'/>
</clock>免责声明:这是在CentOS 8下完成的,但是应该在任何libvirt控制的KVM下工作。
发布于 2022-04-13 19:57:33
目前的答案对我都没有用。一个对我有用的解决方法就是让Windows 10任务管理器保持打开状态。我总是注意到,当CPU使用率很高时,我会打开Windows 10任务管理器,会有使用100% CPU的“系统中断”,但它会立即消失。显然,对于那些没有保持交互式会话打开的人,FWIW不起作用。
https://askubuntu.com/questions/1033985
复制相似问题