From: Greg Stark <gsstark@mit.edu>
To: pgsql-hackers@postgresql.org
Subject: Re: [PATCHES] ARC Memory Usage analysis
Date: 25 Oct 2004 13:14:39 -0400
Message-ID: <87mzyavhxc.fsf@stark.xeocode.com> (raw)
In-Reply-To: <20651.1098720192@sss.pgh.pa.us>
References: <1098471059.20926.49.camel@localhost.localdomain>
<41796115.2020501@Yahoo.com>
<20041022200955.GC4382@it.is.rice.edu>
<417D1D01.3090401@Yahoo.com>
<20651.1098720192@sss.pgh.pa.us>
Tom Lane <tgl@sss.pgh.pa.us> writes:
> However, I'm still really nervous about the idea of using
> effective_cache_size to control the ARC algorithm. That number is
> usually entirely bogus.
It wouldn't be too hard to have a port-specific function that tries to guess
the total amount of memory. That isn't always right but it's at least a better
ballpark default than a fixed arbitrary value.
However I wonder about another approach entirely. If postgres timed how long
reads took it shouldn't find it very hard to distinguish between a cached
buffer being copied and an actual i/o operation. It should be able to track
the percentage of time that buffers requested are in the kernel's cache and
use that directly instead of the estimated cache size.
Adding two gettimeofdays to every read call would be annoyingly expensive. But
a port-specific function to check the cpu instruction counter could be useful.
It doesn't have to be an accurate measurement of time (such as on some
multi-processor machines) as long as it's possible to distinguish when a slow
disk operation has occurred from when no disk operation has occurred.
--
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, pgsql-hackers@postgresql.org
Subject: Re: [PATCHES] ARC Memory Usage analysis
In-Reply-To: <87mzyavhxc.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