Markus Wanner <markus(at)bluegap(dot)ch> writes:
> AFAICT we currently have three fixed size blocks to manage shared
> buffers: the buffer blocks themselves, the buffer descriptors, the
> strategy status (for the freelist) and the buffer lookup table.
> It's not obvious to me how these data structures should perform better
> than a dynamically allocated layout.
Let me just point out that awhile back we got a *measurable* performance
boost by eliminating a single indirect fetch from the buffer addressing
code path. We used to have an array of pointers pointing to the actual
buffers, and we removed that in favor of assuming the buffers were
laid out in a contiguous array, so that the address of buffer N could be
computed with a shift-and-add, eliminating the pointer fetch. I forget
exactly what the numbers were, but it was significant enough to make us
So I don't have any faith in untested assertions that we can convert
these data structures to use dynamic allocation with no penalty.
It's very difficult to see how you'd do that without introducing a
new layer of indirection, and our experience shows that that layer
will cost you.
regards, tom lane
In response to
pgsql-hackers by date
|Next:||From: subham||Date: 2010-08-30 15:12:10|
|Subject: Needs Suggestion|
|Previous:||From: Kevin Grittner||Date: 2010-08-30 14:32:14|
|Subject: Assertion failure on HEAD (or at least git copy of it)|