Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 2DCD1133798E for ; Fri, 19 Nov 2010 16:43:10 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 10601-04 for ; Fri, 19 Nov 2010 20:43:02 +0000 (UTC) X-Greylist: delayed 01:00:15.588439 by SQLgrey-1.7.6 Received: from mail-gw0-f46.google.com (mail-gw0-f46.google.com [74.125.83.46]) by mail.postgresql.org (Postfix) with ESMTP id 0CBF01337B5B for ; Fri, 19 Nov 2010 16:43:01 -0400 (AST) Received: by gwb20 with SMTP id 20so260950gwb.19 for ; Fri, 19 Nov 2010 12:43:01 -0800 (PST) Received: by 10.150.203.1 with SMTP id a1mr4101549ybg.94.1290195764802; Fri, 19 Nov 2010 11:42:44 -0800 (PST) Received: from [192.168.1.102] (shield1.sb.becknet.com [206.83.1.2]) by mx.google.com with ESMTPS id v6sm1258945yhg.33.2010.11.19.11.42.42 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 19 Nov 2010 11:42:43 -0800 (PST) Message-ID: <4CE6D334.6080005@logicmonitor.com> Date: Fri, 19 Nov 2010 11:42:44 -0800 From: Steve Francis User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.12) Gecko/20101027 Lightning/1.0b2 Thunderbird/3.1.6 MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: Re: Pre-Allocate tablespace on disk References: <9CB65F11-6FA4-48D5-BCC5-B3F694659965@ruprecht.org> <82zkt55ux4.fsf@mid.bfk.de> In-Reply-To: <82zkt55ux4.fsf@mid.bfk.de> X-Enigmail-Version: 1.1.1 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.176 tagged_above=-10 required=5 tests=BAYES_00=-1.9, HTML_MESSAGE=0.001, MIME_HTML_ONLY=0.723, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201011/154 X-Sequence-Number: 36120 Not only that, but if your "disk" is really a bunch of disks behind a hardware RAID controller, or SAN, or iSCSI or NFS server - what is contiguous for the OS may not be contiguous on the physical drives (and vice versa).
Which is why performance can (but may not) improve if you disable linux kernel IO schedulers that attempt to optimize blocks to be sequential.



On 11/19/2010 5:01 AM, Florian Weimer wrote:
* Chris Ruprecht:

Other database that I have worked with before and that I'm still
working with, allow you to pre-allocate disk space so you get huge
chunks of contiguous space at one, which has major impacts on
database performance.
PostgreSQL's write patterns do not trigger significant fragmentation
with most file systems, even when other database systems (Oracle
Berkeley DB comes to my mind) would create heavily fragmented files.



--
 Steve Francis
LogicMonitor LLC



sfrancis@logicmonitor.com
www.logicmonitor.com

Ph: 1 888 41 LOGIC x500
Ph: 1 805 698 0770