Re: Separate BLCKSZ for data and logging

From: "Qingqing Zhou" <zhouqq(at)cs(dot)toronto(dot)edu>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Separate BLCKSZ for data and logging
Date: 2006-03-17 01:51:21
Message-ID: dvd4ss$82m$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


"Simon Riggs" <simon(at)2ndquadrant(dot)com> wrote
>
> I think Tom's right... the OS blocksize is smaller than BLCKSZ, so
> reducing the size might help with a very high transaction load when
> commits are required very frequently. At checkpoint it sounds like we
> might benefit from a large WAL blocksize because of all the additional
> blocks written, but we often write more than one block at a time anyway,
> and that still translates to multiple OS blocks whichever way you cut
> it, so I'm not convinced yet.
>

As I observed from other database system, they really did something like
this. You can see the disk write sequence is something like this:

512
512
2048
4196
32768
512
...

That is, the xlog write bytes will always align to the disk sector size
(required by O_DIRECT), and try to write out as much as possible (but within
a upper bound like 32768 I guess). As I understand, this change would not
take too much trouble, maybe a local change in XlogWrite() is enough.

Regards,
Qingqing

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-03-17 05:27:05 Re: qsort, once again
Previous Message William ZHANG 2006-03-17 01:33:03 Re: Bug report form: locale/encoding