Re: The results of my PostgreSQL/filesystem performance tests

From: Sean Chittenden <sean(at)chittenden(dot)org>
To: Bill Moran <wmoran(at)potentialtech(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: The results of my PostgreSQL/filesystem performance tests
Date: 2003-08-28 19:31:23
Message-ID: 20030828193123.GI83317@perrin.nxad.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

> I need to step in and do 2 things:

Thanks for posting that. Let me know if you have any questions while
doing your testing. I've found that using 16K blocks on FreeBSD
results in about an 8% speedup in writes to the database, fwiw.

I'm likely going to make this the default for PostgreSQL on FreeBSD
starting with 7.4 (just posted something to -hackers about this)f. If
you'd like to do this in your testing, just apply the following patch.

Right now PostgreSQL defaults to 8K blocks, but FreeBSD uses 16K
blocks which means that currently, reading two blocks of data in PG is
two read calls to the OS, one reads 16K of data off disk and returns
the 1st page, the 2nd call pulls the 2nd block from the FS cache. In
making things 16K, it avoids the need for the 2nd system call which is
where the performance difference is coming from, afaikt. -sc

--
Sean Chittenden

Attachment Content-Type Size
patch text/plain 547 bytes

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Michael Guerin 2003-08-28 20:07:46 Re: Simple queries take forever to run
Previous Message teknokrat 2003-08-28 19:16:59 Re: performance of foreign key constraints