From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dor Laor Subject: Re: Time and KVM - best practices Date: Mon, 22 Mar 2010 11:15:55 +0200 Message-ID: <4BA7354B.3080501@redhat.com> References: <1f0fa7ae1003210429k2e958bfj1b6bd98243cefa84@mail.gmail.com> Reply-To: dlaor@redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: kvm@vger.kernel.org, Glauber Costa , Jan Kiszka To: =?ISO-8859-1?Q?Thomas_L=F8cke?= Return-path: Received: from mx1.redhat.com ([209.132.183.28]:59432 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754054Ab0CVJOv (ORCPT ); Mon, 22 Mar 2010 05:14:51 -0400 In-Reply-To: <1f0fa7ae1003210429k2e958bfj1b6bd98243cefa84@mail.gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: On 03/21/2010 01:29 PM, Thomas L=F8cke wrote: > Hey, > > What is considered "best practice" when running a KVM host with a > mixture of Linux and Windows guests? > > Currently I have ntpd running on the host, and I start my guests usin= g > "-rtc base=3Dlocalhost,clock=3Dhost", with an extra "-tdf" added for > Windows guests, just to keep their clock from drifting madly during > load. > > But with this setup, all my guests are constantly 1-2 seconds behind > the host. I can live with that for the Windows guests, as they are no= t Is it just during boot time? If you run ntpdate after the boot inside=20 the guest, does the time is 100% in sync with the host from that moment= on? Glauber once analyzed it and blames hwclock call in rc.sysinit > running anything that depends heavily on the time being set perfect, > but for some of the Linux guests it's an issue. > > Would I be better of using ntpd and "-rtc base=3Dlocalhost,clock=3Dvm= " for > all the Linux guests, or is there some other magic way of ensuring > that the clock is perfectly in sync with the host? Perhaps there are > some kernel configuration I can do to optimize the host for KVM? Jan is the expert here, but last I checked clock=3Dvm is not appropriat= e=20 since this is virtual time and not host time - if qemu is=20 stopped/migrated you won't notice it with virtual time withing the gues= t=20 but the drift will grow. > > I'm currently using QEMU PC emulator version 0.12.50 (qemu-kvm-devel) > because version 0.12.30 did not work well at all with Windows guests, > and the kernel in both host and Linux guests is 2.6.33.1 > > :o) > /Thomas > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html