Обсуждение: Separate Disks

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

Separate Disks

От
"Derek Hamilton"
Дата:
Hello all,

I recently started using PostgresQL and am quickly falling in love with it.
One of the biggest questions I have however is the ability to separate logs
from databases, etc. onto different disks.  The reason I'm interested in
this is the application I'm running performs a lot of inserts with a fairly
large set of data and I'm looking to improve performance by separating the
writes taking place on logs, etc.

Also, I'm using the newest version (7.3.2) and I'm not quite sure of the
layout of the files.  Inside the data directory I know the base directory
holds the databases for the cluster.  However, what is the difference
between the pg_clog and the pg_xlog?

Any help with improving the disk I/O would be much appreciated!

Thanks,
Derek Hamilton


Re: Separate Disks

От
Tom Lane
Дата:
"Derek Hamilton" <derek@capweb.com> writes:
> Any help with improving the disk I/O would be much appreciated!

Conventional wisdom is that putting the WAL log on its own spindle is a
big win (at least for databases that have nontrivial write traffic).
This is pretty easy to do, just symlink the pg_xlog directory to another
filesystem.  After that you could look at moving indexes off to their
own disk, but the pain-in-the-neck factor is *way* higher at the moment,
and the return not as good.  I doubt that pg_clog is really worth
worrying about.

            regards, tom lane