WAL/pg_xlog on Another Disk: Redundancy?

From: Thomas F(dot)O'Connell <tfo(at)sitening(dot)com>
To: PgSql General <pgsql-general(at)postgresql(dot)org>
Subject: WAL/pg_xlog on Another Disk: Redundancy?
Date: 2004-12-14 21:38:45
Message-ID: 8872CA6B-4E18-11D9-AB5B-000D93AE0944@sitening.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dann Corbit 2004-12-14 21:54:12 Re: Performance differences 7.1 to 7.3
Previous Message Jimmie H. Apsey 2004-12-14 21:18:28 Re: Performance differences 7.1 to 7.3