Since PostgreSQL 9.4+ supports Linux Huge Pages, I have configured a Ubuntu 16.04 server with 16GB of RAM and 8 CPU cores to use Huge Pages with a dedicated PostgreSQL 9.5 instance.
The estimate in https://www.postgresql.org/docs/devel/static/kernel-resources.html#LINUX-HUGE-PAGES is based on VmPeak value wich is rougly a little more that the shared_buffers value.
So the question is: Since the recommended value for shared_buffers is between 25% and 40% and since PostgreSQL also relies on the operating system cache.
What is the recommended value for Huge Pages? Should I configure almost all memory to Huge Page use of PostgreSQL (12G-14G) and shared_buffers to 6G, or, which I think is more correct, configure Huge Pages with ~6.5G and shared_buffers to 6G.