All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roman Kagan <rkagan@virtuozzo.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Longpeng (Mike)" <longpeng2@huawei.com>,
	Eduardo Habkost <ehabkost@redhat.com>,
	"Denis V. Lunev" <den@virtuozzo.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Denis Plotnikov <dplotnikov@virtuozzo.com>,
	rth@twiddle.net, qemu-devel@nongnu.org,
	Gonglei <arei.gonglei@huawei.com>,
	zhaoshenglong <zhaoshenglong@huawei.com>
Subject: Re: [Qemu-devel] [PATCH] i386: turn off l3-cache property by default
Date: Thu, 30 Nov 2017 09:28:29 +0300	[thread overview]
Message-ID: <20171130062827.GA12690@rkaganip.lan> (raw)
In-Reply-To: <4ebcd22a-4c6c-8260-c94c-26810d6a24cd@redhat.com>

On Wed, Nov 29, 2017 at 06:15:05PM +0100, Paolo Bonzini wrote:
> On 29/11/2017 14:35, Roman Kagan wrote:
> >>
> >>> IMO, the long term solution is to make Linux guests not misbehave
> >>> when we stop lying about the L3 cache.  Maybe we could provide a
> >>> "IPIs are expensive, please avoid them" hint in the KVM CPUID
> >>> leaf?
> > We already have it, it's the hypervisor bit ;)  Seriously, I'm unaware
> > of hypervisors where IPIs aren't expensive.
> > 
> 
> In theory, AMD's AVIC should optimize IPIs to running vCPUs.  Amazon's
> recently posted patches to disable HLT and MWAIT exits might tilt the
> balance in favor of IPIs even for Intel APICv (where sending the IPI is
> expensive, but receiving it isn't).
> 
> Being able to tie this to Amazon's other proposal, the "DEDICATED" CPUID
> bit, would be nice.  My plan was to disable all three of MWAIT/HLT/PAUSE
> when setting the dedicated bit.

Yes the IPI cost can hopefully be mitigated in the case of dedicated and
busy vCPUs.

However, in the max density scenario this doesn't help.

Obviously, in the pipe benchmark scheduling the two ends of the pipe on
different cores is detrimental for performance even on a physical
machine; however, IIUC it was a conscious decision by the scheduler
folks because it provides acceptable latency for mostly-idle systems and
decent performance in more loaded cases.

We wouldn't care about this pipe benchmark numbers per se, because the
latencies are still good for practical purposes.  However, in case of
virtual machines, this extra overhead of remote scheduling in the guest
results in a slight -- circa 15% in our Drupal-based test -- increase of
the host cpu consumption by vcpu threads.  That, in turn, makes the host
cpu overcommit being reached with 15% less VMs (and, once overcommit is
reached, the drupal response latency goes into the sky, so it's
effectively a cut-off for density).

Roman.

  reply	other threads:[~2017-11-30  6:28 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-24 13:26 [Qemu-devel] [PATCH] i386: turn off l3-cache property by default Denis Plotnikov
2017-11-28 18:54 ` Michael S. Tsirkin
2017-11-28 19:50   ` Paolo Bonzini
2017-11-28 20:05     ` Eduardo Habkost
2017-11-29  4:56     ` Roman Kagan
2017-11-28 19:58 ` Eduardo Habkost
2017-11-28 20:20   ` Denis V. Lunev
2017-11-28 21:13     ` Eduardo Habkost
2017-11-29  1:57       ` Gonglei (Arei)
2017-11-29  5:55         ` rkagan
2017-11-29  6:01           ` Gonglei (Arei)
2017-11-29  5:20       ` Longpeng (Mike)
2017-11-29  6:01         ` Roman Kagan
2017-11-29  7:38           ` Longpeng (Mike)
2017-11-29 10:41         ` Eduardo Habkost
2017-11-29 11:58           ` Longpeng (Mike)
2017-11-29 13:35             ` Roman Kagan
2017-11-29 17:09               ` Eduardo Habkost
2017-11-29 17:15               ` Paolo Bonzini
2017-11-30  6:28                 ` Roman Kagan [this message]
2017-11-30  9:26               ` Longpeng (Mike)
2017-11-29  5:46       ` Roman Kagan
2017-11-29 10:25         ` Eduardo Habkost
2017-11-29  4:17     ` Michael S. Tsirkin
2017-11-29  6:25       ` Roman Kagan

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=20171130062827.GA12690@rkaganip.lan \
    --to=rkagan@virtuozzo.com \
    --cc=arei.gonglei@huawei.com \
    --cc=den@virtuozzo.com \
    --cc=dplotnikov@virtuozzo.com \
    --cc=ehabkost@redhat.com \
    --cc=longpeng2@huawei.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=zhaoshenglong@huawei.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.