Anthonin Bonnefoy <[email protected]> writes:
> To help with that, the attached patch provides a new option,
> huge_pages_autotune_buffers, to automatically use leftover huge pages
> as shared_buffers. This requires some changes in the auto-tune logic:

Not expressing an opinion on whether we should do this, but
there is a comment on GetHugePageSize() that you seem to have
falsified without bothering to correct:

 * Doing the round-up ourselves also lets us make use of the extra memory,
 * rather than just wasting it.  Currently, we just increase the available
 * space recorded in the shmem header, which will make the extra usable for
 * purposes such as additional locktable entries.  Someday, for very large
 * hugepage sizes, we might want to think about more invasive strategies,
 * such as increasing shared_buffers to absorb the extra space.

                        regards, tom lane


Reply via email to