John W Jones <jj(a)asu.edu> writes:
Is it typical for it to take so many tries to get the purespace
right?
How many times did it take, 3? The maximum number of times it should
resize is 3. This will occur when the purespace starts out too small.
If the purespace starts out much larger than the size needed we can
guarantee two passes. The first time through computes the exact size,
the second time through gets it right on the nose.
The problem with a too-small purespace is that the computation of how
much space is needed is inexact -- it only counts the number of bytes
requested. This number will be too high because compaction is done
while filling the purespace. Hence the second time through, the
purespace will be too large. The third time through will be an exact
fit.
There should never be a need for four (or more) passes.