Share via


Negative ping times in Windows VM's - whats up?

Just a quick blog post that might help you resolve an issue that some customers have seen running under Hyper-V VM's. The issue is negative ping times on multi-processor guests.

If you see negative ping times in multiprocessor W2k3 guest OSes you might consider setting the /usepmtimer in the boot.ini file.

The root issue comes about from the Win32 QueryPerformanceCounter function. By default it uses a time source called the TSC. This is a CPU time source that essentially counts CPU cycles. The TSC for each (virtual) processor can be different so there is no guarantee that reading TSC on one processor has anything to do with reading TSC on another processor. This means back to back reads of TSC on different VP's can actually go backwards. Hyper-V guarantees that TSC will not go backwards on a single VP.

So here the problem with negative ping times is the time source is using QueryPerformanceCounter which is using TSC. By using the /usepmtimer boot.ini flag you change the time source for QueryPerformanceCounter from TSC to the PM timer which is a global time source.

  - Tony Voellm

Comments

  • Anonymous
    June 18, 2008
    Hi, Is the PMTIMer virtualized per guest or is it routed (Via hyper-call) to a root partition reliable time source. If that is the case, what is the root partition time source (HPET,PMTimer,TSC,...) Thanks, Eran.

  • Anonymous
    June 18, 2008
    Hi, Is the PMTIMer virtualized per guest or is it routed (Via hyper-call) to a root partition reliable time source. If that is the case, what is the root partition time source (HPET,PMTimer,TSC,...) Thanks, Eran.

  • Anonymous
    October 15, 2008
    A friend of mine from the Visual Studio group just came to me with an issue they’re having on some Windows

  • Anonymous
    February 18, 2009
    There have been a number of issues with time in W2k3 guests, the first of which was covered in http://blogs.msdn.com/tvoellm/archive/2008/06/05/negative-ping-times-in-windows-vm-s-whats-up.aspx

  • Anonymous
    February 19, 2009
    If you're running Windows Server 2003 in a Hyper-V VM and have the VM configured to use multiple virtual

  • Anonymous
    September 11, 2009
    This is a problem with Win2k3 domain member servers.  Since ping is used to detect domain controllers, you get a Userenv event 1054 which stop Group policy processing

  • Anonymous
    December 16, 2009
    Hello, I just bought a new Quad Core PC and am observing the same problem. Processor is Intel Core2 Quad CPU (Q9400 @ 2.66GHz). It has 4 cores. I read about AMD requiring this fix and am not sure if Intel processors require the same fix. Also, can changing to PM Timer have any side effects on performance? Thanks!

  • Anonymous
    March 17, 2010
    The comment has been removed

  • Anonymous
    August 13, 2010
    I'm seeing this issue on a Windows Server 2008 R2 host machine running a Windows XP guest with 2 virtual processors.  Anyone know if this has a hotfix from Microsoft?

  • Anonymous
    January 15, 2011
    hi my vmware virtual machine ( win2k3 sp2) its shows uptime in neagtive.