Re: Solid State Drives with PG (was: in RAM DB)

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Alan McKay <alan(dot)mckay(at)gmail(dot)com>
Cc: Postgres General Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Solid State Drives with PG (was: in RAM DB)
Date: 2010-03-26 16:48:14
Message-ID: b42b73151003260948h3b20e705t5a3d39d2fb78730c@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-general

On Fri, Mar 26, 2010 at 10:32 AM, Alan McKay <alan(dot)mckay(at)gmail(dot)com> wrote:
>> Have you considered using one of these:
>> http://www.acard.com/english/fb01-product.jsp?idno_no=270&prod_no=ANS-9010&type1_title=
>> Solid State Drive&type1_idno=13
>
> We did some research which suggested that performance may not be so
> great with them because the PG engine is not optimized to utilize
> those drives.
>
> So, I'll change the subject line to see if anyone has experience using these.

postgres works fine with flash SSD, understanding that:
*) postgres disk block is 8k and ssd erase block is much larger (newer
ssd controllers minimize this penalty though)
*) many flash drives cheat and buffer writes to delay full sync, for
performance reasons and to extend the life of the drive
*) if you have a relatively small database, the big 'win' off SSD,
fast random reads, is of little/no use because the o/s will buffer the
database in ram anywys.

The ideal candidate for flash SSD from database point of view is one
who is having I/O problems coming from OLTP type activity forcing the
disks to constantly seek all over the place to write and (especially)
read data. This happens when your database grows to the point when
its OPERATIONAL (that is, frequently used) data size exceeds ram to a
certain extent and o/s buffering of reads starts to become less
effective. This can crush database performance.

flash SSD 'fixes' this problem because relative to a disk head seek
the cost of random read i/o on flash is basically zero. however flash
has some problems writing, such that you get to choose between
volatility of data (irrespective of fsync) or lousy performance. So
flash isn't yet a general purpose database solution, and wont be until
the write performance problem is fixed in a way that doesn't
compromise on volatility. If/when that happens, and there isn't a
huge price premium to pay vs flash prices today, all my new servers
will be spec'd with flash :-).

merlin

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Hiroshi Saito 2010-03-26 16:54:10 Re: UTF-8 encoding failure
Previous Message Martin Schäfer 2010-03-26 15:46:08 Re: UTF-8 encoding failure

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2010-03-26 17:12:38 Re: round(x) function
Previous Message Gaietti, Mauro (SELEX GALILEO Guest, Italy) 2010-03-26 16:43:33 round(x) function