The huge_pages parameter doesn't work when shared_memory_type is sysv

Started by PG Bug reporting formover 4 years ago4 messagesdocs
Jump to latest
#1PG Bug reporting form
noreply@postgresql.org

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/13/kernel-resources.html
Description:

It seems that the huge_pages parameter is ignored when shared_memory_type is
sysv. The server successfully starts with huge_pages=on, but actually
doesn't use huge pages (relying on /proc/meminfo). I think that this is
worth mentioning in the "Linux Huge Pages" section.

#2Thomas Munro
thomas.munro@gmail.com
In reply to: PG Bug reporting form (#1)
Re: The huge_pages parameter doesn't work when shared_memory_type is sysv

On Mon, Sep 27, 2021 at 9:04 PM PG Doc comments form
<noreply@postgresql.org> wrote:

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/13/kernel-resources.html
Description:

It seems that the huge_pages parameter is ignored when shared_memory_type is
sysv. The server successfully starts with huge_pages=on, but actually
doesn't use huge pages (relying on /proc/meminfo). I think that this is
worth mentioning in the "Linux Huge Pages" section.

Yeah. The thread that added shared_memory_type=sysv had an unfinished
follow-up patch that stalled[1]. The goal of that patch was to add
huge page support for shared_memory_type=sysv on AIX, and it is still
waiting for testing and polishing by an AIX-enabled hacker. That
second patch included exactly such a documentation adjustment, and an
error message too (the idea was to reject that combination on Linux
but allow it on AIX). Here are those bits, extracted.

/messages/by-id/HE1PR0202MB28126DB4E0B6621CC6A1A91286D90@HE1PR0202MB2812.eurprd02.prod.outlook.com

Attachments:

0001-Reject-huge_pages-on-if-shared_memory_type-sysv.patchtext/x-patch; charset=US-ASCII; name=0001-Reject-huge_pages-on-if-shared_memory_type-sysv.patchDownload+9-2
#3Alexander Lakhin
exclusion@gmail.com
In reply to: Thomas Munro (#2)
Re: The huge_pages parameter doesn't work when shared_memory_type is sysv

Hello Thomas,

22.10.2021 06:59, Thomas Munro wrote:

That
second patch included exactly such a documentation adjustment, and an
error message too (the idea was to reject that combination on Linux
but allow it on AIX). Here are those bits, extracted.

/messages/by-id/HE1PR0202MB28126DB4E0B6621CC6A1A91286D90@HE1PR0202MB2812.eurprd02.prod.outlook.com

Thanks for the fix! It works and looks correct to me.

Best regards,
Alexander

#4Thomas Munro
thomas.munro@gmail.com
In reply to: Alexander Lakhin (#3)
Re: The huge_pages parameter doesn't work when shared_memory_type is sysv

On Sat, Oct 23, 2021 at 9:20 AM Alexander Lakhin <exclusion@gmail.com> wrote:

Thanks for the fix! It works and looks correct to me.

Pushed. Thanks.