From owner-freebsd-fs@FreeBSD.ORG Tue Aug 26 23:06:47 2003 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4C2CB16A4BF; Tue, 26 Aug 2003 23:06:47 -0700 (PDT) Received: from HAL9000.homeunix.com (12-233-57-131.client.attbi.com [12.233.57.131]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8600D43FF3; Tue, 26 Aug 2003 23:06:46 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Received: from HAL9000.homeunix.com (localhost [127.0.0.1]) by HAL9000.homeunix.com (8.12.9/8.12.9) with ESMTP id h7R66iXR030383; Tue, 26 Aug 2003 23:06:44 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by HAL9000.homeunix.com (8.12.9/8.12.9/Submit) id h7R66i7k030382; Tue, 26 Aug 2003 23:06:44 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Date: Tue, 26 Aug 2003 23:06:44 -0700 From: David Schultz To: Bill Moran Message-ID: <20030827060644.GA9321@HAL9000.homeunix.com> Mail-Followup-To: Bill Moran , freebsd-fs@freebsd.org, freebsd-performance@freebsd.org References: <3F4C143D.7000909@potentialtech.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3F4C143D.7000909@potentialtech.com> cc: freebsd-fs@FreeBSD.ORG cc: freebsd-performance@FreeBSD.ORG Subject: Re: Performance tests I did with FreeBSD, Linux and PostgreSQL X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Aug 2003 06:06:47 -0000 On Tue, Aug 26, 2003, Bill Moran wrote: > Like all benchmarks, I doubt these are perfect (or even close) examples > of real-world use. > > However, in the hopes that they will be useful for improving FreeBSD, I > present them to the community. > > http://www.potentialtech.com/wmoran/postgresql.php > > Intelligent comments are welcome. Well, a little trussing revealed that pgsql uses a block size of 8K, which can be a significant pessimization when the filesystem block size is 16K, which is the default in FreeBSD! ext2fs uses 4K blocks and reiserfs uses extents, so those filesystems would not suffer from that problem. You might consider trying your test on a UFS filesystem with 8K blocks, or you could tune pgsql to use a different block size. (For pgsql, I think the appropriate tunable is BLCKSZ in include/pg_config.h. You'll have to recompile it and create a new database.) I used to think that the lack of fdatasync() in FreeBSD would significantly pessimize databases such as pgsql, but after running your script, I discovered that the fsync() overhead was only about 1% of the total execution time. Maybe that would be more significant if you tried to execute lots of little transactions, rather than a few large ones. That kind of workload is probably more common these days anyway. As previously mentioned, it would also be interesting to see what you get out of FreeBSD 4.8+softupdates, just in case the performance problems you're seeing are a result of known (or unknown) regressions in 5.X. You might also consider running your results by the pgsql people, since they understand how the database works. ;-)