Re: Large tables (was: RAID 0 not as fast as

From: "Luke Lonergan" <llonergan(at)greenplum(dot)com>
To: mark(at)mark(dot)mielke(dot)cc, "Guy Thornley" <guy(at)esphion(dot)com>
Cc: "Markus Schaber" <schabi(at)logix-tt(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Large tables (was: RAID 0 not as fast as
Date: 2006-09-22 03:46:41
Message-ID: C138AAB1.2524%llonergan@greenplum.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Mark,

On 9/21/06 8:40 PM, "mark(at)mark(dot)mielke(dot)cc" <mark(at)mark(dot)mielke(dot)cc> wrote:

> I'd advise against using this call unless it can be shown that the page
> will not be used in the future, or at least, that the page is less useful
> than all other pages currently in memory. This is what the call really means.
> It means, "There is no value to keeping this page in memory".

Yes, it's a bit subtle.

I think the topic is similar to "cache bypass", used in cache capable vector
processors (Cray, Convex, Multiflow, etc) in the 90's. When you are
scanning through something larger than the cache, it should be marked
"non-cacheable" and bypass caching altogether. This avoids a copy, and
keeps the cache available for things that can benefit from it.

WRT the PG buffer cache, the rule would have to be: "if the heap scan is
going to be larger than "effective_cache_size", then issue the
posix_fadvise(BLOCK_NOT_NEEDED) call". It doesn't sound very efficient to
do this in block/extent increments though, and it would possibly mess with
subsets of the block space that would be re-used for other queries.

- Luke

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Jérôme BENOIS 2006-09-22 07:43:52 Re: High CPU Load
Previous Message mark 2006-09-22 03:40:37 Re: Large tables (was: RAID 0 not as fast as