Modify local buffer management to request memory for local buffers in blocks

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 72619f81916315658711cf35bcb2d3c993960bd4
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2006-12-27T22:31:54Z
Releases: 8.3.0
Modify local buffer management to request memory for local buffers in blocks
of increasing size, instead of one at a time.  This reduces the memory
management overhead when num_temp_buffers is large: in the previous coding
we would actually waste 50% of the space used for temp buffers, because aset.c
would round the individual requests up to 16K.  Problem noted while studying
a performance issue reported by Steven Flatt.

Back-patch as far as 8.1 --- older versions used few enough local buffers
that the issue isn't significant for them.

Files

PathChange+/−
src/backend/storage/buffer/localbuf.c modified +51 −6