Re: [Qemu-devel] linux guests and ksm performance

2012-02-28 Thread Avi Kivity
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.

Re: [Qemu-devel] linux guests and ksm performance

2012-02-28 Thread Peter Lieven
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

Re: [Qemu-devel] linux guests and ksm performance

2012-02-28 Thread Avi Kivity
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 proc

Re: [Qemu-devel] linux guests and ksm performance

2012-02-28 Thread Avi Kivity
On 02/23/2012 06:42 PM, Stefan Hajnoczi wrote: > On Thu, Feb 23, 2012 at 3:40 PM, Peter Lieven wrote: > > However, in a virtual machine I have not observed the above slow down to > > that extend > > while the benefit of zero after free in a virtualisation environment is > > obvious: > > > > 1) zer

Re: [Qemu-devel] linux guests and ksm performance

2012-02-28 Thread Peter Lieven
On 28.02.2012 13:05, Stefan Hajnoczi wrote: On Tue, Feb 28, 2012 at 11:46 AM, Peter Lieven wrote: On 24.02.2012 08:23, Stefan Hajnoczi wrote: On Fri, Feb 24, 2012 at 6:53 AM, Stefan Hajnoczi wrote: On Fri, Feb 24, 2012 at 6:41 AM, Stefan Hajnoczi wrote: On Thu, Feb 23, 2012 at 7:08 PM, p

Re: [Qemu-devel] linux guests and ksm performance

2012-02-28 Thread Peter Lieven
On 24.02.2012 08:23, Stefan Hajnoczi wrote: On Fri, Feb 24, 2012 at 6:53 AM, Stefan Hajnoczi wrote: On Fri, Feb 24, 2012 at 6:41 AM, Stefan Hajnoczi wrote: On Thu, Feb 23, 2012 at 7:08 PM, peter.lie...@gmail.com wrote: Stefan Hajnoczi schrieb: On Thu, Feb 23, 2012 at 3:40 PM, Peter Lieve

Re: [Qemu-devel] linux guests and ksm performance

2012-02-23 Thread Peter Lieven
Am 24.02.2012 um 08:23 schrieb Stefan Hajnoczi: > On Fri, Feb 24, 2012 at 6:53 AM, Stefan Hajnoczi wrote: >> On Fri, Feb 24, 2012 at 6:41 AM, Stefan Hajnoczi wrote: >>> On Thu, Feb 23, 2012 at 7:08 PM, peter.lie...@gmail.com >>> wrote: Stefan Hajnoczi schrieb: > On Thu, Feb 23

Re: [Qemu-devel] linux guests and ksm performance

2012-02-23 Thread Stefan Hajnoczi
On Fri, Feb 24, 2012 at 6:53 AM, Stefan Hajnoczi wrote: > On Fri, Feb 24, 2012 at 6:41 AM, Stefan Hajnoczi wrote: >> On Thu, Feb 23, 2012 at 7:08 PM, peter.lie...@gmail.com wrote: >>> Stefan Hajnoczi schrieb: >>> On Thu, Feb 23, 2012 at 3:40 PM, Peter Lieven wrote: > However, in a virt

Re: [Qemu-devel] linux guests and ksm performance

2012-02-23 Thread Gleb Natapov
On Thu, Feb 23, 2012 at 04:42:54PM +, Stefan Hajnoczi wrote: > On Thu, Feb 23, 2012 at 3:40 PM, Peter Lieven wrote: > > However, in a virtual machine I have not observed the above slow down to > > that extend > > while the benefit of zero after free in a virtualisation environment is > > obvio

Re: [Qemu-devel] linux guests and ksm performance

2012-02-23 Thread Stefan Hajnoczi
On Fri, Feb 24, 2012 at 6:41 AM, Stefan Hajnoczi wrote: > On Thu, Feb 23, 2012 at 7:08 PM, peter.lie...@gmail.com wrote: >> >> >> >> >> Stefan Hajnoczi schrieb: >> >>>On Thu, Feb 23, 2012 at 3:40 PM, Peter Lieven wrote: However, in a virtual machine I have not observed the above slow down

Re: [Qemu-devel] linux guests and ksm performance

2012-02-23 Thread Stefan Hajnoczi
On Thu, Feb 23, 2012 at 7:08 PM, peter.lie...@gmail.com wrote: > > > > > Stefan Hajnoczi schrieb: > >>On Thu, Feb 23, 2012 at 3:40 PM, Peter Lieven wrote: >>> However, in a virtual machine I have not observed the above slow down >>to >>> that extend >>> while the benefit of zero after free in a

Re: [Qemu-devel] linux guests and ksm performance

2012-02-23 Thread peter.lie...@gmail.com
Stefan Hajnoczi schrieb: >On Thu, Feb 23, 2012 at 3:40 PM, Peter Lieven wrote: >> However, in a virtual machine I have not observed the above slow down >to >> that extend >> while the benefit of zero after free in a virtualisation environment >is >> obvious: >> >> 1) zero pages can easily be

Re: [Qemu-devel] linux guests and ksm performance

2012-02-23 Thread Javier Guerra Giraldez
On Thu, Feb 23, 2012 at 11:42 AM, Stefan Hajnoczi wrote: > The other approach is a memory page "discard" mechanism - which > obviously requires more code changes than zeroing freed pages. > > The advantage is that we don't take the brute-force and CPU intensive > approach of zeroing pages.  It wou

Re: [Qemu-devel] linux guests and ksm performance

2012-02-23 Thread Stefan Hajnoczi
On Thu, Feb 23, 2012 at 3:40 PM, Peter Lieven wrote: > However, in a virtual machine I have not observed the above slow down to > that extend > while the benefit of zero after free in a virtualisation environment is > obvious: > > 1) zero pages can easily be merged by ksm or other technique. > 2)