pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: david@lang.hm
To: Merlin Moncure <mmoncure@gmail.com>
Cc: gnuoytr@rcn.com
Cc: pgsql-performance@postgresql.org
Subject: Re: Reports from SSD purgatory
Date: Wed, 24 Aug 2011 12:13:38 -0700 (PDT)
Message-ID: <alpine.DEB.2.02.1108241207240.5855@asgard.lang.hm> (raw)
In-Reply-To: <CAHyXU0zJESnMfQ2+-1tyoQARf5ert9Nq+zhgWYT374Tdk5GGNg@mail.gmail.com>
References: <4E49B0A0.2060705@2ndQuadrant.com>
	<201108241848.061232@ms14.lnh.mail.rcn.net>
	<CAHyXU0zJESnMfQ2+-1tyoQARf5ert9Nq+zhgWYT374Tdk5GGNg@mail.gmail.com>

On Wed, 24 Aug 2011, Merlin Moncure wrote:

> On Wed, Aug 24, 2011 at 1:48 PM,  <gnuoytr@rcn.com> wrote:
>>
>>
>>
>> Also, given that PG is *nix centric and support for TRIM is win 
>> centric, having that makes a big difference in performance.
>
> one point about TRIM -- no raid controller that I know of supports
> trim, which suggests it might not even be possible to support.  How
> much does it help really? Probably not as much as you would think
> because newer SSD drives have very sophisticated controllers that make
> it at least partially obsolete.

if the SSD can know that the user doesn't care about data in a particular 
block, the SSD can overwrite that block with new data.

Since the SSDs do their writing to new blocks and erase old blocks later, 
the more empty blocks you have available, the less likely you are to hit a 
garbage collection pause when you try to write to the drive.

if you are careful to never write temporary files to the drive and only 
use it for database-like 'update in place' type of things (no 'write a new 
file and then rename it over the old one' tricks), then TRIM won't make 
any difference because every block that you have ever written to is one 
that you care about (or close enough to this for practical purposes)

but if you don't take this care, the drive works to preserve all the data 
blocks that you have ever written to, even if the filesystem has freed 
them and dosn't care about them. The worst case would be a log strcutured 
filesystem (btrfs for example) where every write is to a new block and 
then the old block is freed later.

David Lang



view thread (13+ messages)  latest in thread

Message-ID: <alpine.DEB.2.02.1108241207240.5855@asgard.lang.hm>
Permalink:  ../alpine.DEB.2.02.1108241207240.5855@asgard.lang.hm/
Also on:    postgresql.org/message-id/alpine.DEB.2.02.1108241207240.5855@asgard.lang.hm

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: david@lang.hm, mmoncure@gmail.com, gnuoytr@rcn.com
  Subject: Re: Reports from SSD purgatory
  In-Reply-To: <alpine.DEB.2.02.1108241207240.5855@asgard.lang.hm>
  References: <4E49B0A0.2060705@2ndQuadrant.com> <201108241848.061232@ms14.lnh.mail.rcn.net> <CAHyXU0zJESnMfQ2+-1tyoQARf5ert9Nq+zhgWYT374Tdk5GGNg@mail.gmail.com> <alpine.DEB.2.02.1108241207240.5855@asgard.lang.hm>

* 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