pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Greg Stark <gsstark@mit.edu>
To: Pierre C <lists@peufeu.com>
Cc: Alvaro Herrera <alvherre@commandprompt.com>
Cc: Dave Crooke <dcrooke@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Block at a time ...
Date: Wed, 17 Mar 2010 09:52:13 +0000
Message-ID: <407d949e1003170252y72d223c3kcc18266140a60997@mail.gmail.com> (raw)
In-Reply-To: <op.u9pa7vzleorkce@localhost>
References: <ca24673e1003161658g6a0fa30dg2c158db395ac08@mail.gmail.com>
	<20100317001405.GL3037@alvh.no-ip.org>
	<op.u9pa7vzleorkce@localhost>

On Wed, Mar 17, 2010 at 7:32 AM, Pierre C <lists@peufeu.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



view thread (14+ messages)  latest in thread

Message-ID: <407d949e1003170252y72d223c3kcc18266140a60997@mail.gmail.com>
Permalink:  ../407d949e1003170252y72d223c3kcc18266140a60997@mail.gmail.com/
Also on:    postgresql.org/message-id/407d949e1003170252y72d223c3kcc18266140a60997@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: gsstark@mit.edu, lists@peufeu.com, alvherre@commandprompt.com, dcrooke@gmail.com
  Subject: Re: Block at a time ...
  In-Reply-To: <407d949e1003170252y72d223c3kcc18266140a60997@mail.gmail.com>
  References: <ca24673e1003161658g6a0fa30dg2c158db395ac08@mail.gmail.com> <20100317001405.GL3037@alvh.no-ip.org> <op.u9pa7vzleorkce@localhost> <407d949e1003170252y72d223c3kcc18266140a60997@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox