Earlier algorithm for picking the packs considered repacking the
largest two packs if there were not sufficient number of packs in any
generation for the repacking. This can lead to issues because the largest packs
can be huge and the resulting repacking takes a long time.
The new algorithm prefers picking smaller packs across generations if there are
not sufficient packs in a generation which avoids this issue.
Since we are only picking at least 2 packs for repacking after this change instead of 3 as it was earlier, there can be a problem of convergence (number of packs considered for repacking being almost always less than the new packs being generated) which was pointed out by @durham. In particular, since the second highest generation is starting at 100MB, if we have enough packs > 100MB we will only pack only 2 of them at once. To take care of this, I am increasing the default repacksizelimit to 1GB from 100MB. This should have the desired effect.
Note that the maxrepackpacks limit ensures that all the smaller packs are not considered for the repacking even though they might fall under the repacksizelimit.