Re: How to improve db performance with $7K? - Mailing list pgsql-performance

From Greg Stark
Subject Re: How to improve db performance with $7K?
Date
Msg-id 878y3gks3p.fsf@stark.xeocode.com
Whole thread Raw
In response to Re: How to improve db performance with $7K?  (Alex Turner <armtuk@gmail.com>)
Responses Re: How to improve db performance with $7K?
List pgsql-performance
Alex Turner <armtuk@gmail.com> writes:

> This is fundamentaly untrue.
>
> A mirror is still a mirror.  At most in a RAID 10 you can have two
> simultaneous seeks.  You are always going to be limited by the seek
> time of your drives.  It's a stripe, so you have to read from all
> members of the stripe to get data, requiring all drives to seek.
> There is no advantage to seek time in adding more drives.

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.

The actual response time for a random access to a drive is the seek time plus
the time waiting for your request to actually be handled. Under heavy load
that could be many milliseconds. The more drives you have the fewer requests
each drive has to handle.

Look at the await and svctime columns of iostat -x.

Under heavy random access load those columns can show up performance problems
more accurately than the bandwidth columns. You could be doing less bandwidth
but be having latency issues. While reorganizing data to allow for more
sequential reads is the normal way to address that, simply adding more
spindles can be surprisingly effective.

> By adding more drives you can increase throughput, but the max throughput of
> the PCI-X bus isn't that high (I think around 400MB/sec) You can easily get
> this with a six or seven drive RAID 5, or a ten drive RAID 10. At that point
> you start having to factor in the cost of a bigger chassis to hold more
> drives, which can be big bucks.

You could use software raid to spread the drives over multiple PCI-X cards.
But if 400MB/s isn't enough bandwidth then you're probably in the realm of
"enterprise-class" hardware anyways.

* (Actually even that's possible: you could limit yourself to a portion of the
  drive surface to reduce seek time)

--
greg

pgsql-performance by date:

Previous
From: Andrei Gaspar
Date:
Subject: Sort and index
Next
From: "Dave Held"
Date:
Subject: Re: Sort and index