Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] BLCKSZ fun facts

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] BLCKSZ fun facts
Date: 2007-02-20 23:50:50
Message-ID: 200702202350.l1KNoo704993@momjian.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
I have implemented your ideas for checking BLCKSZ >= 1024, and having
initdb adjust shared buffers checks based on BLCKSZ.

Patch attached and applied.

---------------------------------------------------------------------------

Peter Eisentraut wrote:
> 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/
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
> 
>                http://www.postgresql.org/docs/faq

-- 
  Bruce Momjian  <bruce(at)momjian(dot)us>          http://momjian.us
  EnterpriseDB                               http://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

Attachment: /rtmp/diff
Description: text/x-diff (1.3 KB)

In response to

Responses

pgsql-hackers by date

Next:From: Nikolay SamokhvalovDate: 2007-02-20 23:59:03
Subject: --enable-xml instead of --with-libxml?
Previous:From: Jeremy DrakeDate: 2007-02-20 23:49:49
Subject: Re: [pgsql-patches] [HACKERS] less privileged pl install

pgsql-patches by date

Next:From: Nikolay SamokhvalovDate: 2007-02-20 23:59:03
Subject: --enable-xml instead of --with-libxml?
Previous:From: Jeremy DrakeDate: 2007-02-20 23:49:49
Subject: Re: [pgsql-patches] [HACKERS] less privileged pl install

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group