X-Original-To: pgsql-admin@postgresql.org Received: from stine.vestdata.no (stine.vestdata.no [195.204.68.10]) by postgresql.org (Postfix) with ESMTP id 5462C474E53 for ; Mon, 17 Mar 2003 10:39:35 -0500 (EST) Received: (from ragnark@localhost) by stine.vestdata.no (8.11.6/8.11.6) id h2HFdV903688; Mon, 17 Mar 2003 16:39:31 +0100 Date: Mon, 17 Mar 2003 16:39:31 +0100 From: Ragnar =?iso-8859-15?Q?Kj=F8rstad?= To: Matt Clark Cc: Tom Lane , Peter Eisentraut , Murthy Kambhampaty , pgsql-admin@postgresql.org Subject: Re: LVM snapshots Message-ID: <20030317153931.GD23149@vestdata.no> References: <20030317152630.GB23149@vestdata.no> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.2i X-Archive-Number: 200303/264 X-Sequence-Number: 7904 On Mon, Mar 17, 2003 at 03:35:53PM -0000, Matt Clark wrote: > > 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 */ Ah, that explains it. Sorry for adding to the confusion. > Anyway, you definitely *don't* force LVM to copy 4MB of data the first time you touch just 1 bit on a snapshotted volume! Probably not. -- Ragnar Kjørstad Zet.no