From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ky6Gy-00008r-52 for qemu-devel@nongnu.org; Thu, 06 Nov 2008 09:55:48 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ky6Gx-000084-CZ for qemu-devel@nongnu.org; Thu, 06 Nov 2008 09:55:47 -0500 Received: from [199.232.76.173] (port=54695 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ky6Gx-00007v-7u for qemu-devel@nongnu.org; Thu, 06 Nov 2008 09:55:47 -0500 Received: from mx2.redhat.com ([66.187.237.31]:57636) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ky6Gt-00054T-Gi for qemu-devel@nongnu.org; Thu, 06 Nov 2008 09:55:45 -0500 Date: Thu, 6 Nov 2008 16:51:42 +0200 From: Gleb Natapov Subject: Re: [Qemu-devel] [RESEND][PATCH 0/3] Fix guest time drift under heavy load. Message-ID: <20081106145142.GA29861@redhat.com> References: <20081029152236.14831.15193.stgit@dhcp-1-237.local> <20081106081206.GD3820@redhat.com> <4912FAE5.9010100@codemonkey.ws> <200811061424.43689.paul@codesourcery.com> <491301C9.40506@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <491301C9.40506@codemonkey.ws> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Paul Brook , qemu-devel@nongnu.org On Thu, Nov 06, 2008 at 08:40:09AM -0600, Anthony Liguori wrote: > Paul Brook wrote: >>> You see time drift with 100hz timers in the guest?? That makes very >>> little sense as even without hr timers, the host should have no problem >>> delivering a 10ms timer. >>> >> >> If your host has HZ=100 and no HR timers than a 10ms interval is fairly >> borderline, and it's not that hard to end up missing an interrupt, >> especially under heavy load. >> > > If the host is otherwise idle, then the guest should have ample time to > run. With /dev/rtc, you should be able to get a reliably 1ms timer. And only one guest. BTW I am saying that guest timer is 100HZ since I assume that windows2003 behaves like XP in this regard, but may be default timer frequency of 2003 is different. I'll check this. > > Gleb: are you perhaps using a qcow2 file in conjunction with -snapshot? I am using qcow2, but without -snapshot. > If that's the case, and you're doing an IO intensive workload, then you > would be expanding the qcow2 file and updating the metadata is > synchronous. This could cause lost time for the guest. > I think that's what happens when I see a huge drift, yes. > If you are using qcow2, can you still reproduce with a raw file and not > using -snapshot? I'll try next week to run with a raw file. > >> If part of qemu gets swapped out then all bets are off, and you can >> easily stall for significant fractions of a second. No amount of host >> high resolution time support will help you there. >> > > Running a steady workload, you aren't going to be partially swapped. > We want to oversubscribe host as much as possible, and workload will vary during a lifetime of the VMs. -- Gleb.