Обсуждение: WAL+Os on a single disk

Поиск
Список
Период
Сортировка

WAL+Os on a single disk

От
Anj Adu
Дата:
I have a situation where we are limited by the chassis on the box (and cost).

We have a 12 x 600G hot swappable disk system (raid 10)
and 2 internal disk  ( 2x 146G)

We would like to maximize storage on the large disks .

Does it make sense to put the WAL and OS on the internal disks and use
the 12 large disks only for data or should we put the WAL along with
data and leave the OS on the internal disks.

On our current systems..everything is on a single RAID 10 volume (and
performance is good)

We are just considering options now that we have the 2 extra disks to spare.

Re: WAL+Os on a single disk

От
Scott Marlowe
Дата:
On Wed, Jun 23, 2010 at 3:01 PM, Anj Adu <fotographs@gmail.com> wrote:
> I have a situation where we are limited by the chassis on the box (and cost).
>
> We have a 12 x 600G hot swappable disk system (raid 10)
> and 2 internal disk  ( 2x 146G)
>
> We would like to maximize storage on the large disks .
>
> Does it make sense to put the WAL and OS on the internal disks and use
> the 12 large disks only for data or should we put the WAL along with
> data and leave the OS on the internal disks.
>
> On our current systems..everything is on a single RAID 10 volume (and
> performance is good)
>
> We are just considering options now that we have the 2 extra disks to spare.

I have 16 disks in a server, 2 hot spares, 2 for OS and WAL and 12 for
RAID-10.  The RAID-10 array hits 100% utilization long before the 2 in
a RAID-1 for OS and WAL do.  And we log all modifying SQL statements
onto the same disk set.  So for us, the WAL and OS and logging on the
same data set works well.

Re: WAL+Os on a single disk

От
Matthew Wakeling
Дата:
On Wed, 23 Jun 2010, Scott Marlowe wrote:
>> We have a 12 x 600G hot swappable disk system (raid 10)
>> and 2 internal disk  ( 2x 146G)
>>
>> Does it make sense to put the WAL and OS on the internal disks
>
> So for us, the WAL and OS and logging on the same data set works well.

Generally, it is recommended that you put the WAL onto a separate disc to
the data. However, in this case, I would be careful. It may be that the 12
disc array is more capable. Specifically, it is likely that the 12-disc
array has a battery backed cache, but the two internal drives (RAID 1
presumably) do not. If this is the case, then putting the WAL on the
internal drives will reduce performance, as you will only be able to
commit a transaction once per revolution of the internal discs. In
contrast, if the WAL is on a battery backed cache array, then you can
commit much more frequently.

Test it and see.

Matthew

--
 I don't want the truth. I want something I can tell parliament!
                                              -- Rt. Hon. Jim Hacker MP

Re: WAL+Os on a single disk

От
Scott Marlowe
Дата:
On Thu, Jun 24, 2010 at 5:14 AM, Matthew Wakeling <matthew@flymine.org> wrote:
> On Wed, 23 Jun 2010, Scott Marlowe wrote:
>>>
>>> We have a 12 x 600G hot swappable disk system (raid 10)
>>> and 2 internal disk  ( 2x 146G)
>>>
>>> Does it make sense to put the WAL and OS on the internal disks
>>
>> So for us, the WAL and OS and logging on the same data set works well.
>
> Generally, it is recommended that you put the WAL onto a separate disc to
> the data. However, in this case, I would be careful. It may be that the 12
> disc array is more capable. Specifically, it is likely that the 12-disc
> array has a battery backed cache, but the two internal drives (RAID 1
> presumably) do not. If this is the case, then putting the WAL on the
> internal drives will reduce performance, as you will only be able to commit
> a transaction once per revolution of the internal discs. In contrast, if the
> WAL is on a battery backed cache array, then you can commit much more
> frequently.

This is not strictly true of the WAL, which writes sequentially and
more than one transaction at a time.  As you said though, test it to
be sure.

Re: WAL+Os on a single disk

От
Anj Adu
Дата:
What would you recommend to do a quick test for this? (i.e WAL on
internal disk vs WALon the 12 disk raid array )?

On Thu, Jun 24, 2010 at 6:31 AM, Scott Marlowe <scott.marlowe@gmail.com> wrote:
> On Thu, Jun 24, 2010 at 5:14 AM, Matthew Wakeling <matthew@flymine.org> wrote:
>> On Wed, 23 Jun 2010, Scott Marlowe wrote:
>>>>
>>>> We have a 12 x 600G hot swappable disk system (raid 10)
>>>> and 2 internal disk  ( 2x 146G)
>>>>
>>>> Does it make sense to put the WAL and OS on the internal disks
>>>
>>> So for us, the WAL and OS and logging on the same data set works well.
>>
>> Generally, it is recommended that you put the WAL onto a separate disc to
>> the data. However, in this case, I would be careful. It may be that the 12
>> disc array is more capable. Specifically, it is likely that the 12-disc
>> array has a battery backed cache, but the two internal drives (RAID 1
>> presumably) do not. If this is the case, then putting the WAL on the
>> internal drives will reduce performance, as you will only be able to commit
>> a transaction once per revolution of the internal discs. In contrast, if the
>> WAL is on a battery backed cache array, then you can commit much more
>> frequently.
>
> This is not strictly true of the WAL, which writes sequentially and
> more than one transaction at a time.  As you said though, test it to
> be sure.
>

Re: WAL+Os on a single disk

От
Robert Haas
Дата:
On Thu, Jun 24, 2010 at 10:55 AM, Anj Adu <fotographs@gmail.com> wrote:
> What would you recommend to do a quick test for this? (i.e WAL on
> internal disk vs WALon the 12 disk raid array )?

Maybe just pgbench?

http://archives.postgresql.org/pgsql-performance/2010-06/msg00223.php

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company