mirror of
https://github.com/postgres/postgres.git
synced 2025-04-24 10:47:04 +03:00
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>
This commit is contained in:
parent
0c2c81b403
commit
a3739e376f
@ -1472,14 +1472,14 @@ export PG_OOM_ADJUST_VALUE=0
|
|||||||
the kernel setting <varname>vm.nr_hugepages</varname>. To estimate the
|
the kernel setting <varname>vm.nr_hugepages</varname>. To estimate the
|
||||||
number of huge pages needed, start <productname>PostgreSQL</productname>
|
number of huge pages needed, start <productname>PostgreSQL</productname>
|
||||||
without huge pages enabled and check the
|
without huge pages enabled and check the
|
||||||
postmaster's <varname>VmPeak</varname> value, as well as the system's
|
postmaster's anonymous shared memory segment size, as well as the system's
|
||||||
huge page size, using the <filename>/proc</filename> file system. This might
|
huge page size, using the <filename>/proc</filename> file system. This might
|
||||||
look like:
|
look like:
|
||||||
<programlisting>
|
<programlisting>
|
||||||
$ <userinput>head -1 $PGDATA/postmaster.pid</userinput>
|
$ <userinput>head -1 $PGDATA/postmaster.pid</userinput>
|
||||||
4170
|
4170
|
||||||
$ <userinput>grep ^VmPeak /proc/4170/status</userinput>
|
$ <userinput>pmap 4170 | awk '/rw-s/ && /zero/ {print $2}'</userinput>
|
||||||
VmPeak: 6490428 kB
|
6490428K
|
||||||
$ <userinput>grep ^Hugepagesize /proc/meminfo</userinput>
|
$ <userinput>grep ^Hugepagesize /proc/meminfo</userinput>
|
||||||
Hugepagesize: 2048 kB
|
Hugepagesize: 2048 kB
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user