Problems with QueryPerformanceCounter on Windows Server 2003 Multi-Processor Hyper-V guests? Проблемы с QueryPerformanceCounter на Windows Server 2003 Multi-процессором Hyper-V гости? Here’s why. Вот почему.
A friend of mine from another group came to me with a problem he’s been having on some Windows Server 2003 guests. Мой друг из другой группы пришли мне с проблемой, он уже оказывает на некоторых Windows Server 2003 гостей.
They’re doing some nifty stuff with the .NET Они делают некоторые отличный материал с. NET Stopwatch() Секундомер () class, and some WPF animations, which uses the класс, и некоторые анимации МПП, которая использует QueryPerformanceCounter Win32 API to figure out the timing during the animations. Apparently, when they run their code in Hyper-V, the animations look sort of… not good. Win32 API, чтобы выяснить сроки в течение анимации. Видимо, когда запускать кода в Hyper-V, мультфильмы смотреть рода ... не хорошо.
They’re using Windows Server 2003 SP2 x86, which has been allocated two virtual processors. Они, используя Windows Server 2003 SP2 x86, которая была выделена двух виртуальных процессоров.
It turns out that our performance guru, Tony Voellm, has already encountered something like this. From Tony’s Получается, что наши показатели гуру, Тони Voellm, уже столкнулся-то вроде этого. С Тони blog post блог :
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. Коренная проблема возникает из Win32 QueryPerformanceCounter функции. По умолчанию он использует время источник назвал ТСК. Это процессорное время, что главным источником обвинения CPU циклов. ТСК за каждый (виртуальных) процессора могут быть разными, поэтому нет гарантии чтение ТСК, что на одном процессоре имеет ничего общего с чтением ТСК на другом процессоре. Это означает, спина к спине гласит ТНЦ на различных В.П. в самом деле может пойти вспять. Hyper-V guarantees that TSC will not go backwards on a single VP. Hyper-V гарантии, что ТСК не пойду назад на одном VP.
The fix for this is to modify the guest’s BOOT.INI file by adding the Исправления для этого заключается в том, чтобы изменить гостя BOOT.INI файл, добавляя /USEPMTIMER / USEPMTIMER switch to your operating system’s boot entry. This tells the system to use a different timer for QueryPerformanceCounter-related tasks, and should alleviate the problem. Переключить на вашей операционной системы, загрузочные записи. Это говорит системы для использования различными таймер для QueryPerformanceCounter, связанных с задачами, и должен облегчить проблему.
Written by mikekol. Автор mikekol. Read more great feeds at is source Подробнее большое каналы на исходный WEBSITE ИНТЕРНЕТ-САЙТ
no comments Без комментариев . .
Read more articles on Подробнее о статьях Hyper-V RTM Hyper-V RTM and и otherSoftware otherSoftware and и Miscellaneous V Разные V . .
- [+] Digg [+] Digg : Feature this article : Жанр этой статье
- [+] Del.icio.us [+] Del.icio.us : Bookmark this article : Закладка этой статье
- [+] Furl [+] Свертывать : Bookmark this article : Закладка этой статье















