X-Original-To: pgsql-admin@postgresql.org Received: from biscay.ymogen.com (biscay.ymogen.net [194.164.6.62]) by postgresql.org (Postfix) with SMTP id AD465475FC6 for ; Mon, 17 Mar 2003 10:35:54 -0500 (EST) Received: (qmail 6175 invoked from network); 17 Mar 2003 15:35:58 -0000 Received: from unknown (HELO solent) (mailuser@213.165.136.12) by 0 with SMTP; 17 Mar 2003 15:35:58 -0000 From: "Matt Clark" To: =?ISO-8859-15?Q?Ragnar_Kj=F8rstad?= , "Tom Lane" Cc: "Peter Eisentraut" , "Murthy Kambhampaty" , Subject: Re: LVM snapshots Date: Mon, 17 Mar 2003 15:35:53 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 In-Reply-To: <20030317152630.GB23149@vestdata.no> X-Archive-Number: 200303/262 X-Sequence-Number: 7902 > 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!