From: Greg Stark <gsstark@mit.edu>
To: Kevin Brown <kevin@sysexperts.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: How to improve db performance with $7K?
Date: 14 Apr 2005 14:03:31 -0400
Message-ID: <87d5sxgrrg.fsf@stark.xeocode.com> (raw)
In-Reply-To: <20050414083608.GC19518@filer>
References: <d30377$1jn8$1@news.hub.org>
<33c6269f050406083533d2045d@mail.gmail.com>
<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>
Kevin Brown <kevin@sysexperts.com> writes:
> Greg Stark wrote:
>
>
> > I think you're being misled by analyzing the write case.
> >
> > Consider the read case. When a user process requests a block and
> > that read makes its way down to the driver level, the driver can't
> > just put it aside and wait until it's convenient. It has to go ahead
> > and issue the read right away.
>
> Well, strictly speaking it doesn't *have* to. It could delay for a
> couple of milliseconds to see if other requests come in, and then
> issue the read if none do. If there are already other requests being
> fulfilled, then it'll schedule the request in question just like the
> rest.
But then the cure is worse than the disease. You're basically describing
exactly what does happen anyways, only you're delaying more requests than
necessary. That intervening time isn't really idle, it's filled with all the
requests that were delayed during the previous large seek...
> Once the first request has been fulfilled, the driver can now schedule
> the rest of the queued-up requests in disk-layout order.
>
> I really don't see how this is any different between a system that has
> tagged queueing to the disks and one that doesn't. The only
> difference is where the queueing happens.
And *when* it happens. Instead of being able to issue requests while a large
seek is happening and having some of them satisfied they have to wait until
that seek is finished and get acted on during the next large seek.
If my theory is correct then I would expect bandwidth to be essentially
equivalent but the latency on SATA drives to be increased by about 50% of the
average seek time. Ie, while a busy SCSI drive can satisfy most requests in
about 10ms a busy SATA drive would satisfy most requests in 15ms. (add to that
that 10k RPM and 15kRPM SCSI drives have even lower seek times and no such
IDE/SATA drives exist...)
In reality higher latency feeds into a system feedback loop causing your
application to run slower causing bandwidth demands to be lower as well. It's
often hard to distinguish root causes from symptoms when optimizing complex
systems.
--
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, kevin@sysexperts.com
Subject: Re: How to improve db performance with $7K?
In-Reply-To: <87d5sxgrrg.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