Re: x206-x225

From: Richard Huxton <dev(at)archonet(dot)com>
To: "Jim C(dot) Nasby" <jnasby(at)pervasive(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-15 09:26:09
Message-ID: 4417DDB1.8000308@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Jim C. Nasby wrote:
>> 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.

SCSI Command queueing:
http://www.storagereview.com/guide2000/ref/hdd/if/scsi/protCQR.html

SATA "native command queuing":
http://www.tomshardware.com/2004/11/16/can_command_queuing_turbo_charge_sata/

> 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...

I suppose as long as you always have several transactions trying to
commit, have a separate spindle(s) for the WAL then you could improve
throughput at the cost of the shortest transaction times. Of course, it
might be that the increase in lock duration etc. might outweigh any
benefits. I'd suspect the cost/gain would be highly variable with
changes in workload, and as you say write-cache+BBU seems more sensible.

--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Marcin Mańk 2006-03-15 10:09:52 VACUUM FULL hangs
Previous Message Vivek Khera 2006-03-14 22:18:24 Re: Vacuum template databases, Urgent: Production probl