X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 452BDD1BA21 for ; Sat, 30 Aug 2003 02:33:11 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 82197-04 for ; Fri, 29 Aug 2003 23:33:03 -0300 (ADT) Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251]) by svr1.postgresql.org (Postfix) with ESMTP id 83C0AD1B8EF for ; Fri, 29 Aug 2003 23:32:58 -0300 (ADT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.11.6) id h7U2WcS11913; Fri, 29 Aug 2003 22:32:38 -0400 (EDT) From: Bruce Momjian Message-Id: <200308300232.h7U2WcS11913@candle.pha.pa.us> Subject: Re: The results of my PostgreSQL/filesystem performance tests In-Reply-To: <082e01c36dd1$3bf1f150$2800a8c0@mars> To: Christopher Kings-Lynne Date: Fri, 29 Aug 2003 22:32:38 -0400 (EDT) Cc: Sean Chittenden , Bill Moran , pgsql-performance@postgresql.org X-Mailer: ELM [version 2.4ME+ PL106 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/515 X-Sequence-Number: 3331 Christopher Kings-Lynne wrote: > > I'm likely going to make this the default for PostgreSQL on FreeBSD > > starting with 7.4 (just posted something to -hackers about this)f. If > > you'd like to do this in your testing, just apply the following patch. > > > > Right now PostgreSQL defaults to 8K blocks, but FreeBSD uses 16K > > blocks which means that currently, reading two blocks of data in PG is > > two read calls to the OS, one reads 16K of data off disk and returns > > the 1st page, the 2nd call pulls the 2nd block from the FS cache. In > > making things 16K, it avoids the need for the 2nd system call which is > > where the performance difference is coming from, afaikt. -sc > > Are you _sure_ this won't cause any atomicity problems? Can FreeBSD write > 16k as an atomic unit? We pre-modified page images to WAL before modifying the page. The disks are only 512-byte blocks, so we don't rely on file system atomicity anymore anyway. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073