Обсуждение: Performance block size.

Поиск
Список
Период
Сортировка

Performance block size.

От
Tory M Blue
Дата:
Working on some optimization as well as finally getting off my
backside and moving us to 64bit (32gb+memory).

I was reading and at some point it appears on freeBSD  the Postgres
block size was upped to 16kb, from 8kb. And on my fedora systems I
believe the default build is 8kb.

When we were using ext2/ext3 etc made not much of a difference as far
as I can tell since one was limited to 4kb at the file system (so 2
disk access for every Postgres write/read ??).

Now with ext4, we can set the block size, so would it make sense for
larger data sets, that end up loading the entire 5 million row table
into memory, to have a larger block size, or matching block size
between postgres and the filesystem (given that raid is configured to
optimize the writes over all the spindles in your storage?) (leaving
that piece alone).

I want to focus on the relation of Postgres default block size, and
what the various issues/gains are with upping it , at the same time
matching or doing some storage magic to figure out the optimum between
Postgres/filesystem?

Trying to gain some performance and wondered if any of this tuning
even is something I should bother with.

Fedora f12 (looking at CentOS)
postgres 8.4.4 (probably time to start getting to 9.x)
slon 1.2.20 (same, needs an update)

But system tuning, 64 bit first..

Thanks
Tory

Re: Performance block size.

От
Ivan Voras
Дата:
On 27/05/2011 00:34, Tory M Blue wrote:
> Working on some optimization as well as finally getting off my
> backside and moving us to 64bit (32gb+memory).
>
> I was reading and at some point it appears on freeBSD  the Postgres
> block size was upped to 16kb, from 8kb. And on my fedora systems I
> believe the default build is 8kb.

This happened some years ago but it was quickly reverted.

There were some apparent gains with the larger block size, especially
since FreeBSD's UFS uses 16 KiB blocks by default (going to 32 KiB
really soon now; note that this has no impact on small files because of
the concept of "block fragments"), but it was concluded that the stock
installation should follow the defaults set by the developers, not
porters. YMMV.

> Trying to gain some performance and wondered if any of this tuning
> even is something I should bother with.

Please do some benchmarks and report results.