From: Avi Kivity <avi@redhat.com>
To: Peter Lieven <pl@dlh.net>
Cc: Stefan Hajnoczi <stefanha@gmail.com>,
qemu-devel@nongnu.org, kvm@vger.kernel.org
Subject: Re: linux guests and ksm performance
Date: Tue, 28 Feb 2012 15:56:21 +0200 [thread overview]
Message-ID: <4F4CDD05.5030003@redhat.com> (raw)
In-Reply-To: <4F4CD494.5020909@dlh.net>
On 02/28/2012 03:20 PM, Peter Lieven wrote:
> On 28.02.2012 14:16, Avi Kivity wrote:
>> On 02/24/2012 08:41 AM, Stefan Hajnoczi wrote:
>>>> I dont think that it is cpu intense. All user pages are zeroed
>>>> anyway, but at allocation time it shouldnt be a big difference in
>>>> terms of cpu power.
>>> It's easy to find a scenario where eagerly zeroing pages is wasteful.
>>> Imagine a process that uses all of physical memory. Once it
>>> terminates the system is going to run processes that only use a small
>>> set of pages. It's pointless zeroing all those pages if we're not
>>> going to use them anymore.
>> In the long term, we will use them, except if the guest is completely
>> idle.
>>
>> The scenario in which zeroing is expensive is when the page is refilled
>> through DMA. In that case the zeroing was wasted. This is a pretty
>> common scenario in pagecache intensive workloads.
>>
> Avi, what do you think of the proposal to give the guest vm a hint
> that the host is running ksm? In that case the administrator
> has already chosen that saving physical memory is more important
> than performance to him?
It makes some sense. Perhaps through the balloon device, a flag that
indicates that voluntary ballooning will be gratefully accepted.
--
error compiling committee.c: too many arguments to function
WARNING: multiple messages have this Message-ID (diff)
From: Avi Kivity <avi@redhat.com>
To: Peter Lieven <pl@dlh.net>
Cc: Stefan Hajnoczi <stefanha@gmail.com>,
qemu-devel@nongnu.org, kvm@vger.kernel.org
Subject: Re: [Qemu-devel] linux guests and ksm performance
Date: Tue, 28 Feb 2012 15:56:21 +0200 [thread overview]
Message-ID: <4F4CDD05.5030003@redhat.com> (raw)
In-Reply-To: <4F4CD494.5020909@dlh.net>
On 02/28/2012 03:20 PM, Peter Lieven wrote:
> On 28.02.2012 14:16, Avi Kivity wrote:
>> On 02/24/2012 08:41 AM, Stefan Hajnoczi wrote:
>>>> I dont think that it is cpu intense. All user pages are zeroed
>>>> anyway, but at allocation time it shouldnt be a big difference in
>>>> terms of cpu power.
>>> It's easy to find a scenario where eagerly zeroing pages is wasteful.
>>> Imagine a process that uses all of physical memory. Once it
>>> terminates the system is going to run processes that only use a small
>>> set of pages. It's pointless zeroing all those pages if we're not
>>> going to use them anymore.
>> In the long term, we will use them, except if the guest is completely
>> idle.
>>
>> The scenario in which zeroing is expensive is when the page is refilled
>> through DMA. In that case the zeroing was wasted. This is a pretty
>> common scenario in pagecache intensive workloads.
>>
> Avi, what do you think of the proposal to give the guest vm a hint
> that the host is running ksm? In that case the administrator
> has already chosen that saving physical memory is more important
> than performance to him?
It makes some sense. Perhaps through the balloon device, a flag that
indicates that voluntary ballooning will be gratefully accepted.
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2012-02-28 13:56 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-23 15:40 linux guests and ksm performance Peter Lieven
2012-02-23 15:40 ` [Qemu-devel] " Peter Lieven
2012-02-23 16:42 ` Stefan Hajnoczi
2012-02-23 16:42 ` [Qemu-devel] " Stefan Hajnoczi
2012-02-23 18:39 ` Javier Guerra Giraldez
2012-02-23 18:39 ` [Qemu-devel] " Javier Guerra Giraldez
2012-02-23 19:08 ` peter.lieven@gmail.com
2012-02-23 19:08 ` [Qemu-devel] " peter.lieven@gmail.com
2012-02-24 6:41 ` Stefan Hajnoczi
2012-02-24 6:41 ` [Qemu-devel] " Stefan Hajnoczi
2012-02-24 6:53 ` Stefan Hajnoczi
2012-02-24 6:53 ` [Qemu-devel] " Stefan Hajnoczi
2012-02-24 7:23 ` Stefan Hajnoczi
2012-02-24 7:23 ` [Qemu-devel] " Stefan Hajnoczi
2012-02-24 7:43 ` Peter Lieven
2012-02-24 7:43 ` [Qemu-devel] " Peter Lieven
2012-02-28 11:45 ` Peter Lieven
2012-02-28 11:46 ` Peter Lieven
2012-02-28 12:05 ` Stefan Hajnoczi
2012-02-28 12:16 ` Peter Lieven
2012-02-28 12:16 ` Peter Lieven
2012-02-28 13:16 ` Avi Kivity
2012-02-28 13:16 ` [Qemu-devel] " Avi Kivity
2012-02-28 13:20 ` Peter Lieven
2012-02-28 13:20 ` [Qemu-devel] " Peter Lieven
2012-02-28 13:56 ` Avi Kivity [this message]
2012-02-28 13:56 ` Avi Kivity
2012-02-24 7:04 ` Gleb Natapov
2012-02-24 7:04 ` [Qemu-devel] " Gleb Natapov
2012-02-28 13:14 ` Avi Kivity
2012-02-28 13:14 ` [Qemu-devel] " Avi Kivity
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=4F4CDD05.5030003@redhat.com \
--to=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=pl@dlh.net \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@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.