From: Greg Stark <gsstark@mit.edu>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Kevin Brown <kevin@sysexperts.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: How to improve db performance with $7K?
Date: 15 Apr 2005 14:01:41 -0400
Message-ID: <87sm1rdim2.fsf@stark.xeocode.com> (raw)
In-Reply-To: <28523.1113532916@sss.pgh.pa.us>
References: <d31f71$2epm$1@news.hub.org>
<33c6269f050406151241b01148@mail.gmail.com>
<20050406224102.GM93835@decibel.org>
<33c6269f0504061732195f6ae4@mail.gmail.com>
<87wtrfmgt5.fsf@stark.xeocode.com>
<13449.1112847297@sss.pgh.pa.us>
<20050414055655.GB19518@filer>
<878y3lj23o.fsf@stark.xeocode.com>
<20050414083608.GC19518@filer>
<446.1113489854@sss.pgh.pa.us>
<20050415020337.GD19518@filer>
<28523.1113532916@sss.pgh.pa.us>
Tom Lane <tgl@sss.pgh.pa.us> writes:
> Yes, you can probably assume that blocks with far-apart numbers are
> going to require a big seek, and you might even be right in supposing
> that a block with an intermediate number should be read on the way.
> But you have no hope at all of making the right decisions at a more
> local level --- say, reading various sectors within the same cylinder
> in an optimal fashion. You don't know where the track boundaries are,
> so you can't schedule in a way that minimizes rotational latency.
> You're best off to throw all the requests at the drive together and
> let the drive sort it out.
Consider for example three reads, one at the beginning of the disk, one at the
very end, and one in the middle. If the three are performed in the logical
order (assuming the head starts at the beginning), then the drive has to seek,
say, 4ms to get to the middle and 4ms to get to the end.
But if the middle block requires a full rotation to reach it from when the
head arrives that adds another 8ms of rotational delay (assuming a 7200RPM
drive).
Whereas the drive could have seeked over to the last block, then seeked back
in 8ms and gotten there just in time to perform the read for free.
I'm not entirely convinced this explains all of the SCSI drives' superior
performance though. The above is about a worst-case scenario. should really
only have a small effect, and it's not like the drive firmware can really
schedule things perfectly either.
I think most of the difference is that the drive manufacturers just don't
package their high end drives with ATA interfaces. So there are no 10k RPM ATA
drives and no 15k RPM ATA drives. I think WD is making fast SATA drives but
most of the manufacturers aren't even doing that.
--
greg
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: gsstark@mit.edu, tgl@sss.pgh.pa.us, kevin@sysexperts.com
Subject: Re: How to improve db performance with $7K?
In-Reply-To: <87sm1rdim2.fsf@stark.xeocode.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