BLCKSZ fun facts - Mailing list pgsql-hackers

From Peter Eisentraut
Subject BLCKSZ fun facts
Date
Msg-id 200611281746.32245.peter_e@gmx.net
Whole thread Raw
Responses Re: BLCKSZ fun facts  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
The smallest BLCKSZ that you can compile is 256.  But ...

The smallest BLCKSZ that actually works is 1024, because of this code in 
guc.c:
   case GUC_UNIT_BLOCKS:       val /= (BLCKSZ / 1024);

Maybe it's worth adding an #error here to prevent smaller sizes being 
used?

The smallest BLCKSZ that passes the regression tests is 4096.  With 
smaller settings your get half a dozen ordering differences, which 
seems OK.

The shared memory configuration code in initdb doesn't know about 
BLCKSZ, so with smaller sizes you get less shared buffers.  Maybe that 
is worth fixing sometime.

Aside from that my pgbench testing clearly shows that block sizes larger 
than 2048 become progressively slower.  Go figure.

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/


pgsql-hackers by date:

Previous
From: Andrew Sullivan
Date:
Subject: Re: Configuring BLCKSZ and XLOGSEGSZ (in 8.3)
Next
From: Martijn van Oosterhout
Date:
Subject: Re: Short writes