locked
Host clock slows down when running a virtual machine RRS feed

  • Question

  • On my Windows 7 PC, I have tried VirtualBox and VMWare Player to run Virtual Machines.  Every time I start a VM, the clock on the host slows down (I'll call this the windows clock).  Within 10 minutes of shutting down a VM, the windows clock fixes itself.

    My PC motherboard comes with a LCD display that shows the system time (i.e., the time according to the BIOS/CMOS).  Using the stopwatch on a mobile phone, I was able to determine that when a VM is NOT running, all the clocks (system, windows, and stopwatch) are perfectly in sync (one minute in real world = one minute in windows).

    However, when one or more VMs are running, the windows clock slows down by 40% (one minute in real world = 36 seconds in windows).  The system clock is NOT effected and remains in sync with the real world; only the windows clock seems to be effected.  Guest clocks reflect the windows clock time.

    The results (1min = 36 secs) are the same regardless of using VirtualBox or VMware.  The number of VMs running does not change the time ratio either.

    I had read a couple posts that said this was caused by low resources on the host.  However with both guests running, task manager reports that I have 2GB RAM to spare and am staying below 50% CPU utilization.  I assigned 4GB RAM and 3 cores (at max 50% usage) combined to the VMs leaving my PC with 4GB RAM, 1 full core and 50% on the other 3.

    Any help figuring out why and resolving the issue is appreciated.

    Thursday, October 17, 2013 7:45 PM

All replies

  • Assigning more CPUs to a VM actually hurts performance all around due to the cpu ready time the VM has to calculate now.  Less CPUs = better on a VM.  Also, hard drive speed would be a factor as well and if your computer is pegged on IOPS (operations per second) for the HDD then that would cause a severe slow down as well.  What OS are you running on the VMs?  Do you notice the clock slow down start to normalize at all before or after booting up the VM.....such as when its idle or during bootup/restart of the VM?

    Be kind and Mark as Answer if I helped.

    Thursday, October 17, 2013 8:41 PM
  • Assigning more CPUs to a VM actually hurts performance all around due to the cpu ready time the VM has to calculate now.  Less CPUs = better on a VM.
     VM1 has 1 CPU, VM2 has 2 CPUs. The problem is exactly the same whether I run VM1 only, VM2 only, or both VM1 and VM2 simultaneously.
     Also, hard drive speed would be a factor as well and if your computer is pegged on IOPS (operations per second) for the HDD then that would cause a severe slow down as well.
    The host OS is on an SSD, the drive with the VM images is a 10000RPM drive. Testing the drives shows perfect performance outside of this issue. NOTE: I do not know what 'pegged on IOPS' means, please, clarify. 
     What OS are you running on the VMs?
    Currently both VMs are running Server08R2, but part of my troubleshooting was checking if the guest OS was the cause. Using Windows 98, XP, Vista or 7 as a guest OS does not alter the issue (it remains). 
     Do you notice the clock slow down start to normalize at all before or after booting up the VM.....such as when its idle or during bootup/restart of the VM?
    The timing slow down does not fluctuate if that's what you mean by normalize. As soon as a VM is started the windows clock slows to 0.6 seconds in windows for every 1 second in the real world. As soon as the VM stops, the windows clock resumes 1 second = 1 second. Within 10 minutes of stopping the VM the clock syncs to the system.

    Thursday, October 17, 2013 9:48 PM
  • NOTE: The host is part of a domain and is configured to get time data from the domain controller (SVR01-08R2.example.com).

    Going through the Event Viewer, I found some Warnings and Information messages for the Windows Time Service:

    VM1 (1 CPU and 512MB RAM) started at 9:15am

    8:46am -- Event ID 35
    The time service is now synchronizing the system time with the time source SVR01-08R2.example.com (ntp.d|0.0.0.0:123->192.168.1.10:123).
    9:46am -- Event ID 129 (two identical entries 17 seconds apart)
    NtpClient was unable to set a domain peer to use as a time source because of discovery error. NtpClient will try again in 3473457 minutes and double the reattempt interval thereafter. The error was: The entry is not found. (0x800706E1)

    VM1 stopped at 10:00am

    10:10am -- Event ID 129 (two identical entries 17 seconds apart)
    NtpClient was unable to set a domain peer to use as a time source because of discovery error. NtpClient will try again in 3473457 minutes and double the reattempt interval thereafter. The error was: The entry is not found. (0x800706E1)
    10:25am -- Event ID 138
    NtpClient succeeds in resolving domain peer SVR01-08R2.example.com after a previous failure.
    10:25am -- Event ID 37
    The time provider NtpClient is currently receiving valid time data from SVR01-08R2.example.com (ntp.d|0.0.0.0:123->192.168.1.10:123).




    Friday, October 18, 2013 3:23 PM
  • is "SVR01-08R2.example.com" in a VM on your host machine as well?  I do admit that its bizarre that your host time slows down as I've personally never seen it.  I have seen the VM's with a slow clock and sometimes you can resolve it by telling it to not sync its time with the host and instead use an NTP server (in the virtual machine settings not in the OS settings).  I'm stumped.

    Be kind and Mark as Answer if I helped.

    Friday, October 18, 2013 3:44 PM
  • is "SVR01-08R2.example.com" in a VM on your host machine as well?

    Nope.  SVR01-08R2 is both the domain controller and a physical machine.

    w32tm /query /status gives me this:

    Leap Indicator: 3(last minute has 61 seconds)
    Stratum: 0 (unspecified)
    Precision: -6 (15.625ms per tick)
    Root Delay: 0.0630341s
    Root Dispersion: 7.8749130s
    ReferenceId: 0x00000000 (unspecified)
    Last Successful Sync Time: 18/10/2013 12:44:21 PM
    Source: SVR01-08R2.example.com
    Poll Interval: 10 (1024s)

    However, w32tm /resync fails

    Sending resync command to local computer
    The computer did not resync because no time data
    was available.

    even though ping succeeds

    Pinging svr01-08r2.example.com [192.168.1.10] with 32 bytes of data:
    Reply from 192.168.1.10: bytes=32 time<1ms TTL=128
    Reply from 192.168.1.10: bytes=32 time<1ms TTL=128
    Reply from 192.168.1.10: bytes=32 time<1ms TTL=128
    Reply from 192.168.1.10: bytes=32 time<1ms TTL=128
    
    Ping statistics for 192.168.1.10:
        Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    Approximate round trip times in milli-seconds:
        Minimum = 0ms, Maximum = 0ms, Average = 0ms
    Friday, October 18, 2013 5:46 PM
  • UPDATE:

    When any VM is running

    C:\Windows\system32>w32tm /resync
    Sending resync command to local computer
    The computer did not resync because no time data was available.
    Immediately after all VMs are shutdown
    C:\Windows\system32>w32tm /resync
    Sending resync command to local computer
    The command completed successfully.
    I have tried repeating this 10 times each using Virtualbox and VMware and get the same output all 20 times.  When any VM is running, resync fails.  When all VMs are shutdown, resync succeeds.

    Friday, October 18, 2013 6:03 PM