pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andreas Pflug <Andreas.Pflug@web.de>
To: pgsql-performance@postgresql.org
Subject: Re: how to configure my new server
Date: Thu, 06 Feb 2003 22:43:23 +0100
Message-ID: <3E42D6FB.9000605@web.de> (raw)
In-Reply-To: <NDBBJLHHAKJFNNCGFBHLAENEEKAA.philip.johnson@atempo.com>
References: <NDBBJLHHAKJFNNCGFBHLAENEEKAA.philip.johnson@atempo.com>

I do not agree with the advice to dedicate one disc to every table.

Imagine 10 disks, 10 tables, and 10 users accessing the same table. This 
would mean 1 disk really busy and 9 idling all the way. If you use a 
RAID array, the random access is hopefully split to all disks, giving a 
much better performance. There are suggestions about direct disk access 
(using O_DIRECT file flags), versus using the OS' caching mechanisms. 
This is quite the same, in hardware. Today's hardware is designed to 
make the best of it, give it a chance!

PostgreSQL's transaction logs are probably being written sequentially. 
This situation is different because the access pattern is predictable, 
dedicated disks might be useful since head movement is reduced to near 
zero, but if there's no high write volume it's wasted performance.

If your system is so small that web and database are running on the same 
machine, you can consider page access being quite like table access, so 
I'd put it on the same big array. Your favorite *.html or *.php will be 
cached either.

Swap space may be on a dedicated disk, but it's better for a server if 
swap is never used. Put enough RAM into that machine! Swapping is quite 
a desaster on a server. So you could put swap just where you like it: if 
your server is sane, it's never accessed under load.

Same about OS files: is there really heavy traffic on them?

There's a white paper at www.microsoft.com about tuning MSSQL 7.0. If 
read carefully, some advice will be applicable to PostgreSQL too.

So as my general rule, valid for >99 % of users: use as much disks as 
possible in one big RAID array. Let the hardware do the data scattering, 
you'll be better off. For a production system, you will need disk 
redundancy either (my experience says one failed disk per year for 20 in 
use). Until your system is really heavily loaded, and you're using >10 
disks, don't think about dedicated disks. If you want extra performance 
for no cost, you can put the most accessed partition on the outer 
cylinders of the disk array (probably corresponding to the outer 
cylinders of the disk) since throughput is highest there.

Regards,

Andreas











view thread (27+ messages)  latest in thread

Message-ID: <3E42D6FB.9000605@web.de>
Permalink:  ../3E42D6FB.9000605@web.de/
Also on:    postgresql.org/message-id/3E42D6FB.9000605@web.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: Andreas.Pflug@web.de
  Subject: Re: how to configure my new server
  In-Reply-To: <3E42D6FB.9000605@web.de>
  References: <NDBBJLHHAKJFNNCGFBHLAENEEKAA.philip.johnson@atempo.com> <3E42D6FB.9000605@web.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox