Re: Design proposal: fsync absorb linear slider

From: Greg Smith <greg(at)2ndQuadrant(dot)com>
To: Hannu Krosing <hannu(at)2ndQuadrant(dot)com>
Cc: 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 11:01:59
Message-ID: 51F25727.7040404@2ndQuadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 7/26/13 5:59 AM, Hannu Krosing wrote:
> Well, SSD disks do it in the way proposed by didier (AFAIK), by putting
> "random"
> fs pages on one large disk page and having an extra index layer for
> resolving
> random-to-sequential ordering.

If your solution to avoiding random writes now is to do sequential ones
into a buffer, you'll pay for it by having more expensive random reads
later. In the SSD write buffer case, that works only because those
random reads are very cheap. Do the same thing on a regular drive, and
you'll be paying a painful penalty *every* time you read in return for
saving work *once* when you write. That only makes sense when your
workload is near write-only.

It's possible to improve on this situation by having some sort of
background process that goes back and cleans up the random data,
converting it back into sequentially ordered writes again. SSD
controllers also have firmware that does this sort of work, and Postgres
might do it as part of vacuum cleanup. But note that such work faces
exactly the same problems as writing the data out in the first place.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2013-07-26 11:10:25 Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: Proposal for Allow postgresql.conf values to be changed via SQL [review])
Previous Message marco atzeri 2013-07-26 10:15:30 Re: install libpq.dll in bin directory on Windows / Cygwin