Re: partitioning os swap data log tempdb

From: Andrew Sullivan <andrew(at)libertyrms(dot)info>
To: "'pgsql-performance(at)postgresql(dot)org'" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: partitioning os swap data log tempdb
Date: 2003-02-24 12:15:00
Message-ID: 20030224071500.C20792@mail.libertyrms.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Mon, Feb 24, 2003 at 10:52:55AM +0100, Schaefer, Mario wrote:
> Can i make a similar configuration with PostgreSQL?

Sort of. PostgreSQL currently does not have a convenient way to
specify where this or that part of the database lives. As a result,
your best bet is to use RAID 1+0 for the data area, and get the speed
that way. If you must do it without more hardware, however, you can
manually move some files to other drives and symlink them. You
_must_ do this while offline, and if the file grows above 1G, the
advantage will be lost.

It is nevertheless a good idea to put your OS, data directory, and
write head log (WAL) on separate disks. Also, you should make sure
your PostgreSQL logs don't interfere with the database I/O (the OS
disk is probably a good place for them, but make sure you use some
sort of log rotator. Syslog is helpful here).

> What is pg_xlog and how important is it?

It's the write ahead log. Put it on a separate RAID.

> What ist the prefered filesystem (ext2, ext3 or raiserfs)?

Certainly ext2 is not crash-safe. There've been some reports of
corruption under reiserfs, but I've never had it happen. There have
been complaints about performance with ext3. You might want to
investigate XFS, as it was designed for this sort of task.

> We want to use about 20 databases with varios size from 5 MB to 500MB per
> database
> and more selects than inserts (insert/select ratio about 1/10) for fast
> webaccess.

The WAL is less critical in this case, because it is only extended
when you change the data, not when you select.

A

--
----
Andrew Sullivan 204-4141 Yonge Street
Liberty RMS Toronto, Ontario Canada
<andrew(at)libertyrms(dot)info> M2P 2A8
+1 416 646 3304 x110

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Oleg Lebedev 2003-02-24 15:59:11 Re: slow query
Previous Message Shridhar Daithankar 2003-02-24 10:32:17 Re: partitioning os swap data log tempdb