Re: Design proposal: fsync absorb linear slider

From: Greg Smith <greg(at)2ndQuadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Hannu Krosing <hannu(at)2ndQuadrant(dot)com>, didier <did447(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Design proposal: fsync absorb linear slider
Date: 2013-07-26 13:52:45
Message-ID: 51F27F2D.60809@2ndQuadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 7/26/13 8:32 AM, Tom Lane wrote:
> What I'd point out is that that is exactly what WAL does for us, ie
> convert a bunch of random writes into sequential writes. But sooner or
> later you have to put the data where it belongs.

Hannu was observing that SSD often doesn't do that at all. They can
maintain logical -> physical translation tables that decode where each
block was written to forever. When read seeks are really inexpensive,
the only pressure to reorder block is wear leveling.

That doesn't really help with regular drives though, where the low seek
time assumption doesn't play out so well. The whole idea of writing
things sequentially and then sorting them out later was the rage in 2001
for ext3 on Linux, as part of the "data=journal" mount option. You can
go back and see that people are confused but excited about the
performance at
http://www.ibm.com/developerworks/linux/library/l-fs8/index.html

Spoiler: if you use a workload that has checkpoint issues, it doesn't
help PostgreSQL latency. Just like using a large write cache, you gain
some burst performance, but eventually you pay for it with extra latency
somewhere.

--
Greg Smith 2ndQuadrant US greg(at)2ndQuadrant(dot)com Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support www.2ndQuadrant.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2013-07-26 14:10:46 Re: getting rid of SnapshotNow
Previous Message Robert Haas 2013-07-26 13:50:32 Re: getting rid of SnapshotNow