Re: [pgsql-hackers-win32] win32 performance - fsync question - Mailing list pgsql-hackers

From Greg Stark
Subject Re: [pgsql-hackers-win32] win32 performance - fsync question
Date
Msg-id 87acptst6r.fsf@stark.xeocode.com
Whole thread Raw
In response to Re: [pgsql-hackers-win32] win32 performance - fsync question  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.us> writes:

> Greg Stark <gsstark@mit.edu> writes:
> > I'm a bit surprised that the write-cache lead to a corrupt database, and not
> > merely lost transactions. I had the impression that drives still handled the
> > writes in the order received.
> 
> There'd be little point in having a cache if they did, I should think.
> I thought the point of the cache was to allow the disk to schedule I/O
> in an order that minimizes seek time (ie, such a disk has got its own
> elevator queue or similar).

If that were the case then SCSI drives that ship with write caching disabled
and using tagged command queuing instead would perform poorly.

I think the main motivation for write caching on IDE drives is that the IDE
protocol forces commands to be issued synchronously. So you can't send a
second command until the first command has completed. Without write caching
that limits the write bandwidth tremendously. Write caching is being used here
as a poor man's tcq.

-- 
greg



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [pgsql-hackers-win32] win32 performance - fsync question
Next
From: Vsevolod Lobko
Date:
Subject: Re: Finding if old transactions are running...