Re: Block size: 8K or 16K?

From: Curt Sampson <cjs(at)cynic(dot)net>
To: mlw <markw(at)mohawksoft(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Block size: 8K or 16K?
Date: 2002-04-26 05:09:23
Message-ID: Pine.NEB.4.43.0204261404080.1733-100000@angelic.cynic.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 25 Apr 2002, mlw wrote:

> ...but my gut tells me that using 16K blocks will increase performance
> over 8K. Aleady I have seen a sequential scan of a large table go from 20
> seconds using 8K to 17.3 seconds using 16K.

You should be able to get the same performance increase with 8K
blocks by reading two blocks at a time while doing sequential scans.
That's why I've been promoting this idea of changing postgres to
do its own read-ahead.

Of course, Bruce might be right that the OS read-ahead may take
care of this anyway, but then why would switching to 16K blocks
improve sequential scans? Possibly because I'm missing something here.

Anyway, we now know how to test the change, should someone do it:
compare sequential scans with and without readahead on 8K blocks,
and then compare that against a server without readahead but with
block sizes the size of the readahead (64K, I propose--oh wait, we
can only do 32K....)

cjs
--
Curt Sampson <cjs(at)cynic(dot)net> +81 90 7737 2974 http://www.netbsd.org
Don't you know, in this new Dark Age, we're all light. --XTC

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2002-04-26 05:28:25 Re: Block size: 8K or 16K?
Previous Message Bruce Momjian 2002-04-26 04:43:48 Re: Vote totals for SET in aborted transaction