Problems with QueryPerformanceCounter on Windows Server 2003 Multi-Processor Hyper-V guests? QueryPerformanceCounter sobre problemas com o Windows Server 2003 Multi-Processor Hiper-V convidados? Here’s why. Veja porquê.
A friend of mine from another group came to me with a problem he’s been having on some Windows Server 2003 guests. Uma amiga minha do outro grupo veio a mim com um problema que ele vem tendo no Windows Server 2003 alguns convidados.
They’re doing some nifty stuff with the .NET Eles estão fazendo algumas coisas com o estiloso. NET Stopwatch() Cronómetro () class, and some WPF animations, which uses the classe, e alguns wpf animações, que utiliza o 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 para descobrir o momento durante as animações. Aparentemente, quando se deparam no seu código Hyper-V, as animações olhar espécie de bom ... não.
They’re using Windows Server 2003 SP2 x86, which has been allocated two virtual processors. Eles estão usando o Windows Server 2003 SP2 x86, que foi atribuído dois processadores virtuais.
It turns out that our performance guru, Tony Voellm, has already encountered something like this. From Tony’s Acontece que o nosso desempenho guru, Tony Voellm, tenha já encontrou algo parecido com isto. Do Tony's blog post postagem no blog :
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. A raiz do problema dá-se o Win32 QueryPerformanceCounter função. Por padrão ele utiliza uma fonte de tempo chamado de TSC. Essa é uma fonte de tempo da CPU que, no essencial, contagens ciclos da CPU. O TSC para cada um (virtual) processador pode ser tão diferente que não há garantia de que a leitura em um processador TSC tem nada a ver com a leitura TSC em outro processador. Isto significa voltar para trás das leituras em TSC diferentes VP's pode ficar para trás. Hyper-V guarantees that TSC will not go backwards on a single VP. Hyper-V TSC garante que não irá recuar em um único VP.
The fix for this is to modify the guest’s BOOT.INI file by adding the A correção para isso é a modificar o hóspede do arquivo BOOT.INI, acrescentando o /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. alternar para o sistema operativo da entrada boot. Este diz ao sistema para usar um temporizador para diferentes tarefas relacionadas com QueryPerformanceCounter, e deverá atenuar o problema.
Written by mikekol. Escrito por mikekol. Read more great feeds at is source Leia mais em grande feeds é fonte WEBSITE WEBSITE
no comments sem comentários . .
Read more articles on Leia mais artigos sobre Hyper-V RTM Hyper-V RTM and e otherSoftware otherSoftware and e Miscellaneous V Diversos V . .
- [+] Digg [+] Digg : Feature this article : Feature este artigo
- [+] Del.icio.us [+] Del.icio.us : Bookmark this article : Bookmark este artigo
- [+] Furl [+] Furl : Bookmark this article : Bookmark este artigo















