PostgreSQL block sizes: Getting started …

I have been wondering a while about the optimal block size in PostgreSQL. Usually the default value of 8kb has proven to be beneficial for most applications. However, after listening to some talk about MonetDB, I got interested in testing various workloads for different blocksizes – especially with blocksizes larger than PostgreSQL’s current maximum of 32k.
We came up with a prototype patch to support larger blocksizes for PostgreSQL, which can be downloaded from here: PATCH

Very large PostgreSQL blocks revisited

It has turned out to be pretty obvious that for a default workload as created by pgbench, larger blocks are not too beneficial. We did a test with typical block sizes of 2k, 4k, 8k, 18k and 1 MB. In all tests the results have been pretty much the same. The bottom line is: Supersize blocks are obviously never beneficial for the typical case.

The main interesting thing here is that using supersize blocks will basically destroy performance for a handful of reasons.NOTE: This is a standard OLTP test.

VN:F [1.9.22_1171]

please wait...

Rating: 3.9/5 (8 votes cast)

PostgreSQL block sizes: Getting started ..., 3.9 out of 5 based on 8 ratings

Hans-Juergen Schoenig

Hans-Jürgen Schönig has 15 years of experience with PostgreSQL. He is consultant and CEO of the company "Cybertec Schönig & Schönig GmbH" (www.postgresq-support.de), which has served countless customers around the globe.