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 ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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 |
| |||
| 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 |
| ||||
| 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 |