Re: x206-x225

From: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
To: Richard Huxton <dev(at)archonet(dot)com>
Cc: David Lang <david(at)lang(dot)hm>, Joost Kraaijeveld <J(dot)Kraaijeveld(at)Askesis(dot)nl>, pgsql-performance(at)postgresql(dot)org
Subject: Re: x206-x225
Date: 2006-03-14 22:08:18
Message-ID: 20060314220817.GA45250@pervasive.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Tue, Mar 14, 2006 at 09:37:33PM +0000, Richard Huxton wrote:
> >But shouldn't it be possible to batch up WAL writes and syncs? In other
> >words, if you have 5 transactions that all COMMIT at exactly the same
> >time, it should be possible to get all 5 WAL pages (I'll assume each
> >one generated a small enough change so as not to require multiple WAL
> >pages) to the drive before the platter comes around to the right
> >position. The drive should then be able to write all 5 at once. At
> >least, theoretically...
>
> I think you mean this...
>
> http://www.postgresql.org/docs/8.1/static/runtime-config-wal.html
>
> commit_delay (integer)

No, that's not what I mean at all. On a system doing a large number of
WAL-generating transactions per second, it's certainly possible for
multiple transactions to commit in the period of time it takes for the
platter to rotate back into position to allow for writing of the WAL
data. What I don't know is if those multiple transactions would actually
make it to the platter on that rotation, or if they'd serialize,
resulting in one commit per revolution. I do know that there's no
theoretical reason that they couldn't, it's just a matter of putting
enough intelligence in the drive.

Perhaps this is something that SCSI supports and (S)ATA doesn't, since
SCSI allows multiple transactions to be 'in flight' on the bus at once.

But since you mention commit_delay, this does lead to an interesting
possible use: set it equal to the effective rotational period of the
drive. If you know your transaction load well enough, you could possibly
gain some benefit here. But of course a RAID controller with a BBU would
be a better bet...
--
Jim C. Nasby, Sr. Engineering Consultant jnasby(at)pervasive(dot)com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Vivek Khera 2006-03-14 22:18:24 Re: Vacuum template databases, Urgent: Production probl
Previous Message Richard Huxton 2006-03-14 21:37:33 Re: x206-x225