WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] Xen, LVM and snapshots

To: Tomasz Chmielewski <mangoo@xxxxxxxx>
Subject: Re: [Xen-users] Xen, LVM and snapshots
From: "Morten W. Petersen" <morten@xxxxxxxxxxxxxx>
Date: Tue, 14 Oct 2008 22:47:45 +0200
Cc: Ferenc Wagner <wferi@xxxxxxx>, xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 14 Oct 2008 13:48:41 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <48F4F5C0.20705@xxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <48F4D377.1060503@xxxxxxxxxxxxxx> <87skqzrodr.fsf@xxxxxxxxxxxxx> <48F4F5C0.20705@xxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.17 (X11/20080925)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tomasz Chmielewski wrote:
> Ferenc Wagner schrieb:
> 
> (...)
> 
>>> I saw an old message from 2006 on this list, where it is said that
>>> "Common understanding is that LVM2 snapshots are unstable".
>>
>> I don't understand this statement.
> 
> Anything older than 2.6.18 (so, including 2.6.18) will use lots of
> memory for a snapshot. This means, you won't be able to do more than a
> handful of snapshots even on a system with lots of free memory (you may
> expect trouble i.e. you have 512 MB RAM, only 30 MB used, and want to do
> 10-20 snapshots).
> 
> You have 400 MB memory left, did 30 snapshots, and it still works for
> you? You may reconsider - when they fill, (kernel) memory usage will
> rise, until your machine is unresponsive. As it's kernel memory being
> used, oom-killer won't help much here; bigger swap won't help either,
> because real RAM is needed.
> 
> 
> To make the things worse, you will probably be unable to boot the
> machine again. As the system starts, LVM volumes are detected, memory is
> full again... You're out of luck, unable to even remove the snapshots in
> order to boot properly, unless you have some more RAM sticks at hand to
> fix the problem.
> 
> 
> Coincidentally, 2.6.18 kernel is the one Xen is based on (at least
> dom0), so if you want your Xen server to be a storage server at the same
> time, you might run into problems as your system grows.
> Some major distributions base on this kernel as well (i.e., Debian Etch).

Right.  :)

> A workaround might be:
> - using bigger stripes with LVM (it should take less memory)
> - use a newer kernel - as a rule of thumb - the newer, the better -
> might be problematic with Xen dom0,
> - have storage on a separate machine (i.e., iSCSI SAN) with a newer
> kernel than your Xen dom0 machine
> 
> 
> Newer kernels (2.6.20, maybe even 2.6.19, and later) are not affected by
> this "phenomenon".
> 
> Another LVM disadvantage is that every snapshot means additional writes.
> I.e. if you have a logical volume, and 4 snapshots, writing to the
> origin will mean 4 more writes are needed. This is a serious scalability
> problem.

Well, what I was thinking, was to do a sync on the VM, and flush the
MySQL database and then immediately afterwards, taking a snapshot of the
system, backup that snapshot and then after backup "releasing"
(deleting) the snapshot.

We're stuck with .18 for now, as that's what Debian comes with and we
try to stick with off-the-shelf packages.

Do you think that's feasible?

- -Morten
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFI9QVxmq0JiiIWC2oRAg8DAJ48kRkq1NHVOfEPg5UIh5Pc1jRgCwCgxfcD
v97XYGPHBPGJk3FdqSDVszY=
=dpsD
-----END PGP SIGNATURE-----

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users