Re: Linux max on shared buffers?

From: Curt Sampson <cjs(at)cynic(dot)net>
To: Chris Albertson <chrisalbertson90278(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Linux max on shared buffers?
Date: 2002-07-11 07:23:36
Message-ID: Pine.NEB.4.44.0207111620590.436-100000@angelic.cynic.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 11 Jul 2002, Chris Albertson wrote:

> --- Curt Sampson <cjs(at)cynic(dot)net> wrote:
> > On Wed, 10 Jul 2002, Chris Albertson wrote:
> <SNIP>
> > > I keep adding buffer space until the CPU utilization goes to
> > > ~100%. Adding more buffer after this does little to speed up
> > > querries. I use the "top" display under either Linux or Solaris.
> >
> > Um...I just don't quite feel up to explaining why I think this is
> > quite wrong...
>
> It is easy to explain why I am wrong; You have run timming tests
> and have measurments that disagree with what I wrote.

You're measuring the wrong thing. The point is not to make your
CPU usage as high as possible; the point is to make your queries
as fast as possible.

> I am not so interrrested in theroy but possibly the O/S (linux and
> Solaris in my case) buffer and PostgreSQL bufers are not
> interchanceable
> as they are managed using diferent algorithums and the OS level buffer
> is shared with other aplications

They are interchanged; if you use memory for buffering, your OS doesn't.
The OS buffers are always used.

Worse yet, it appears that many systems page shared memory anyway,
so your buffers may be swapped out to disk, which sort of negates the
point of them.

Anyway, maybe one day I'll have the time and energy to write up a
big long explanation of a data block's trip between disk and postgres
buffer, so that people will understand. There seems to be a lot of
confusion here.

cjs
--
Curt Sampson <cjs(at)cynic(dot)net> +81 90 7737 2974 http://www.netbsd.org
Don't you know, in this new Dark Age, we're all light. --XTC

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Curt Sampson 2002-07-11 08:07:29 Re: Linux max on shared buffers?
Previous Message Chris Albertson 2002-07-11 07:20:14 Re: Linux max on shared buffers?