1 2 3 Previous Next 34 Replies Latest reply on Sep 5, 2014 8:34 PM by zhuzh

    Vmware Fusion 7 tech preview spins CPU on idle when running Windows 8.1

    zhuzh Novice

      I've noticed that with VMware Fusion 7 tech preview (July 2014), (I'm running Mavericks 10.9.4 on a MBP with 16 GB RAM)

      that I see MacOSX shows CPU activity of between 50% - 100% (which isn't much, as the MBP has 8 vcpu, 4 core intel core i7 2960HQ), even when the Task Manager on the Windows side shows 99%-100% idle.

      VMWare tools is installed.  It happens with both tools version 9.6.2 (from Fusion 6), and 9.8.2 (from Fusion 7 TP).  

      It happens with 3D acceleration turned on or off (I thought it might be because CPU was used to emulate 3D acceleration, but the behavior is similar, albeit % is slightly different when 3D accel is on)

      I am using it with integrated Iris pro graphics (when not using external monitor) in order to save battery.  I think this is the biggest improvement in VMware Fusion 7, and many other people in our company agree!  Kudos VMware team!

       

      I'm not sure whether this behavior occurred with VMWare Fusion 6. 

      Another piece of information is that, when I'm running Ubuntu 14.04 server vm on VMware Fusion 7, the CPU on the MacOSX side shows ~ 0%.  So this seems to be a Windows 8 (i haven't tried any other version) related issue.

       

      Is this a known issue?   Has anyone else run into this behavior?  Thank you!.

        • 1. Re: Vmware Fusion 7 tech preview spins CPU on idle when running Windows 8.1
          JBarros Novice

          I can confirm this behaviour as well.

           

          One thing I noticed is that it happens more often when Google Chrome is open.

          • 2. Re: Vmware Fusion 7 tech preview spins CPU on idle when running Windows 8.1
            zhuzh Novice

            Thanks for confirming!   I didn't notice Chrome related spinning myself.  I tried it just now, and even with chrome not running, it is still spinning at ~50%, i.e. no difference in spinning %.

            Other programs I use in the VM:  Skype, Adobe acrobat reader, Outlook, Notepad++.   That's pretty much it.  I haven't noticed that any one of these reduces/increases CPU spinning on the host side when idle.

            • 3. Re: Vmware Fusion 7 tech preview spins CPU on idle when running Windows 8.1
              wila Guru
              User ModeratorsvExpertCommunity Warriors

              Not seeing this at all and I normally have 4 VMs running at the same time, including Windows 8.1, even with that I barely get over 10% CPU on OS X.

              Did you happen to give the windows guest more as 1 CPU?

               

              --

              Wil

              | Author of Vimalin. The virtual machine Backup app for VMware Desktop Products
              | Vimalin : Automated backups for VMware Fusion and VMware Workstation Professional
              | More info at https://www.vimalin.com
              | Twitter @wilva
              | VMware Wiki at http://www.vi-toolkit.com
              • 4. Re: Vmware Fusion 7 tech preview spins CPU on idle when running Windows 8.1
                zhuzh Novice

                My Windows VM is set up for 10 GB RAM, 4 vCPU, 4 VMDK's, all scsi.   I'm using two network adapters, one NAT, one loopback, both type VMXNET3.

                I'm wondering, which version of OSX are you running?  Also, what kind of Mac hardware is it?   I wonder if it has to do with the Iris Pro versus discrete on the MBP's.

                • 5. Re: Vmware Fusion 7 tech preview spins CPU on idle when running Windows 8.1
                  wila Guru
                  User ModeratorsvExpertCommunity Warriors

                  My suggestion is to drop the Windows VM to two or -even better- one vCPU.

                   

                  I'm currently running OS X 10.8.5, but my experience was the same on Mavericks and my mac is just a MBP with 16GB RAM and an i7 cpu on board.

                  FWIW my windows VMs are all under 2GB RAM and none of them has more as 1 vCPU, less is more most of the times when it comes down to number of vCPU's assigned to a guest.

                   

                  Note that while you have 8 threads on your i7, there's still only 4 cores, so giving 4 cores to your guest is most likely a tad bit much for the CPU scheduler to deal with.

                   

                  --

                  Wil

                  | Author of Vimalin. The virtual machine Backup app for VMware Desktop Products
                  | Vimalin : Automated backups for VMware Fusion and VMware Workstation Professional
                  | More info at https://www.vimalin.com
                  | Twitter @wilva
                  | VMware Wiki at http://www.vi-toolkit.com
                  • 6. Re: Vmware Fusion 7 tech preview spins CPU on idle when running Windows 8.1
                    zhuzh Novice

                    So I generally do software development on the VM as well, which requires the vCPU's/ horse power.

                    I've never had a problem with CPU idle spinning on VMware Workstation on the Windows or Linux side, even with cpu idle.   I've used  8 vCPU + 24 GB RAM configs on Windows, and never had an issue like this (I had 32 GB Host memory).

                     

                    Honestly, if the OSX CPU scheduler can't handle a few vCPU threads, I'd be extremely surprised.

                    I think the VMWare hypervisor technology should work for this.  I assume it's similar amongst all the platforms.  Also with Intel VT(x), I don't think there's much that the OS CPU scheduler would need to deal with.



                    • 7. Re: Vmware Fusion 7 tech preview spins CPU on idle when running Windows 8.1
                      wila Guru
                      vExpertCommunity WarriorsUser Moderators

                      Hi @zhuzh

                       

                      I'm also a software developer and my compilers are not multi threaded so the amount of performance gained by using multiple threads in my guest OS's is minimal.

                       

                      re. "same on all platforms" the hypervisor shares code between the platforms. But there's a huge difference between for example vSphere (dedicated OS for virtualisation) and OS X or Windows/Linux which are desktop OS's and optimized for a smooth end user experience in the host OS.

                       

                      AFAIK the hypervisor is subject to the CPU scheduler used by the host OS. IOW, if your host OS does not get the resources it needs all of your guest OS's will suffer.

                      Same with the memory 10GB on a 16GB host can work fine, but depending on what you run in the host OS (safari can be a memory hog for example) it all depends. As soon as your host is swapping it will all crawl to a halt.

                       

                      There's a difference between "a few CPU threads" and using as many threads as the amount of cores your host supplies.

                      Anyways.. it's all up to you, it was just a suggestion which I think will help cure what you see.

                      If you don't want to test my hypotheses, or disagree with it, no worries as far as I'm concerned.

                       

                       

                      edit: One more note, as you are running the tech preview, there is an additional overhead due to additional logging and extra code that runs checks that won't be used in the final release. You also might want to consider to disable the debug mode for your guests (if not already done)

                      --

                      Wil

                       

                      Message was edited by: Wil van Antwerpen

                      | Author of Vimalin. The virtual machine Backup app for VMware Desktop Products
                      | Vimalin : Automated backups for VMware Fusion and VMware Workstation Professional
                      | More info at https://www.vimalin.com
                      | Twitter @wilva
                      | VMware Wiki at http://www.vi-toolkit.com
                      • 8. Re: Vmware Fusion 7 tech preview spins CPU on idle when running Windows 8.1
                        zhuzh Novice

                        Hey, thanks for the suggestion.   Didn't mean to suggest it was not sound.  I will absolutely test the hypothesis when I get a chance to shutdown my VM and reconfigure it for single vCPU, and I'll post the results.  I have plenty of free memory on the OSX side, so there's no thrashing happening right now.

                         

                        I was simply saying that on Linux/Windows hosts, I don't see this problem at all (with the exact same VM image).

                        • 9. Re: Vmware Fusion 7 tech preview spins CPU on idle when running Windows 8.1
                          wila Guru
                          User ModeratorsvExpertCommunity Warriors

                          Hi @zhuzh,

                           

                          That's OK, as I said "no worries" and I actually meant that.

                          I'm always interested to hear the results and if it helped (or even if it didn't help)

                           

                          Besides that I'm always eager to learn which means that I have no problem with being wrong about something, it happens.

                          The virtualisation world is moving fast, so statements that are true today, might be wrong tomorrow.

                           

                          Any solution you might be able to find to cure the problem is interesting to know about.

                          --

                          Wil

                          | Author of Vimalin. The virtual machine Backup app for VMware Desktop Products
                          | Vimalin : Automated backups for VMware Fusion and VMware Workstation Professional
                          | More info at https://www.vimalin.com
                          | Twitter @wilva
                          | VMware Wiki at http://www.vi-toolkit.com
                          • 10. Re: Vmware Fusion 7 tech preview spins CPU on idle when running Windows 8.1
                            dlhotka Virtuoso

                            Longstanding advice from Fusion (and experience confirms) that a VM should be configured for more than N-1 of the physical cores in the system (virtual cores on the host do not count).  So for a MBP with 4 cores, the maximum cores for a single VM is 3 (virtual host cores don't count).  It's likely that the host is being starved.

                             

                            You can run VM's with a total of more than the physical cores in the system (for example, I can run 4 windows VMs and an OSX VM on my similar MBP, 2 cores each, without issue) - it's the cores for a single VM that's critical.

                            • 11. Re: Vmware Fusion 7 tech preview spins CPU on idle when running Windows 8.1
                              zhuzh Novice

                              I assume you mean should *not* be configured for more than N-1?   Yeah, so I generally agree with this advice, because if the VM guest spins all cores, then indeed the host will be starved.  It makes sense the CPU threads should not count toward this, as hyper-threading does not a full core make.

                               

                              In this particular scenario, the CPU usage in the guest is 0%.   So in fact, there's no starvation of any kind on the host.   What we're seeing is some anomaly, where the host is using CPU in a way, that does not correspond to guest usage at all.  This generally should not happen in virtualization (in emulation it might be the case).

                               

                              Hope this makes sense..

                              • 12. Re: Vmware Fusion 7 tech preview spins CPU on idle when running Windows 8.1
                                dlhotka Virtuoso

                                Yep, sorry about that - good catch.

                                 

                                Well, yes and no - Fusion will still allocate the core to the guest, which causes lockups, even if the guest isn't active (i.e. booted but idle).  The quick way to confirm is to drop to 2 or 3 cores in the vm - if it goes away, that's the problem.  If not, well, hmmm.

                                 

                                Have you confirmed which process is spiking the host CPU?  vmware-vmx or vmware-vnatd?

                                • 13. Re: Vmware Fusion 7 tech preview spins CPU on idle when running Windows 8.1
                                  zhuzh Novice

                                  It is the vmware-vmx process itself for the windows 8.1 vm that is spinning a bit.  It is not any of the vmware peripheral daemon processes (i.e.  not NAT daemon, not fusion UI, etc.)

                                  • 14. Re: Vmware Fusion 7 tech preview spins CPU on idle when running Windows 8.1
                                    rcardona2k Champion

                                    There are a few ways to generate mystery host CPU from an idle guest.  The most recent example in the news is from increasing the resolution of OS timers, like what Chrome does.  Ars described that in this article: Why Google took years to address a battery-draining “bug” in Chrome | Ars Technica

                                     

                                    Can you run this command in Win 8.1 and post the results.

                                    C:\Users\snadella>tasklist /v /fi "cputime ne 00:00:00"

                                     

                                    This will show aggregate CPU time used by active processes.  Maybe we can identity one that uses high resolution timers. In addition to Chrome, Apple iTunes background processes are another example.

                                    1 2 3 Previous Next