Hello,
The current PostgreSQL documentation overestimates the number of huge pages (vm.nr_hugepages) because the calculation
usesthe maximum virtual address space. In practice, huge pages are only used for the anonymous shared memory segment.
Theattached patch fixes the documentation.
FYI, Oracle presents a shell script to calculate the number of huge pages for its shared memory segments:
https://docs.oracle.com/cd/E11882_01/server.112/e10839/appi_vlm.htm#UNXAR385
Regards
Takayuki Tsunakawa