Re: Block at a time ...

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Pierre C <lists(at)peufeu(dot)com>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Dave Crooke <dcrooke(at)gmail(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Block at a time ...
Date: 2010-03-17 09:52:13
Message-ID: 407d949e1003170252y72d223c3kcc18266140a60997@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Wed, Mar 17, 2010 at 7:32 AM, Pierre C <lists(at)peufeu(dot)com> 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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Greg Smith 2010-03-17 10:11:29 Re: Building multiple indexes concurrently
Previous Message Yeb Havinga 2010-03-17 09:26:14 Re: GiST index performance