Skip to content

Commit a3739e3

Browse files
committed
doc: Improve calculation of vm.nr_hugepages
The previous method worked off the full virtual address space, not just the shared memory usage. Author: Tsunakawa, Takayuki <tsunakawa.takay@jp.fujitsu.com> Reviewed-by: Justin Pryzby <pryzby@telsasoft.com> Reviewed-by: Vasundhar Boddapati <bvasundhar@gmail.com>
1 parent 0c2c81b commit a3739e3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/src/sgml/runtime.sgml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1472,14 +1472,14 @@ export PG_OOM_ADJUST_VALUE=0
14721472
the kernel setting <varname>vm.nr_hugepages</varname>. To estimate the
14731473
number of huge pages needed, start <productname>PostgreSQL</productname>
14741474
without huge pages enabled and check the
1475-
postmaster's <varname>VmPeak</varname> value, as well as the system's
1475+
postmaster's anonymous shared memory segment size, as well as the system's
14761476
huge page size, using the <filename>/proc</filename> file system. This might
14771477
look like:
14781478
<programlisting>
14791479
$ <userinput>head -1 $PGDATA/postmaster.pid</userinput>
14801480
4170
1481-
$ <userinput>grep ^VmPeak /proc/4170/status</userinput>
1482-
VmPeak: 6490428 kB
1481+
$ <userinput>pmap 4170 | awk '/rw-s/ &amp;&amp; /zero/ {print $2}'</userinput>
1482+
6490428K
14831483
$ <userinput>grep ^Hugepagesize /proc/meminfo</userinput>
14841484
Hugepagesize: 2048 kB
14851485
</programlisting>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy