"J. Andrew Rogers" <jrogers@neopolitan.com> writes:
> As I understand it (and I haven't looked so I could be wrong), the
> buffer cache is searched by traversing it sequentially.
You really should look first.
The main-line code paths use hashed lookups. There are some cases that
do linear searches through the buffer headers or the CDB lists; in
theory those are supposed to be non-performance-critical cases, though
I am suspicious that some are not (see other response). In any case,
those structures are considerably more compact than the buffers proper,
and I doubt that cache misses per se are the killer factor.
This does raise a question for Josh though, which is "where's the
oprofile results?" If we do have major problems at the level of cache
misses then oprofile would be able to prove it.
regards, tom lane