Unix Technical Forum

Re: [HACKERS] BLCKSZ fun facts

This is a discussion on Re: [HACKERS] BLCKSZ fun facts within the Pgsql Patches forums, part of the PostgreSQL category; --> I have implemented your ideas for checking BLCKSZ >= 1024, and having initdb adjust shared buffers checks based on ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql Patches

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-18-2008, 10:35 AM
Bruce Momjian
 
Posts: n/a
Default Re: [HACKERS] BLCKSZ fun facts


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@momjian.us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com

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


---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-18-2008, 10:35 AM
Peter Eisentraut
 
Posts: n/a
Default Re: [HACKERS] BLCKSZ fun facts

Bruce Momjian wrote:
> I have implemented your ideas for checking BLCKSZ >= 1024,


I think the check should be were the issue arises, not in some distant
file without explanation.

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

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-18-2008, 10:36 AM
Bruce Momjian
 
Posts: n/a
Default Re: [HACKERS] BLCKSZ fun facts

Peter Eisentraut wrote:
> Bruce Momjian wrote:
> > I have implemented your ideas for checking BLCKSZ >= 1024,

>
> I think the check should be were the issue arises, not in some distant
> file without explanation.


OK, moved to guc.c.
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com

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

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:29 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com