pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: eric soroos <eric-psql@soroos.net>
To: pgsql-performance@postgresql.org
Subject: Re: how to configure my new server
Date: Thu, 06 Feb 2003 15:14:09 -0800
Message-ID: <137343446.1167578047@[4.42.179.151]> (raw)
In-Reply-To: <3E42D6FB.9000605@web.de>

On Thu, 06 Feb 2003 22:43:23 +0100 in message <3E42D6FB.9000605@web.de>, Andreas Pflug <Andreas.Pflug@web.de> wrote:
> 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!

Unfortunately, today's hardware still has rotational latency. You aren't goign to get much more than 300 seeks per sec on the best single drive. Putting them together in a way that requires half to all of them to seek for a given read or write is a performance killer.  The only way around this is high end raid cards with backup batteries and ram. 

I've been doing some tests using pgbench (which aren't written up yet) on the topic of low budget performance.  So far, using linux 2.4.20 md software raid where applicable, I've seen against a baseline of one ide disk:

running on a rocketraid card (kernel thinks it's scsi) is faster than onboard controllers 
mirrored is negligably slower
striped is much slower
splitting WAL and Data on two drives gives a 40+% speed boost
having data in ram cache is good for ~ 100% speed boost. Essentially, disk activity goes from evenly split reading and writing to all writing

The only pg settings that show any correlation with pgbench performance are the # of WAL logs, generally corresponding to the interval between flushing wal logs to the data store. Buffers don't change much over a 64-8192 range, Sort mem doesn't change much. (Note that that may be due to the query types in this benchmark. My app certainly needs the sortmem)

As a somewhat on topic thought, it would be really neat to have a pci card that was one slot for ram, one for compact flash, a memory/ide controller and battery. Fill the ram and cf with identical sized units, and use it as a disk for WAL. if the power goes off, dump the ram to cf. Should be able to do thousands of writes per sec, effectivley moving the bottleneck somewhere else.  It's probably $20 worth of chips for the board, but it would probably sell for thousands. 

eric






view thread (27+ messages)  latest in thread

Message-ID: <137343446.1167578047@[4.42.179.151]>
Permalink:  ../137343446.1167578047@%5B4.42.179.151%5D/
Also on:    postgresql.org/message-id/137343446.1167578047@[4.42.179.151]

 · 

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: eric-psql@soroos.net
  Subject: Re: how to configure my new server
  In-Reply-To: <137343446.1167578047@[4.42.179.151]>
  References: <3E42D6FB.9000605@web.de> <137343446.1167578047@[4.42.179.151]>

* 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