Re: SSDs with Postgresql?

From: Radosław Smogura <rsmogura(at)softperience(dot)eu>
To: "Henry C(dot)" <henka(at)cityweb(dot)co(dot)za>
Cc: Leonardo Francalanci <m_lists(at)yahoo(dot)it>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: SSDs with Postgresql?
Date: 2011-04-14 10:07:24
Message-ID: f4f330b78c98300a55306153ef4fbfd7@mail.softperience.eu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 14 Apr 2011 11:46:12 +0200, Henry C. wrote:
> On Thu, April 14, 2011 11:30, Leonardo Francalanci wrote:
>> have a look at
>>
>>
>> http://postgresql.1045698.n5.nabble.com/Intel-SSDs-that-may-not-suck-td426826
>> 1.html
>>
>>
>>
>> It looks like those are "safe" to use with a db, and aren't that
>> expensive.
>
> The new SSDs look great. From our experience, we trust SSDs (even
> MLC) far
> more than mechanical hard drives.
>
> I believe this perception that SSDs are less "safe" than
> failure-prone
> mechanical hard drives will eventually change.
>
> In the meantime, we've embraced them and the advantages are
> compelling.
>
> h

One thing you should care about is such called write endurance - number
of writes to one memory region before it will be destroyed - if your SSD
driver do not have transparent allocation, then you may destroy it
really fast, because write of each "block" will be in same memory
segment, clog/xlog may be failed with 10k-100k writes. But if your SSD
has transparent allocation, then internal controller will count your
writes to given memory cell, and when lifetime of this cell will be at
the end, it will "associate" block with different cell. With transparent
allocation, You may sometimes do not fear if system uses journaling, you
store logs there on any kind of often updatable data. You may calculate
life time of your SSD with:
WritesToDestroyCells = "write_endurance" * "disk_size"
AvgLifeTime = WritesToDestroyCells / writes_per_sec

Those are high numbers, even with simply disks as 10.000 * 60GB, means
you need to send 600TB of data to one SSD (not completely true, as you
can't send one byte, but full blocks) . Ofc, In order to extend life
time of SSD you should provide file systems cache, or SSD with cache, as
well turn off FS journaling.

Regards,
Radek

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Henry C. 2011-04-14 10:09:05 Re: Replication: slave is in permanent startup 'recovery'
Previous Message Arnaud Lesauvage 2011-04-14 09:58:43 Re: SSDs with Postgresql?