From: Jan Kiszka <jan.kiszka@siemens.com>
To: dlaor@redhat.com
Cc: "Thomas Løcke" <thomas.granvej6@gmail.com>,
kvm@vger.kernel.org, "Glauber Costa" <gcosta@redhat.com>
Subject: Re: Time and KVM - best practices
Date: Mon, 22 Mar 2010 11:36:07 +0100 [thread overview]
Message-ID: <4BA74817.8080607@siemens.com> (raw)
In-Reply-To: <4BA7354B.3080501@redhat.com>
Dor Laor wrote:
> On 03/21/2010 01:29 PM, Thomas Løcke 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 using
>> "-rtc base=localhost,clock=host", 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 not
>
> Is it just during boot time? If you run ntpdate after the boot inside
> 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=localhost,clock=vm" 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=vm is not appropriate
> since this is virtual time and not host time - if qemu is
> stopped/migrated you won't notice it with virtual time withing the guest
> but the drift will grow.
Don't know what Windows does with the RTC, but the idea behind -rtc
clock=host is to provide an accurate time source to guest without
paravirtualized guest kernel drivers or an ntp installation in the
guest. Last time I checked, hwclock run in a Linux guest was in sync
with the host system time.
Jan
--
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
next prev parent reply other threads:[~2010-03-22 10:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-21 11:29 Time and KVM - best practices Thomas Løcke
2010-03-22 9:15 ` Dor Laor
2010-03-22 9:55 ` Alexander Graf
2010-03-22 13:38 ` Glauber Costa
2010-03-22 10:36 ` Jan Kiszka [this message]
2010-03-22 12:41 ` Thomas Løcke
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BA74817.8080607@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=dlaor@redhat.com \
--cc=gcosta@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=thomas.granvej6@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.