Windows7 on KVM consumes large amount of host CPU while apparently idle
Linux - Virtualization and CloudThis forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Windows7 on KVM consumes large amount of host CPU while apparently idle
I have a Windows 7 guest running under qemu-kvm-0.15.0 (kernel 3.0-ARCH). Despite the guest showing as relatively (2-3% in taskmgr) idle, the VM never seems to drop below 25% host CPU, and an strace on the qemu process shows a large amount of time being spent in futex():
You need to install Windows in qemu with the '-no-acpi' qemu option, otherwise the system burns CPU communicating with what it thinks is the ACPI BIOS. I don't know of any way to disable this after installation.
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541
Rep:
I don't use KVM -- VirtualBox instead -- and I notice constant CPU activity in both cores, varying from 3%-5% up to about 24% periodically with a Win7 64-bit guest; I never see anywhere near that activity when Slackware-64 is just sitting the mumbling to itself. And, XP is significantly worse than Win7 as far as CPU activity. It just appears that Windows-whatever-version is a hog no matter what you do (keep in mind that Windows is always doing some blasted thing or other that uses cycles).
As I'm writhing this both cores at at 50% +. Why, I do not know.
Can't really advise you what to do other than perhaps giving it more RAM and see if that helps (so it's not stumbling over its own feet all the time). If you've got 4G or more in the box, let it have 2G -- it is a hog and that's what I've done to alleviate some of the problems.
I keep an eye on things with GKrellM, which is a kind of nifty monitor utility that displays your CPU(s), processes, disk activty, Ethernet activity, memory use, swap use and your can add battery status, fans, temperature and all kinds of stuff if they're available on your system. Might be worth a little time to either start that up (if it's already on you system) or get it from http://members.dslextreme.com/users/...m/gkrellm.html.
I look forward to the day that I can completely dump Microsoft forever, bu tin the meantime...
Well, so far, it seems to work for me -- I only use Win7 for Stamp.com, Family Tree Maker and Turbotax -- and, of course, the almost weekly "critical updates." Dammit, I do hate Windows.
You need to install Windows in qemu with the '-no-acpi' qemu option, otherwise the system burns CPU communicating with what it thinks is the ACPI BIOS. I don't know of any way to disable this after installation.
Yeah I thought it might be ACPI, unfortunately this was a company "standard build" that I had to take from a physical machine, so didn't have the option of installing from scratch. :-( Did try booting the vm with ACPI off but didn't get past the loading screen.
I don't use KVM -- VirtualBox instead -- and I notice constant CPU activity in both cores, varying from 3%-5% up to about 24% periodically with a Win7 64-bit guest; I never see anywhere near that activity when Slackware-64 is just sitting the mumbling to itself. And, XP is significantly worse than Win7 as far as CPU activity. It just appears that Windows-whatever-version is a hog no matter what you do (keep in mind that Windows is always doing some blasted thing or other that uses cycles).
As I'm writhing this both cores at at 50% +. Why, I do not know.
Can't really advise you what to do other than perhaps giving it more RAM and see if that helps (so it's not stumbling over its own feet all the time). If you've got 4G or more in the box, let it have 2G -- it is a hog and that's what I've done to alleviate some of the problems.
Thanks, I'll try that. I was trying to pare down the vms as much as possible as I'm trying to cram a whole test environment onto my laptop, but I hadn't anticipated the amount of crap that you have to run as a bare minimum.
Quote:
Originally Posted by tronayne
I keep an eye on things with GKrellM, which is a kind of nifty monitor utility that displays your CPU(s), processes, disk activty, Ethernet activity, memory use, swap use and your can add battery status, fans, temperature and all kinds of stuff if they're available on your system. Might be worth a little time to either start that up (if it's already on you system) or get it from http://members.dslextreme.com/users/...m/gkrellm.html.
Cheers, will do - had been using top, iotop and the gnome system monitor. GKrellM - now that's a blast from the past!
Quote:
Originally Posted by tronayne
I look forward to the day that I can completely dump Microsoft forever, bu tin the meantime...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.