pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jacques Caron <jc@directinfos.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 20:43:45 +0200
Message-ID: <6.2.0.14.0.20050418202657.03cf3bd0@wheresmymailserver.com> (raw)
In-Reply-To: <33c6269f0504181121385a1f0a@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>
	<6.2.0.14.0.20050418192528.04238088@pop.interactivemediafactory.net>
	<33c6269f05041811165228c814@mail.gmail.com>
	<33c6269f0504181121385a1f0a@mail.gmail.com>

Hi,

At 20:21 18/04/2005, Alex Turner wrote:
>So I wonder if one could take this stripe size thing further and say
>that a larger stripe size is more likely to result in requests getting
>served parallized across disks which would lead to increased
>performance?

Actually, it would be pretty much the opposite. The smaller the stripe 
size, the more evenly distributed data is, and the more disks can be used 
to serve requests. If your stripe size is too large, many random accesses 
within one single file (whose size is smaller than the stripe size/number 
of disks) may all end up on the same disk, rather than being split across 
multiple disks (the extreme case being stripe size = total size of all 
disks, which means concatenation). If all accesses had the same cost (i.e. 
no seek time, only transfer time), the ideal would be to have a stripe size 
equal to the number of disks.

But below a certain size, you're going to use multiple disks to serve one 
single request which would not have taken much more time from a single disk 
(reading even a large number of consecutive blocks within one cylinder does 
not take much more time than reading a single block), so you would add 
unnecessary seeks on a disk that could have served another request in the 
meantime. You should definitely not go below the filesystem block size or 
the database block size.

There is a interesting discussion of the optimal stripe size in the vinum 
manpage on FreeBSD:

http://www.freebsd.org/cgi/man.cgi?query=vinum&apropos=0&sektion=0&manpath=FreeBSD+5.3-R...

(look for "Performance considerations", towards the end -- note however 
that some of the calculations are not entirely correct).

Basically it says the optimal stripe size is somewhere between 256KB and 
4MB, preferably an odd number, and that some hardware RAID controllers 
don't like big stripe sizes. YMMV, as always.

Jacques.





view thread (119+ messages)  latest in thread

Message-ID: <6.2.0.14.0.20050418202657.03cf3bd0@wheresmymailserver.com>
Permalink:  ../6.2.0.14.0.20050418202657.03cf3bd0@wheresmymailserver.com/
Also on:    postgresql.org/message-id/6.2.0.14.0.20050418202657.03cf3bd0@wheresmymailserver.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: jc@directinfos.com, armtuk@gmail.com, gsstark@mit.edu, wyu@talisys.com
  Subject: Re: How to improve db performance with $7K?
  In-Reply-To: <6.2.0.14.0.20050418202657.03cf3bd0@wheresmymailserver.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