From: Andre Przywara <andre.przywara@amd.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: "TOURNIER Frédéric" <f.tournier@iut.univ-paris8.fr>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: .img on nfs, relative on ram, consuming mass ram
Date: Thu, 16 Sep 2010 15:48:18 +0200 [thread overview]
Message-ID: <4C922022.50404@amd.com> (raw)
In-Reply-To: <AANLkTinh=ZX_yLwzUcNaTz3LLLFrY7f7DXCDTVk2gAoj@mail.gmail.com>
Stefan Hajnoczi wrote:
> 2010/9/16 Andre Przywara <andre.przywara@amd.com>:
>> TOURNIER Frédéric wrote:
>>> Ok, thanks for taking time.
>>> I'll dig into your answers.
>>>
>>> So as i run relative.img on diskless systems with original.img on nfs,
>>> what are the best practice/tips i can use ?
>> I thinks it is "-snapshot" you are looking for.
>> This will put the backing store into "normal" RAM, and you can later commit
>> it to the original image if needed. See the qemu manpage for more details.
>> In a nutshell you just specify the original image and add -snapshot to the
>> command line.
>
> -snapshot creates a temporary qcow2 image in /tmp whose backing file
> is your original image. I'm not sure what you mean by "This will put
> the backing store into "normal" RAM"?
Stefan, you are right. I never looked into the code and because the file
in /tmp is deleted just after creation there wasn't a sign of it.
For some reason I thought that the buffer would just be allocated in
memory. Sorry, my mistake and thanks for pointing this out.
So Fred, unfortunately this does not solve your problem. I guess you run
into a general problem. If the guest actually changes so much of the
disk that this cannot be backed by RAM in the host, you have lost.
One solution could be to just make (at least parts of) the disk
read-only (a write protected /usr partition works quite well).
If you are sure that writes are not that frequent, you could think of
putting the overlay file also on the remote storage (NFS). Although this
is rather slow, it shouldn't matter if there aren't many writes and the
local page cache should catch most of the accesses (while still being
nice to other RAM users).
Regards,
Andre.
>
> Stefan
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
Andre Przywara
AMD-Operating System Research Center (OSRC), Dresden, Germany
Tel: +49 351 448-3567-12
next prev parent reply other threads:[~2010-09-16 13:51 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-15 9:39 .img on nfs, relative on ram, consuming mass ram TOURNIER Frédéric
2010-09-16 9:09 ` Andre Przywara
2010-09-16 12:01 ` TOURNIER Frédéric
2010-09-16 12:03 ` Andre Przywara
2010-09-16 13:19 ` Stefan Hajnoczi
2010-09-16 13:48 ` Andre Przywara [this message]
2010-09-16 15:59 ` TOURNIER Frédéric
2010-09-20 13:30 ` TOURNIER Frédéric
2010-09-20 14:00 ` Andre Przywara
2010-09-20 15:34 ` TOURNIER Frédéric
2010-09-16 14:49 ` David S. Ahern
2011-09-19 12:12 ` Rickard Lundin
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=4C922022.50404@amd.com \
--to=andre.przywara@amd.com \
--cc=f.tournier@iut.univ-paris8.fr \
--cc=kvm@vger.kernel.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.