Re: Pre-allocate space in advance

From: "Tomeh, Husam" <htomeh(at)firstam(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Scott Marlowe" <smarlowe(at)g2switchworks(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Pre-allocate space in advance
Date: 2005-11-01 17:17:46
Message-ID: C45835824D00A844BBD0F032D5CDED9202D55559@pisgana01sxch01.ana.firstamdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin


I don't have any numbers; and it may be an misconception as you pointed
out that's out there among Oracle DBAs that need to be re-visited again.

Tom, could you also explain what you meant in a previous post I found
during my research on this issue, which I may have misunderstood it: "I
actually wish that Postgres would preallocate a lot of blocks in advance
(ie. 100 x 8KB). That would probably improve performance, as it would
not have to keep re-extending the file."

http://archives.postgresql.org/pgsql-interfaces/2001-01/msg00153.php

Thanks,

--
Husam

-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
Sent: Monday, October 31, 2005 7:59 PM
To: Scott Marlowe
Cc: Tomeh, Husam; pgsql-admin(at)postgresql(dot)org
Subject: Re: [ADMIN] Vacuum Verbose output

Scott Marlowe <smarlowe(at)g2switchworks(dot)com> writes:
> On Mon, 2005-10-31 at 16:34, Tomeh, Husam wrote:
>> Pre-allocating space will prevent extending the datafile during
>> loading massive data (batch processing) and would improve the overall
>> batch write performance.

> Have you got any file system benchmarks that back up this assertion?
I
> would love to see something that shows one way or the other if that
> really makes any difference.

Barring some pretty solid evidence, you're unlikely to attract any
enthusiasm among pghackers for this sort of thing. We are generally
disinclined to reinvent functionality that properly belongs to the
kernel or filesystem layer. "Oracle does it" cuts no ice in this
connection, because Oracle is designed around a twenty-year-old
assumption that the database is smarter than the kernel, and the world
has changed a lot since then.

In short: show us some numbers that prove this is worth our attention.

regards, tom lane

**********************************************************************
This message contains confidential information intended only for the
use of the addressee(s) named above and may contain information that
is legally privileged. If you are not the addressee, or the person
responsible for delivering it to the addressee, you are hereby
notified that reading, disseminating, distributing or copying this
message is strictly prohibited. If you have received this message by
mistake, please immediately notify us by replying to the message and
delete the original message immediately thereafter.

Thank you. FADLD Tag
**********************************************************************

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Scott Marlowe 2005-11-01 17:25:06 Re: Pre-allocate space in advance
Previous Message Jim C. Nasby 2005-11-01 15:02:20 Re: Pre-allocate space in advance