Problems with QueryPerformanceCounter on Windows Server 2003 Multi-Processor Hyper-V guests? Probleme mit QueryPerformanceCounter auf Windows Server 2003 Multi-Prozessor-Hyper-V Gäste? Here’s why. Hier ist der Grund, warum.
A friend of mine from another group came to me with a problem he’s been having on some Windows Server 2003 guests. Ein Freund von mir aus einer anderen Gruppe kam zu mir mit einem Problem, er hat sich mit einigen auf Windows Server 2003 Gäste.
They’re doing some nifty stuff with the .NET Sie tun einige nette Dinge mit. NET Stopwatch() Stoppuhr () class, and some WPF animations, which uses the Klasse, und einige WPF Animationen, welche die 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, um herauszufinden, der Zeitpunkt während der Animationen. Offensichtlich, wenn sie ihren Code in Hyper-V, die Animationen sehen Art ... nicht gut.
They’re using Windows Server 2003 SP2 x86, which has been allocated two virtual processors. Sie sind mit Windows Server 2003 SP2 x86, zugewiesen wurden zwei virtuelle Prozessoren.
It turns out that our performance guru, Tony Voellm, has already encountered something like this. From Tony’s Es stellt sich heraus, dass unsere Leistung Guru, Tony Voellm, hat bereits, die etwas davon. Von Tony's blog post 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. Die Wurzel Frage kommt aus dem Win32-Funktion QueryPerformanceCounter. Standardmäßig verwendet er eine Zeit Quelle genannt TSC. Dies ist ein CPU-Zeit Quelle, die im Wesentlichen zählt CPU-Zyklen. Die TSC für jeden (virtuellen) Prozessor kann sich so gibt es keine Garantie Lesung TSC, dass auf ein Prozessor zu tun hat, mit Lesung TSC auf einem anderen Prozessor. Dies bedeutet, Rücken an Rücken liest der TSC auf verschiedenen VP kann's gehen sogar noch rückwärts. Hyper-V guarantees that TSC will not go backwards on a single VP. Hyper-V garantiert, dass TSC wird nicht gehen rückwärts auf einem einzigen VP.
The fix for this is to modify the guest’s BOOT.INI file by adding the Das Update für dieses ist die Änderung der Gast die BOOT.INI-Datei, indem Sie die /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. schalten Sie das Betriebssystem Boot-Eintrag. Dies sagt das System zu nutzen eine andere Timer für QueryPerformanceCounter-bezogenen Aufgaben, und sollte Abhilfe geschaffen werden.
Written by mikekol. Geschrieben von mikekol. Read more great feeds at is source Lesen Sie mehr auf große Feeds ist Quelle WEBSITE WEBSITE
no comments keine Kommentare . .
Read more articles on Lesen Sie mehr Artikel über Hyper-V RTM Hyper-V RTM and und otherSoftware otherSoftware and und Miscellaneous V Verschiedenes V . .
- [+] Digg [+] Digg : Feature this article : Feature dieser Artikel
- [+] Del.icio.us [+] Del.icio.us : Bookmark this article : Bookmark diesem Artikel
- [+] Furl [+] Furl : Bookmark this article : Bookmark diesem Artikel















