| From: | Greg Stark <gsstark(at)mit(dot)edu> | 
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> | 
| Cc: | Greg Stark <gsstark(at)mit(dot)edu>, pgsql-hackers(at)postgresql(dot)org | 
| Subject: | Re: [pgsql-hackers-win32] win32 performance - fsync question | 
| Date: | 2005-02-24 18:34:36 | 
| Message-ID: | 87acptst6r.fsf@stark.xeocode.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers pgsql-hackers-win32 | 
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
> Greg Stark <gsstark(at)mit(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Vsevolod Lobko | 2005-02-24 18:47:39 | Re: Finding if old transactions are running... | 
| Previous Message | Tom Lane | 2005-02-24 17:56:07 | Re: [pgsql-hackers-win32] win32 performance - fsync question | 
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bruce Momjian | 2005-02-24 22:27:25 | Re: [PATCHES] [pgsql-hackers-win32] Repleacement for src/port/snprintf.c | 
| Previous Message | Tom Lane | 2005-02-24 17:56:07 | Re: [pgsql-hackers-win32] win32 performance - fsync question |