pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Guy Thornley <guy@esphion.com>
To: Ron Mayer <rm_pg@cheapcomplexdevices.com>
Cc: toby <toby@telegraphics.com.au>
Cc: pgsql-performance@postgresql.org
Subject: Re: Lying drives [Was: Re: Which OS provides the _fastest_ PostgreSQL performance?]
Date: Mon, 13 Nov 2006 21:32:05 +1300
Message-ID: <20061113083205.GJ29915@esphion.com> (raw)
In-Reply-To: <4554CAC9.3000104@cheapcomplexdevices.com>
References: <kO24h.1260$2X4.632@trnddc04>
	<1162920135.543539.118390@h54g2000cwb.googlegroups.com>
	<2cl4h.1236$Es5.713@trnddc07>
	<1162995009.842121.125840@k70g2000cwa.googlegroups.com>
	<1163016362.882752.14140@m7g2000cwm.googlegroups.com>
	<06E4h.5421$Lt4.2413@trnddc08>
	<1163084338.373159.99280@h54g2000cwb.googlegroups.com>
	<U2_4h.3726$244.2632@trnddc01>
	<1163171668.837184.161080@e3g2000cwe.googlegroups.com>
	<4554CAC9.3000104@cheapcomplexdevices.com>

> > That's not quite what I meant by "trust". Some drives lie about the
> > flush. 
> 
> Is that really true, or a misdiagnosed software bug?

I've yet to find a drive that lies about write completion. (*)

The problem is that the drives boot-up default is write-caching enabled (or
perhaps the system BIOS sets it that way).

If you turn an IDE disks write cache off explicity, using hdparm or similar,
they behave.

The problem, I think, is a bug in hdparm or the linux kernel: if you use the
little-'i' option, the output indicates the WC is disabled. However, if you
use big-'I' to actually interrogate the drive, you get the correct setting.

I tested this a while ago by writing a program that did fsync() to test
write latency and random-reads to test read latency, and then comparing
them.

- Guy

* I did experience a too-close-to-call case, where after write-cache was
  disabled, the write latency was the same as the read latency. For every
  other drive the write latency much, MUCH higher. However, before I
  disabled the WC, the write latency was a fraction of the read latency.



view thread (4+ messages)  latest in thread

Message-ID: <20061113083205.GJ29915@esphion.com>
Permalink:  ../20061113083205.GJ29915@esphion.com/
Also on:    postgresql.org/message-id/20061113083205.GJ29915@esphion.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: guy@esphion.com, rm_pg@cheapcomplexdevices.com, toby@telegraphics.com.au
  Subject: Re: Lying drives [Was: Re: Which OS provides the _fastest_ PostgreSQL performance?]
  In-Reply-To: <20061113083205.GJ29915@esphion.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox