Re: [PATCH] Use MAP_HUGETLB where supported (v3)

From: Christian Kruse <christian(at)2ndQuadrant(dot)com>
To: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Andres Freund <andres(at)2ndQuadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Bruce Momjian <bruce(at)momjian(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Abhijit Menon-Sen <ams(at)2ndQuadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] Use MAP_HUGETLB where supported (v3)
Date: 2014-03-04 10:53:17
Message-ID: 20140304105317.GB3754@defunct.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 always 4096 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 Content-Type Size
shm_docs-v1.patch text/x-diff 857 bytes

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Yuri Levinsky 2014-03-04 11:05:10 Re: requested shared memory size overflows size_t
Previous Message Teodor Sigaev 2014-03-04 10:44:42 Re: jsonb and nested hstore