Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 4347C79930C for ; Wed, 17 Mar 2010 06:52:45 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 77405-07 for ; Wed, 17 Mar 2010 09:52:34 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-px0-f197.google.com (mail-px0-f197.google.com [209.85.216.197]) by mail.postgresql.org (Postfix) with ESMTP id ACF61798DD1 for ; Wed, 17 Mar 2010 06:52:34 -0300 (ADT) Received: by pxi35 with SMTP id 35so575184pxi.19 for ; Wed, 17 Mar 2010 02:52:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to:cc :content-type; bh=UoGz6190EiFvzWky2WCZWuGmJSDul26q2Emhj8IYF2I=; b=ht1okuGpcGG0B66KKP5FzV4yEOI4Clf2+o+VKQjRlVMYhdPCxD9uXk3cgpzE2y0zLi c6pdiB6e3DzbsfbG0gxUJjH6PXsG6RF9OBVt1gW5xNCuNXV+1JPQMlkmqiT8K6Y+6JsH LIWfGDzl6R2ZAJq0K9x1y5twtISKIPiEjE8co= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; b=oYzPY/piwKQ8wEnl65uwQeyNYSTsRgTN8fsbUa0id/8pxyT2MMgH2LTsx82WwINHkG pD/UW6tsfPf6SVKIRl76nyFMoFTDXeQWP06OhZ30Wksaxhnw0Dk+hxLWmcOq9UnMVRDo SZdz4SZ4nAfXMBoiVVk1RXB65G4Ru/MZCUwdU= MIME-Version: 1.0 Received: by 10.141.101.17 with SMTP id d17mr478460rvm.219.1268819553078; Wed, 17 Mar 2010 02:52:33 -0700 (PDT) In-Reply-To: References: <20100317001405.GL3037@alvh.no-ip.org> From: Greg Stark Date: Wed, 17 Mar 2010 09:52:13 +0000 X-Google-Sender-Auth: c9e7145436eaa850 Message-ID: <407d949e1003170252y72d223c3kcc18266140a60997@mail.gmail.com> Subject: Re: Block at a time ... To: Pierre C Cc: Alvaro Herrera , Dave Crooke , pgsql-performance@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201003/191 X-Sequence-Number: 38016 On Wed, Mar 17, 2010 at 7:32 AM, Pierre C wrote: >> I was thinking in something like that, except that the factor I'd use >> would be something like 50% or 100% of current size, capped at (say) 1 GB. This turns out to be a bad idea. One of the first thing Oracle DBAs are told to do is change this default setting to allocate some reasonably large fixed size rather than scaling upwards. This might be mostly due to Oracle's extent-based space management but I'm not so sure. Recall that the filesystem is probably doing some rounding itself. If you allocate 120kB it's probably allocating 128kB itself anyways. Having two layers rounding up will result in odd behaviour. In any case I was planning on doing this a while back. Then I ran some experiments and couldn't actually demonstrate any problem. ext2 seems to do a perfectly reasonable job of avoiding this problem. All the files were mostly large contiguous blocks after running some tests -- IIRC running pgbench. > Using fallocate() ? I think we need posix_fallocate(). -- greg