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
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-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 Content-Type Size
/rtmp/diff text/x-diff 1.3 KB

In response to

Responses

Browse pgsql-hackers by date

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

Browse pgsql-patches by date

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