From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: munmap() failure due to sloppy handling of hugepage size |
Date: | 2016-10-12 22:23:35 |
Message-ID: | 20161012222335.hoquilnawqnu4t57@alap3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2016-10-12 16:33:38 -0400, Tom Lane wrote:
> Andres Freund <andres(at)anarazel(dot)de> writes:
> > On October 12, 2016 1:25:54 PM PDT, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> >> A little bit of research suggests that on Linux the thing to do would
> >> be to get the actual default hugepage size by reading /proc/meminfo and
> >> looking for a line like "Hugepagesize: 2048 kB".
>
> > We had that, but Heikki ripped it out when merging... I think you're supposed to use /sys to get the available size.
>
> According to
> https://www.kernel.org/doc/Documentation/vm/hugetlbpage.txt
> looking into /proc/meminfo is the longer-standing API and thus is
> likely to work on more kernel versions.
MAP_HUGETLB, which we rely on for hugepage support, is newer than the
introducing the /sys stuff.
> Also, if you look into /sys then you are going to see multiple
> possible values and it's not clear how to choose the right one.
That's a fair point. It'd probably be good to use the largest we can,
bounded by a percentage of max waste or such. But that's likely
something for another day.
Regards,
Andres
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2016-10-12 22:42:31 | Re: pg_dump getBlobs query broken for 7.3 servers |
Previous Message | Tom Lane | 2016-10-12 22:18:56 | Re: munmap() failure due to sloppy handling of hugepage size |