pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Cody Caughlan <toolbag@gmail.com>
To: Tomas Vondra <tv@fuzzy.cz>
Cc: pgsql-performance@postgresql.org
Subject: Re: Slow queries / commits, mis-configuration or hardware issues?
Date: Wed, 16 Nov 2011 09:31:50 -0800
Message-ID: <60F36E9C-9BBE-442F-9027-EEC5DCAB2C42@gmail.com> (raw)
In-Reply-To: <90891b62c1ea76f6e599616055e9cf88.squirrel@sq.gransy.com>
References: <CAPVp=gYs7uYF_hy0MDBkpRCxNbWQHPSyP6sXO-6SJZ_TvaU=XQ@mail.gmail.com>
	<87e450fd65045c328f41e1b99a4029d5.squirrel@sq.gransy.com>
	<CAPVp=ga6CkO8vXJJs5PswKv0Cf3R3SpUK+KmQXY8edpc84CddA@mail.gmail.com>
	<4EC30F05.6010901@fuzzy.cz>
	<CAPVp=gY-RrkhPQNRMMFcx5CZhJqiZeYh32W2p6Tvj9FsepGJmA@mail.gmail.com>
	<90891b62c1ea76f6e599616055e9cf88.squirrel@sq.gransy.com>


On Nov 16, 2011, at 8:52 AM, Tomas Vondra wrote:

> On 16 Listopad 2011, 2:21, Cody Caughlan wrote:
>> How did you build your RAID array? Maybe I have a fundamental flaw /
>> misconfiguration. I am doing it via:
>> 
>> $ yes | mdadm --create /dev/md0 --level=10 -c256 --raid-devices=4
>> /dev/xvdb /dev/xvdc /dev/xvdd /dev/xvde
>> $ pvcreate /dev/md0
>> $ vgcreate lvm-raid10 /dev/md0
>> $ lvcreate -l 215021 lvm-raid10 -n lvm0
>> $ blockdev --setra 65536 /dev/lvm-raid10/lvm0
>> $ mkfs.xfs -f /dev/lvm-raid10/lvm0
>> $ mkdir -p /data && mount -t xfs -o noatime /dev/lvm-raid10/lvm0 /data
> 
> I'm not using EC2 much, and those were my first attempts with ephemeral
> storage, so this may be a stupid question, but why are you building a
> RAID-10 array on an ephemeral storage, anyway?
> 
> You already have a standby, so if the primary instance fails you can
> easily failover.
> 

Yes, the slave will become master if master goes down. We have no plan to try and resurrect the master in the case of failure, hence the choice of ephemeral vs EBS. 

We chose RAID10 over RAID0 to get the best combination of performance and minimizing probability of a single drive failure bringing down the house.

So, yes, RAID0 would ultimately deliver the best performance, with more risk.

> What are you going to do in case of a drive failure? With a server this is
> rather easy - just put there a new drive and you're done, but can you do
> that on EC2? I guess you can't do that when the instance is running, so
> you'll have to switch to the standby anyway, right? Have you ever tried
> this (how it affects the performance etc.)?
> 

As far as I know one cannot alter the ephemeral drives in a running instance, so yes, the whole instance would have to be written off.

> So what additional protection does that give you? Wouldn't a RAID-0 be a
> better utilization of the resources?
> 

Too much risk.

> Tomas
> 




view thread (14+ messages)  latest in thread

Message-ID: <60F36E9C-9BBE-442F-9027-EEC5DCAB2C42@gmail.com>
Permalink:  ../60F36E9C-9BBE-442F-9027-EEC5DCAB2C42@gmail.com/
Also on:    postgresql.org/message-id/60F36E9C-9BBE-442F-9027-EEC5DCAB2C42@gmail.com

 · 

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: toolbag@gmail.com, tv@fuzzy.cz
  Subject: Re: Slow queries / commits, mis-configuration or hardware issues?
  In-Reply-To: <60F36E9C-9BBE-442F-9027-EEC5DCAB2C42@gmail.com>

* 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