Re: tablespaces and DB administration

From: pgsql(at)mohawksoft(dot)com
To: "Andreas Pflug" <pgadmin(at)pse-consulting(dot)de>
Cc: "James Robinson" <jlrobins(at)socialserve(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: tablespaces and DB administration
Date: 2004-05-27 12:55:06
Message-ID: 16506.24.91.171.78.1085662506.squirrel@mail.mohawksoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> James Robinson wrote:
>
>>>
>>>
>>> Users are primarily, if not stupid, ignorant. They will read the
>>> absolute
>>> minimum needed to achieve a goal and little else. I say this with the
>>> utmost respect, because I and probably everyone else on this group is
>>> guilty of the same thing. So, the "preferred" installation procedure,
>>> i.e.
>>> the one with the easy to follow directions, should showcase features
>>> the
>>> user should know, and leave the user in a good place. IMHO, the user's
>>> database on one volume and pg_xlog on another is a better starting
>>> place.
>>
>>
>> Yes, that is generally the case (prefer pg_xlog on separate spindle),
>> but no
>> need to *forcibly* overcomplicate things if the box has only one
>> spindle,
>> or if they have only one single RAID'd partition configured. We should
>> continue to err on the side of keeping the path to a functional system
>> nice and simple, yet still offering superb functionality. Oracle gets
>> this
>> wrong. pg_autovacuum is another good step in this direction.
>
>
> In the age of inexpensive RAID, tablespaces have more or less lost their
> relevance regarding performance. pgsql's philosophy respects this by
> leaving the storage work up to the OS and disk subsystem. Even having
> the xlog on a different spindle won't help too much; you'll probably be
> better off if you stuff all your spindles in one raid on most systems.
> For worse, splitting two disks into separate storage areas to have xlog
> separated would degrade safety for very little performance gain. So the
> advise is: one disk, no alternative. 2 to 20 disks: use a single raid.
> more disks: examine your access patterns carefully before you believe
> you can do the job better than your raid controller.
>
> This leaves table spaces as a mere administrative feature, many (most)
> installations will happily live without that.
>
> Regards,
> Andreas

I would say that this is almost completely misinformed. Depending on the
OS and the hardware, of course, a write on one spindle may not affect the
performance of another.

There are so many great things that happen when you have separate
spindles. The OS manages the file systems separately, the device drivers
may be separate, and if the low-level I/O device driver is even different,
then you get your own bus mastering I/O buffers. All around good things
happen when you have separate spindles.

A single postgresql process may not see much benefit, because it does not
do background I/O, but multiple postgresql processes will perform better
because multiple I/O requests can be issued and processed simultaneously.
If you got good SMP in your kernel, even better.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-05-27 13:29:46 Re: SELECT * FROM <table> LIMIT 1; is really slow
Previous Message pgsql 2004-05-27 12:41:55 Re: tablespaces and DB administration