From a3739e376fbc9d6e332ce33d42426b1d8b59f20b Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 6 Mar 2018 21:45:28 -0500 Subject: [PATCH] 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 Reviewed-by: Justin Pryzby Reviewed-by: Vasundhar Boddapati --- doc/src/sgml/runtime.sgml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/src/sgml/runtime.sgml b/doc/src/sgml/runtime.sgml index 71f02300c2..4929d5529d 100644 --- a/doc/src/sgml/runtime.sgml +++ b/doc/src/sgml/runtime.sgml @@ -1472,14 +1472,14 @@ export PG_OOM_ADJUST_VALUE=0 the kernel setting vm.nr_hugepages. To estimate the number of huge pages needed, start PostgreSQL without huge pages enabled and check the - postmaster's VmPeak 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 /proc file system. This might look like: $ head -1 $PGDATA/postmaster.pid 4170 -$ grep ^VmPeak /proc/4170/status -VmPeak: 6490428 kB +$ pmap 4170 | awk '/rw-s/ && /zero/ {print $2}' +6490428K $ grep ^Hugepagesize /proc/meminfo Hugepagesize: 2048 kB