Question about configuration and SSD

Started by Szymon Guzalmost 15 years ago4 messagesgeneral
Jump to latest
#1Szymon Guz
mabewlun@gmail.com

Hi,
do we need some special configuration for SSD drives, or is that enough to
treat those drives normally?

regards
Szymon

#2Craig Ringer
craig@2ndquadrant.com
In reply to: Szymon Guz (#1)
Re: Question about configuration and SSD

On 02/06/11 16:26, Szymon Guz wrote:

Hi,
do we need some special configuration for SSD drives, or is that enough
to treat those drives normally?

Make sure the SSDs have a supercapacitor or battery backup for their
write cache. If they do not, then do not use them unless you can disable
write caching completely (probably resulting in horrible performance),
because you WILL get a corrupt database when power fails.

If the SSDs have a supercap or a battery backed write cache so that they
can guarantee that all cached data will be written out if the power goes
down, you won't need any special configuration. You may want to tune
differently for best performance, though - for example, reducing
random_page_cost .

--
Craig Ringer

#3Marc Mamin
M.Mamin@intershop.de
In reply to: Craig Ringer (#2)
Re: Question about configuration and SSD

-----Original Message-----
From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Craig Ringer
Sent: Donnerstag, 2. Juni 2011 10:53

On 02/06/11 16:26, Szymon Guz wrote:

Hi,
do we need some special configuration for SSD drives, or is that enough
to treat those drives normally?

Make sure the SSDs have a supercapacitor or battery backup for their
write cache. If they do not, then do not use them unless you can disable
write caching completely (probably resulting in horrible performance),
because you WILL get a corrupt database when power fails.
...

Hello,

may the database also get corrupt if SSDs are only used for temp tablespaces ?
And will Postgres fall back on another temp tablespace if one get down?

regards,

Marc Mamin

#4Toby Corkindale
toby.corkindale@strategicdata.com.au
In reply to: Craig Ringer (#2)
Re: Question about configuration and SSD

On 02/06/11 18:53, Craig Ringer wrote:

On 02/06/11 16:26, Szymon Guz wrote:

Hi,
do we need some special configuration for SSD drives, or is that enough
to treat those drives normally?

Make sure the SSDs have a supercapacitor or battery backup for their
write cache. If they do not, then do not use them unless you can disable
write caching completely (probably resulting in horrible performance),
because you WILL get a corrupt database when power fails.

If the SSDs have a supercap or a battery backed write cache so that they
can guarantee that all cached data will be written out if the power goes
down, you won't need any special configuration. You may want to tune
differently for best performance, though - for example, reducing
random_page_cost .

Are you sure?

SSDs support barriers and "fsync" just like regular hard drives, and
your regular Linux filesystems will ensure things are committed to disk.

Rather I would say - if you have an SSD *with*
battery-or-capacitor-backed write-cache, then disable "Barriers" and
enable writeback mode on your filesystem - and get a huge performance
increase.

But if you don't have those features, then just use your filesystem with
the normal settings.. and it'll still be a lot faster than regular
hard-drives, and just as safe.

-Toby