Recommended maximum memory setting for PostgreSQL 9.4+ with Huge Pages
If there are no other applications on the server potentially benefiting from huge pages, just set vm.nr_hugepages to rounded up shared buffers / pagesize. When you start PostgreSQL check its log. If it reports fall back to normal pages, increase it slightly.
But I'm not sure if 16GB RAM (i.e. shared buffers 4-6GB) is enough to see the significant difference. Probably you need to set it and compare.