1 2 3 Previous Next 34 Replies Latest reply on Sep 5, 2014 8:34 PM by zhuzh Go to original post
      • 15. Re: Vmware Fusion 7 tech preview spins CPU on idle when running Windows 8.1
        zhuzh Novice

        I reconfigured my Windows 8.1 VM to use only 1 core, and it made an interesting difference.

        Instead of showing a steady 50-60% spin with the vmware-vmx process in the host activity monitor on OSX, it is now showing only a 20% spin.   All of this is with all processes idle on the guest VM.

        While 20% is low, this behavior still isn't normal or expected, as noted earlier, my Ubuntu 14.04 VM, while on, does not cause the OSX activity monitor to show any CPU use on the host side.

         

        So it seems like there's still something going on, but it definitely has to do with CPU core count.   Which I think potentially points more toward some issue potentially relating to OS timers and such.  It's not any particular process, but something that is messing with the OS itself, causing some weird spinning behavior?

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

          So for security/company policy reasons, I'm not going to list the exact content of the output for this.

          However, I can list manually for you the programs that I have (mostly shown as a result of this command):

           

          SQL Server 2012 developer edition

          Skype

          GotoMeeting

          AVG free 2014

          SearchIndexer

          SkyDrive

          vmtoolsd

          audiodg

          ViStart.exe (Windows 8 start button replacement)

          MSOSync

          explorer.exe

          a few svchost.exe (for services and such, not clear exactly what's here)

          System idle and System are taking the most %, as expected

           

          All processes are showing 0% CPU usage at the time I ran this command.

          When Chrome is not running, cpu host spinning behavior is still there, though this Chrome tweaking system timer resolution is very interesting... Need to do some more research on this.

           

           

          Thanks!

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

            I've done some more research, and it turns out that there are multitude of programs that jack up the OS timer resolution.

            Chrome, GotoMeeting, SQLServer, audiodg, anything using WPF, etc.

             

            See this article for some interesting insight on this.

            http://randomascii.wordpress.com/2013/07/08/windows-timer-resolution-megawatts-wasted/

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

              Hey @zhuzh

               

              Great research!

              Love the article you linked, found that the taskbar application of an antivirus solution that I use did also set the system wide timers and already reported that at their technical support. I'd be curious to see how they react.

              Killing that task bar app dropped CPU usage on my VMs immediately

               

              FWIW, gotomeeting you can run at OS X level, it does not run when not using it.

              If you don't always run SQL server then you might want to try MS SQLServer localdb, that's what I use for development and the great thing about that is that it only runs when your database app has a database attached.

              It's very light weight and supports almost anything that SQL Server supports, it surely supports a lot more as an azure cloud instance.

               

              --

              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
              • 19. Re: Vmware Fusion 7 tech preview spins CPU on idle when running Windows 8.1
                rcardona2k Champion

                That's a good article and it looks like you have several possible culprits. Since high resolution timers affect host OS CPU performance, there should be a way VMware makes this cause visible to the end-user.

                 

                I assumed you tried shutting down each of these apps and looking at the difference?  If the Win 8.1 kernel is supposed to be tickless, that doesn't seem to affect host OS CPU utilization as much as it saves battery life on laptops.

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

                  What does perfmon report for interrupts/sec in the Windows 8.1 guest?

                   

                  Run perfmon.exe, left-click on 'Performance Monitor', right-click on the graph window and select 'Add Counters...'  In the menu that comes up under 'Available Counters,' open the 'Processor' sub-menu and select 'Interrupts/sec.'  An idle Windows 8.1 VM should average < 5k interrupts/sec.

                   

                  [Edit: Oops! -- "5" should have been "5k".]

                   

                  Message was edited by: Jim Mattson

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

                    For me closing Chrome was the major performance gain factor and I can confirm the 1ms scheduler timing with it open.

                    My VM now idles at 5% host cpu usage with 180 interrupts/s on the VM

                    With Outlook 2013 and Lync open it idles at 7~% with 190 interrupts/s

                     

                    Like I state in my other thread, I still get major pauses when working.

                    I sometimes see 40% System cpu usage when this happens.

                     

                    As for host CPU starvation, my VM has 2 CPUs out of 4 host Cores (8 threads) and I had the same results with just 1 CPU.

                    There was no major cpu usage from other apps on the host OS

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

                      Please power off your VM and add the following to your VM's configuration file:

                       

                      monitor.idleLoopMaxSpinUS = 2000


                      Let me know if it makes any difference.

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

                        And after posting the last message, I opened a 96 page PowerPoint from the VM HDD and I "lost" access to the VM for about 20 seconds as in not even a mouse pointer would appear, even Performance Monitor that was open stopped logging.

                        vmware-vmx cpu usage was 199%

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

                          Thank you for the suggestion.

                           

                          I've put this into the VMX file. 

                          monitor.idleLoopMaxSpinUS = 2000

                          I shutdown the VM, killed VMWare Fusion UI, and restarted to make sure it reloads the VMX.

                           

                          It does not seem to make a significant difference in the Host side CPU spin.  Possibly a few %?  I think too small a difference to say. 

                          The reason it's hard to say is that the SPIN % on the host side is not steady.  It's something always around the 40-60% range (when on 4 vCPU's, and less when on 1 vCPU), so it looks to be still in that range.  Every once in a while it might be due to some Windows guest process spiking for a second, but it's too hard to account for all that.

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

                            Let's try a slightly bigger hammer:

                             

                            monitor.idleLoopSpinUS = 0


                            If that doesn't do anything, I will abandon this avenue.

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

                              I like big hammers!

                               

                              I did try this.

                              monitor.idleLoopSpinUS = 0

                               

                              It also didn't affect spin % on the osx side in a significant way.  I didn't try both together.  I removed the other one, and put this one in.  Should I use both?

                               

                              Just to be sure, this is a different property from the earlier one right?   The other one is:

                              monitor.idleLoopMaxSpinUS?


                              Is there a way to know for sure the property is being picked up?   I've modified vmx files manually before, so am pretty comfortable doing that, so as long as the property is spelled right, I'm pretty sure I've put it in the VMX file properly.

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

                                zhuzh wrote:

                                Is there a way to know for sure the property is being picked up?   I've modified vmx files manually before, so am pretty comfortable doing that, so as long as the property is spelled right, I'm pretty sure I've put it in the VMX file properly.

                                Oops!  I'm glad you asked.  If it worked, Fusion will have added the following configuration option to your .vmx file behind your back:

                                 

                                monitor.idleLoopDynamic = "FALSE"


                                You'll want to remove that entry as well when you undo your change.

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

                                  In case you're wondering, these parameters affect how long Fusion waits for guest activity to resume before giving up and yielding back to the host scheduler.

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

                                    So I found a big clue!

                                     

                                    I'm using clockres from sysinternals.

                                    When Chrome and gotomeeting, etc. are running, (even when not actively using CPU), the timer interval is set to 1.000 ms, as seen by clockres, the idle spin is at 40-50%.

                                     

                                    When you kill ALL apps that request finer resolution on the clock, i.e. chrome, gotomeeting, etc.,  the current timer interval goes back to the maximum, which is 15.625 ms.

                                     

                                    When this happens, the CPU spin % drops to 6-7% on my MBP!

                                     

                                     

                                    So I guess my remaining thought is,  this doesn't happen on VMWare workstation on Windows (my guess Linux either, but I don't generally use Linux host).  Seems to be isolated to VMWare Fusion on OSX.    Any chance this can be addressed?