Re: The results of my PostgreSQL/filesystem performance tests - Mailing list pgsql-performance

From Sean Chittenden
Subject Re: The results of my PostgreSQL/filesystem performance tests
Date
Msg-id 20030828193123.GI83317@perrin.nxad.com
Whole thread Raw
In response to Re: The results of my PostgreSQL/filesystem performance  (Bill Moran <wmoran@potentialtech.com>)
List 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

pgsql-performance by date:

Previous
From: teknokrat
Date:
Subject: Re: performance of foreign key constraints
Next
From: Vivek Khera
Date:
Subject: opinion on RAID choice