Re: Correction to documentation at https://www.postgresql.org/docs/12/kernel-resources.html

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: sanjeev_adwal(at)yahoo(dot)co(dot)in, Pg Docs <pgsql-docs(at)lists(dot)postgresql(dot)org>
Subject: Re: Correction to documentation at https://www.postgresql.org/docs/12/kernel-resources.html
Date: 2021-10-05 23:26:04
Message-ID: CA+hUKGL-HX4herL4iDPwA9_bdLEc=LXTxT5M2aEnga3rT9xUmw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On Wed, Oct 6, 2021 at 3:48 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> PG Doc comments form <noreply(at)postgresql(dot)org> writes:
> > On https://www.postgresql.org/docs/12/kernel-resources.html, the command to
> > calculate memory allocated to postgres is not correct. Following is the
> > command as shown in 18.4.5. Linux Huge Pages.
> > pmap 4170 | awk '/rw-s/ && /zero/ {print $2}', this command does not return
> > any results with correct pid. Probably /zero/ needs to be updated with
> > /anon_hugepage/
>
> The example seems to work as-given for me (testing on a RHEL8 system).
> It's of course not guaranteed to work on every flavor of Linux.

I think the pattern as given will show you the size if you are not
already using huge pages. For example, this line matches on my system
when I have /proc/sys/vm/nr_hugepages == 0:

00007f2932eb6000 145360K rw-s- zero (deleted)

If you are already using huge pages, it doesn't match anything,
because the relevant line looks like:

00007f6814e00000 145408K rw-s- anon_hugepage (deleted)

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message rir 2021-10-07 03:39:05 Re: small patch
Previous Message Tom Lane 2021-10-05 14:48:42 Re: Correction to documentation at https://www.postgresql.org/docs/12/kernel-resources.html