Обсуждение: WAL/pg_xlog on Another Disk: Redundancy?

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

WAL/pg_xlog on Another Disk: Redundancy?

От
Thomas F.O'Connell
Дата:
It's part of the conventional wisdom of performance tuning to keep
pg_xlog on a separate physical disk, and this seems to be common sense
to me. Am I correct in deducing that the performance gain comes from
preventing a file being written to sequentially from competing for I/O
resources with the data presumably experiencing somewhat random access
in terms of reads/writes? If so, would it be useful to add a few
explanatory sentences to the docs?

http://www.postgresql.org/docs/7.4/static/wal-internals.html

"It is of advantage if the log is located on another disk than the main
database files. This may be achieved by moving the directory  pg_xlog
to another location (while the server is shut down, of course) and
creating a symbolic link from the original location in the main data
directory to the new location."

Anyway, I'm wondering what experiences people have had in setting this
up in production. If I have a server with 5 drive bays, one thought I
had was to have a RAID 1+0 for the primary partition and then to put
WAL on the fifth disk, but I assume that failure of that drive if there
were no redundancy would be a Bad Thing. Another option would be to do
RAID 5 on three drives and WAL mirrored on the remaining 2 drives. But
RAID 5 is slower than RAID 1+0 for data I/O in that scenario according
to what I've read.

Would a more ideal setup be a six-drive server with a RAID 1+0 on four
drives with 2 drives dedicated to WAL that mirrored one another? Is
that overkill? Anyone have recommendations for an appropriate setup for
a 5-bay server?

Thanks!

-tfo

--
Thomas F. O'Connell
Co-Founder, Information Architect
Sitening, LLC
http://www.sitening.com/
110 30th Avenue North, Suite 6
Nashville, TN 37203-6320
615-260-0005


Re: WAL/pg_xlog on Another Disk: Redundancy?

От
Mike Rylander
Дата:
On Tue, 14 Dec 2004 15:38:45 -0600, Thomas F.O'Connell <tfo@sitening.com> wrote:

[snip]

> Would a more ideal setup be a six-drive server with a RAID 1+0 on four
> drives with 2 drives dedicated to WAL that mirrored one another? Is
> that overkill? Anyone have recommendations for an appropriate setup for
> a 5-bay server?

A six drive setup would be great.  You definitly want some protection
for the WAL data.  I've seen up to a 20% increase on write-heavy
servers after moving pg_xlog to it's own disk.

>
> Thanks!
>
> -tfo
>
> --
> Thomas F. O'Connell
> Co-Founder, Information Architect
> Sitening, LLC
> http://www.sitening.com/
> 110 30th Avenue North, Suite 6
> Nashville, TN 37203-6320
> 615-260-0005
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend
>


--
Mike Rylander
mrylander@gmail.com
GPLS -- PINES Development
Database Developer
http://open-ils.org