Re: partition question for new server setup

From: Craig James <craig_james(at)emolecules(dot)com>
To: Whit Armstrong <armstrong(dot)whit(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: partition question for new server setup
Date: 2009-04-28 18:07:13
Message-ID: 49F745D1.7090700@emolecules.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Whit Armstrong wrote:
> I have the opportunity to set up a new postgres server for our
> production database. I've read several times in various postgres
> lists about the importance of separating logs from the actual database
> data to avoid disk contention.
>
> Can someone suggest a typical partitioning scheme for a postgres server?
>
> My initial thought was to create /var/lib/postgresql as a partition on
> a separate set of disks.
>
> However, I can see that the xlog files will be stored here as well:
> http://www.postgresql.org/docs/8.3/interactive/storage-file-layout.html
>
> Should the xlog files be stored on a separate partition to improve performance?
>
> Any suggestions would be very helpful. Or if there is a document that
> lays out some best practices for server setup, that would be great.
>
> The database usage will be read heavy (financial data) with batch
> writes occurring overnight and occassionally during the day.
>
> server information:
> Dell PowerEdge 2970, 8 core Opteron 2384
> 6 1TB hard drives with a PERC 6i
> 64GB of ram

We're running a similar configuration: PowerEdge 8 core, PERC 6i, but we have 8 of the 2.5" 10K 384GB disks.

When I asked the same question on this forum, I was advised to just put all 8 disks into a single RAID 10, and forget about separating things. The performance of a battery-backed PERC 6i (you did get a battery-backed cache, right?) with 8 disks is quite good.

In order to separate the logs, OS and data, I'd have to split off at least two of the 8 disks, leaving only six for the RAID 10 array. But then my xlogs would be on a single disk, which might not be safe. A more robust approach would be to split off four of the disks, put the OS on a RAID 1, the xlog on a RAID 1, and the database data on a 4-disk RAID 10. Now I've separated the data, but my primary partition has lost half its disks.

So, I took the advice, and just made one giant 8-disk RAID 10, and I'm very happy with it. It has everything: Postgres, OS and logs. But since the RAID array is 8 disks instead of 4, the net performance seems to quite good.

But ... your mileage may vary. My box has just one thing running on it: Postgres. There is almost no other disk activity to interfere with the file-system caching. If your server is going to have a bunch of other activity that generate a lot of non-Postgres disk activity, then this advice might not apply.

Craig

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Craig James 2009-04-28 18:16:44 Re: partition question for new server setup
Previous Message Kenneth Marshall 2009-04-28 18:06:21 Re: partition question for new server setup