Re: Warm-cache prefetching - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Warm-cache prefetching
Date
Msg-id 200512091537.jB9FbPN07379@candle.pha.pa.us
Whole thread Raw
In response to Warm-cache prefetching  (Qingqing Zhou <zhouqq@cs.toronto.edu>)
Responses Re: Warm-cache prefetching
Re: Warm-cache prefetching
List pgsql-hackers
Kenneth Marshall wrote:
> The main benefit of pre-fetching optimization is to allow just-
> in-time data delivery to the processor. There are numerous papers
> illustrating the dramatic increase in data throughput by using
> datastructures designed to take advantage of prefetching. Factors
> of 3-7 can be realized and this can greatly increase database
> performance. The first step needed to take advantage of the ability
> of pre-fetching to reduce memory latency is to design the index
> page layout with an internal blocking of the cache-line size.
> Then issue pre-fetch instructions for the memory you are going
> to need to process the index page far enough in advance to allow
> it to be in a cache-line by the time it is needed. 

I can see that being useful for a single-user application that doesn't
have locking or I/O bottlenecks, and doesn't have a multi-stage design
like a database.  Do we do enough of such processing that we will _see_
an improvement, or will our code become more complex and it will be
harder to make algorithmic optimizations to our code?

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Warm-cache prefetching
Next
From: Martijn van Oosterhout
Date:
Subject: Re: Upcoming PG re-releases