Programs that use the QueryPerformanceCounter() function may perform poorly in x64-based versions of Windows (895980)



The information in this article applies to:

  • Microsoft Windows Server 2003, Datacenter x64 Edition
  • Microsoft Windows Server 2003, Enterprise x64 Edition
  • Microsoft Windows Server 2003, Standard x64 Edition
  • Microsoft Windows XP Professional x64 Edition

SYMPTOMS

On a computer that is running an x64-based version of Microsoft Windows, you install a program that uses the QueryPerformanceCounter function to query system time. In this scenario, the program that uses the QueryPerformanceCounter function may perform poorly. For example, if you run the ping command at the command prompt, you may receive low or incorrect latency values.

CAUSE

This problem occurs on computers that are running an x64-based version of Windows and that have the AMD Cool'n'Quiet technology enabled in the BIOS.

RESOLUTION

To resolve this problem, you may have to update the BIOS on your computer. Alternatively, you can modify the Boot.ini file to use the /usepmtimer switch. To do this, follow these steps:
  1. Log on to your x64-based computer by using an account that has administrative credentials.
  2. Click Start, click Run, type notepad c:\boot.ini, and then click OK.
  3. In the Boot.ini file, a line that starts with "default" is located in the "[boot loader]" section. This line specifies the location of the default operating system. The line may appear as follows.

    default=multi(0)disk(0)rdisk(0)partition(2)\WINDOWS

    In the "[operating systems]" section, locate the line for your operating system that corresponds to the "default" line. For example, if your computer is running Microsoft Windows Server 2003, Enterprise x64 Edition, the line should look similar to the following.

    multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Windows Server 2003 Enterprise x64 Edition" /fastdetect /NoExecute=OptIn

  4. At the end of the line, add a space, and then type /usepmtimer. The line should now look similar to the following.

    multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Windows Server 2003 Enterprise x64 Edition" /fastdetect /NoExecute=OptIn /usepmtimer

  5. Save the file, and then quit Notepad.
  6. Restart the computer.
The following is an example of a Boot.ini file for a system that contains the /usepmtimer switch.

[boot loader]
timeout=0
default=multi(0)disk(0)rdisk(0)partition(2)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Windows Server 2003 Enterprise x64 Edition" /fastdetect /NoExecute=OptIn /usepmtimer

Note The Boot.ini file is located in the root folder of the system drive.

The third-party products that this article discusses are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, regarding the performance or reliability of these products.

MORE INFORMATION

Technical support for Windows x64 editions

Your hardware manufacturer provides technical support and assistance for Microsoft Windows x64 editions. Your hardware manufacturer provides support because a Windows x64 edition was included with your hardware. Your hardware manufacturer might have customized the Windows x64 edition installation with unique components. Unique components might include specific device drivers or might include optional settings to maximize the performance of the hardware. Microsoft will provide reasonable-effort assistance if you need technical help with your Windows x64 edition. However, you might have to contact your manufacturer directly. Your manufacturer is best qualified to support the software that your manufacturer installed on the hardware.

For product information about Microsoft Windows XP Professional x64 Edition, visit the following Microsoft Web site: For product information about Microsoft Windows Server 2003 x64 editions, visit the following Microsoft Web site:

Modification Type:MinorLast Reviewed:8/26/2005
Keywords:kbtshoot kbprb KB895980 kbAudEndUser kbAudITPRO