Re: LVM snapshots

From: "Matt Clark" <matt(at)ymogen(dot)net>
To: Ragnar Kjørstad <postgres(at)ragnark(dot)vestdata(dot)no>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Peter Eisentraut" <peter_e(at)gmx(dot)net>, "Murthy Kambhampaty" <murthy(dot)kambhampaty(at)goeci(dot)com>, <pgsql-admin(at)postgresql(dot)org>
Subject: Re: LVM snapshots
Date: 2003-03-17 15:35:53
Message-ID: OAEAKHEHCMLBLIDGAFELOEDLDBAA.matt@ymogen.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

> LVM-blocksizes are relatively large, 4 MB pr default, and for large
> volumes it's common to use even bigger blocks (say 128 MB). For a 2TB
> volume and 128 MB blocks the datastructure should take 32KB memory.

4MB is the size of a physical extent, not a block. Snapshots use 'chunks' not whole extents, and I don't know what (if any)
relationship there is between chunks and blocks.

#define LVM_SNAPSHOT_MAX_CHUNK 1024 /* 1024 KB */
#define LVM_SNAPSHOT_DEF_CHUNK 64 /* 64 KB */
#define LVM_SNAPSHOT_MIN_CHUNK (PAGE_SIZE/1024) /* 4 or 8 KB */

Anyway, you definitely *don't* force LVM to copy 4MB of data the first time you touch just 1 bit on a snapshotted volume!

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Ragnar Kjørstad 2003-03-17 15:39:31 Re: LVM snapshots
Previous Message Andreas Schmitz 2003-03-17 15:35:52 select database_size (another one)