pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Neill <rn214@richardneill.org>
To: Niels Kristian Schjødt <nielskristian@autouncle.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: What setup would you choose for postgresql 9.2 installation?
Date: Mon, 04 Mar 2013 14:18:00 +0000
Message-ID: <5134AD18.6090901@richardneill.org> (raw)
In-Reply-To: <31E8EC2A-72E9-419A-9CDD-5B646A534272@autouncle.com>
References: <31E8EC2A-72E9-419A-9CDD-5B646A534272@autouncle.com>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>



On 04/03/13 13:52, Niels Kristian Schjødt wrote:
> LSI MegaRAID SAS 9260-4i with four Intel SSDSC2CW240A3K5 SSDs OR four Hitachi Ultrastar 15K600 SAS drives?
>
> My app is pretty write heavy and I have a lot of concurrent connections 300 - (though considering adding pgpool2 in front to increase throughput).
>

If you can afford it, there's no question in my mind that SSDs are the 
way to go. They can be 1000 times faster for random reads.

May I suggest that you do some experiments though - perhaps with just 
one disk of each type - you can get some pretty good illustrative tests 
with ordinary SATA drives in an ordinary laptop/desktop (but not a USB 
adapter). I did this originally when evaluating the (then new) Intel X25 
SSD.

The other things to note are:

* The filesystem matters. For the important thing, fdatasync(), ext2 is 
2x as fast as ext4, which itself is much faster than ext3. BUT ext2's 
fsck is horrid, so we chose ext4.

* Will you enable the disk (or RAID controller) write cache?

* Have you enough RAM for your key tables (and indexes) to fit in 
memory? If not, 64GB of RAM is cheap these days.

* In some applications, you can get a speed boost by turning 
synchronous_commit off - this would mean that in a database crash, the 
last few seconds are potentially lost, even through they application 
thinks they were committed. You may find this an acceptable tradeoff.

* Postgres doesn't always write straight to the tables, but uses the WAL 
(write-ahead-log). So the benefit of SSD performance for "random writes" 
is less relevant than for "random reads".


Lastly, don't overdo the concurrent connections. You may end up with 
less thoughput than  if you let postgres devote more resources to each 
request and let it finish faster.


Hope that helps,

Richard


-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance



view thread (7+ messages)  latest in thread

Message-ID: <5134AD18.6090901@richardneill.org>
Permalink:  ../5134AD18.6090901@richardneill.org/
Also on:    postgresql.org/message-id/5134AD18.6090901@richardneill.org

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: rn214@richardneill.org, nielskristian@autouncle.com
  Subject: Re: What setup would you choose for postgresql 9.2 installation?
  In-Reply-To: <5134AD18.6090901@richardneill.org>

* 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