public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: "David S. Ahern" <daahern@cisco.com>
Cc: Glauber Costa <gcosta@redhat.com>, kvm-devel <kvm@vger.kernel.org>
Subject: Re: kvm guest loops_per_jiffy miscalibration under host load
Date: Tue, 29 Jul 2008 11:58:33 -0300	[thread overview]
Message-ID: <20080729145833.GA28520@dmt.cnet> (raw)
In-Reply-To: <48863B5C.9040203@cisco.com>

On Tue, Jul 22, 2008 at 01:56:12PM -0600, David S. Ahern wrote:
> I've been running a series of tests on RHEL3, RHEL4, and RHEL5. The
> short of it is that all of them keep time quite well with 1 vcpu. In the
> case of RHEL3 and RHEL4 time is stable for *both* the uniprocessor and
> smp kernels, again with only 1 vcpu (there's no up/smp distinction in
> the kernels for RHEL5).
> 
> As soon as the number of vcpus is >1, time drifts systematically with
> the guest *leading* the host. I see this on unloaded guests and hosts
> (ie., cpu usage on the host ~<5%). The drift is averaging around
> 0.5%-0.6% (i.e., 5 seconds gained in the guest per 1000 seconds of real
> wall time).
> 
> This very reproducible. All I am doing is installing stock RHEL3.8, 4.4
> and 5.2, i386 versions, starting them and watching the drift with no
> time servers. In all of these recent cases the results are for in-kernel
> pit.

David,

You mentioned earlier problems with ntpd syncing the guest time? Can you
provide more details?

I find it _necessary_ to use the RR scheduling policy for any Linux
guest running at static 1000Hz (no dynticks), otherwise timer interrupts
will invariably be missed. And reinjection plus lost tick adjustment is
always problematic (will drift either way, depending which version of
Linux). With the standard batch scheduling policy _idle_ guests can wait
to run upto 6/7 ms in my testing (thus 6/7 lost timer events). Which
also means latency can be horrible.

  parent reply	other threads:[~2008-07-29 14:59 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-22  3:25 kvm guest loops_per_jiffy miscalibration under host load Marcelo Tosatti
2008-07-22  8:22 ` Jan Kiszka
2008-07-22 12:49   ` Marcelo Tosatti
2008-07-22 15:54     ` Jan Kiszka
2008-07-22 22:00     ` Dor Laor
2008-07-22 19:56 ` David S. Ahern
2008-07-23  2:57   ` David S. Ahern
2008-07-29 14:58   ` Marcelo Tosatti [this message]
2008-07-29 16:06     ` PIT/ntp/timekeeping [was Re: kvm guest loops_per_jiffy miscalibration under host load] David S. Ahern
2008-07-29 17:29       ` David S. Ahern
  -- strict thread matches above, loose matches on Subject: below --
2008-07-02 16:40 kvm guest loops_per_jiffy miscalibration under host load Marcelo Tosatti
2008-07-03 13:17 ` Glauber Costa
2008-07-04 22:51   ` Marcelo Tosatti
2008-07-07  1:56   ` Anthony Liguori
2008-07-07 18:27     ` Glauber Costa
2008-07-07 18:48       ` Marcelo Tosatti
2008-07-07 19:21         ` Anthony Liguori
2008-07-07 19:32           ` Glauber Costa
2008-07-07 21:35             ` Glauber Costa
2008-07-11 21:18               ` David S. Ahern
2008-07-12 14:10                 ` Marcelo Tosatti
2008-07-12 19:28                   ` David S. Ahern
2008-07-07 18:17 ` Daniel P. Berrange

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=20080729145833.GA28520@dmt.cnet \
    --to=mtosatti@redhat.com \
    --cc=daahern@cisco.com \
    --cc=gcosta@redhat.com \
    --cc=kvm@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox