pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alan Stange <stange@rentec.com>
To: Alex Turner <armtuk@gmail.com>
Cc: Greg Stark <gsstark@mit.edu>
Cc: William Yu <wyu@talisys.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: How to improve db performance with $7K?
Date: Mon, 18 Apr 2005 13:34:28 -0400
Message-ID: <4263EFA4.2000900@rentec.com> (raw)
In-Reply-To: <33c6269f05041809566abf91d2@mail.gmail.com>
References: <CC74E7E10A8A054798B6611BD1FEF4D30625DA5B@vamail01.thexchange.com>
	<425EBA0C.6030804@sfnet.cc>
	<d3vpnn$2iu$1@news.hub.org>
	<87pswsku6e.fsf@stark.xeocode.com>
	<33c6269f0504180817511b27a3@mail.gmail.com>
	<878y3gks3p.fsf@stark.xeocode.com>
	<33c6269f05041809566abf91d2@mail.gmail.com>

Alex Turner wrote:

>[snip]
>  
>
>>Adding drives will not let you get lower response times than the average seek
>>time on your drives*. But it will let you reach that response time more often.
>>
>>    
>>
>[snip]
>
>I believe your assertion is fundamentaly flawed.  Adding more drives
>will not let you reach that response time more often.  All drives are
>required to fill every request in all RAID levels (except possibly
>0+1, but that isn't used for enterprise applicaitons).  Most requests
>in OLTP require most of the request time to seek, not to read.  Only
>in single large block data transfers will you get any benefit from
>adding more drives, which is atypical in most database applications. 
>For most database applications, the only way to increase
>transactions/sec is to decrease request service time, which is
>generaly achieved with better seek times or a better controller card,
>or possibly spreading your database accross multiple tablespaces on
>seperate paritions.
>
>My assertion therefore is that simply adding more drives to an already
>competent* configuration is about as likely to increase your database
>effectiveness as swiss cheese is to make your car run faster.
>  
>

Consider the case of a mirrored file system with a mostly read() 
workload.  Typical behavior is to use a round-robin method for issueing 
the read operations to each mirror in turn, but one can use other 
methods like a geometric algorithm that will issue the reads to the 
drive with the head located closest to the desired track.    Some 
systems have many mirrors of the data for exactly this behavior.   In 
fact, one can carry this logic to the extreme and have one drive for 
every cylinder in the mirror, thus removing seek latencies completely.  
In fact this extreme case would also remove the rotational latency as 
the cylinder will be in the disks read cache.  :-)   Of course, writing 
data would be a bit slow!

I'm not sure I understand your assertion that "all drives are required 
to fill every request in all RAID levels".   After all, in mirrored 
reads only one mirror needs to read any given block of data, so I don't 
know what goal is achieved in making other mirrors read the same data.

My assertion (based on ample personal experience) is that one can 
*always* get improved performance by adding more drives.  Just limit the 
drives to use the first few cylinders so that the average seek time is 
greatly reduced and concatenate the drives together.  One can then build 
the usual RAID device out of these concatenated metadevices.  Yes, one 
is wasting lots of disk space, but that's life.   If your goal is 
performance, then you need to put your money on the table.     The 
system will be somewhat unreliable because of the device count, 
additional SCSI buses, etc., but that too is life in the high 
performance world.

-- Alan



view thread (119+ messages)  latest in thread

Message-ID: <4263EFA4.2000900@rentec.com>
Permalink:  ../4263EFA4.2000900@rentec.com/
Also on:    postgresql.org/message-id/4263EFA4.2000900@rentec.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: stange@rentec.com, armtuk@gmail.com, gsstark@mit.edu, wyu@talisys.com
  Subject: Re: How to improve db performance with $7K?
  In-Reply-To: <4263EFA4.2000900@rentec.com>

* 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