Re: [PATCH] Use MAP_HUGETLB where supported (v3) - Mailing list pgsql-hackers

From Christian Kruse
Subject Re: [PATCH] Use MAP_HUGETLB where supported (v3)
Date
Msg-id 20140304105317.GB3754@defunct.ch
Whole thread Raw
In response to Re: [PATCH] Use MAP_HUGETLB where supported (v3)  (Heikki Linnakangas <hlinnakangas@vmware.com>)
List pgsql-hackers
Hi,

On 03/03/14 21:03, Heikki Linnakangas wrote:
> I spotted this in section "17.4.1 Shared Memory and Semaphores":
>
> >Linux
> >
> >    The default maximum segment size is 32 MB, and the default maximum total size is 2097152 pages. A page is almost
always4096 bytes except in unusual kernel configurations with "huge pages" (use getconf PAGE_SIZE to verify). 
>
> It's not any more wrong now than it's always been, but I don't think huge
> pages ever affect PAGE_SIZE... Could I cajole you into rephrasing that, too?

Hm… to be honest, I'm not sure how to change that. What about this?

        The default maximum segment size is 32 MB, and the
        default maximum total size is 2097152
        pages.  A page is almost always 4096 bytes except in
        kernel configurations with <quote>huge pages</quote>
        (use <literal>cat /proc/meminfo | grep Hugepagesize</literal>
        to verify), but they have to be enabled explicitely via
        <xref linkend="guc-huge-pages">. See
        <xref linkend="linux-huge-pages"> for details.

I attached a patch doing this change.

Best regards,

--
 Christian Kruse               http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


Attachment

pgsql-hackers by date:

Previous
From: Teodor Sigaev
Date:
Subject: Re: jsonb and nested hstore
Next
From: Yuri Levinsky
Date:
Subject: Re: requested shared memory size overflows size_t