| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Anthonin Bonnefoy <anthonin(dot)bonnefoy(at)datadoghq(dot)com> |
| Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Auto-tune shared_buffers to use available huge pages |
| Date: | 2026-01-23 15:50:49 |
| Message-ID: | 3108184.1769183449@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Anthonin Bonnefoy <anthonin(dot)bonnefoy(at)datadoghq(dot)com> 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
| From | Date | Subject | |
|---|---|---|---|
| Previous Message | Jim Jones | 2026-01-23 15:43:40 | Re: WIP - xmlvalidate implementation from TODO list |