All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kaveh Razavi <kaveh@cs.vu.nl>
To: Alex Bligh <alex@alex.org.uk>
Cc: Kevin Wolf <kwolf@redhat.com>,
	qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] Introduce cache images for the QCOW2 format
Date: Wed, 14 Aug 2013 15:43:10 +0200	[thread overview]
Message-ID: <520B896E.8050704@cs.vu.nl> (raw)
In-Reply-To: <74C74303-33D3-4E60-B999-5F96AEEFEB6F@alex.org.uk>

On 08/14/2013 02:02 PM, Alex Bligh wrote:
>> > Not really. I meant different backing images, and not necessarily
>> > booting on the same host.
> So how does your cache solve the problem you mentioned in that
> para?
> 

If you have a fast network (think 10GbE), then qcow2 can easily boot
many VMs over many hosts from a single backing file without any
additional delay. If you don't, then you should do some sort of caching,
so that subsequent boots over many hosts do not hit the network again.

Regardless of the network, in a multi-user scenario, booting many VMs
with different backing files (possibly on different hosts) easily
creates a bottleneck at the storage device (i.e. disk) that hosts the
backing images due to random reads. Considering this, you would like to
keep cache images either on the VM hosts (in case of a slow network), or
on a tmpfs (in case of a fast network). In both cases, the small size of
the cache images help.

We have done a number of benchmarks when scaling to many hosts and I
just told you some of the results. If you want to know more, please
follow the link I sent earlier to a paper that we recently published on
the topic.

>> > This is essentially the same as what Eric mentioned in his email. As
>> > long as only one VM writes to the image and it is not simultaneously
>> > used by other VMs this should not happen.
> Correct. So you need one cache file per VM, not one per image.
> 

No, once the read-only cache is created, it can be used by different VMs
on the same host. But yes, it first needs to be created.

> Correct. So the patch would only speed up the first reboot of
> a VM that has already been booted on that node (as you have one
> cache file per VM). However, when the second VM boots with the
> same image, rather than the pages being hot in the page cache,
> it will be loading them from whatever device the cache is on
> (as per the above, we need one cache per VM), and whatever that
> is, it won't be faster than RAM.
> 
> So I fail to see how this speeds things up. Do you have measured
> numbers?

We did measure when the cache is either on memory/disk of the host or
when it is accessed over NFS (rwsize 64KB) and stored on remote
memory/disk. With a CentOS default installation, they all were booting
within 1% of each other. The idea behind this patch is not to make
booting faster, but to provide a mechanism to avoid scalability
bottlenecks that booting VMs (over many hosts) can create.

Kaveh

  reply	other threads:[~2013-08-14 13:43 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-13 17:03 [Qemu-devel] [PATCH] Introduce cache images for the QCOW2 format Kaveh Razavi
2013-08-13 21:37 ` Eric Blake
2013-08-14 11:13   ` Kaveh Razavi
2013-08-13 22:53 ` Alex Bligh
2013-08-14 11:28   ` Kaveh Razavi
2013-08-14 11:52     ` Fam Zheng
2013-08-14 12:03       ` Alex Bligh
2013-08-14 15:58         ` Richard W.M. Jones
2013-08-15  0:53         ` Fam Zheng
2013-08-15  5:51           ` Alex Bligh
2013-08-14 11:57     ` Alex Bligh
2013-08-14 13:37       ` Kaveh Razavi
2013-08-13 23:16 ` Alex Bligh
2013-08-14 11:42   ` Kaveh Razavi
2013-08-14 12:02     ` Alex Bligh
2013-08-14 13:43       ` Kaveh Razavi [this message]
2013-08-14 13:50         ` Alex Bligh
2013-08-14 14:26           ` Kaveh Razavi
2013-08-14 15:02             ` Alex Bligh
2013-08-14 15:32             ` Kevin Wolf
2013-08-15  7:50               ` Wenchao Xia
2013-08-15  8:11               ` Stefan Hajnoczi
2013-08-14  9:29 ` Stefan Hajnoczi
2013-08-14 14:20   ` Kaveh Razavi
2013-08-15  8:32     ` Stefan Hajnoczi
2013-08-15 12:25       ` Kaveh Razavi

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=520B896E.8050704@cs.vu.nl \
    --to=kaveh@cs.vu.nl \
    --cc=alex@alex.org.uk \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.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.