[postgres/dbadm_r/SystemLow-SystemHigh@mls:~]$ grep ^VmPeak /proc/`head -1 $PGDATA/postmaster.pid`/status
VmPeak: 232612 kB
[root/sysadm_r/SystemLow-SystemHigh@mls:~]# grep ^Hugepagesize /proc/meminfo
Hugepagesize: 2048 kB
[root/sysadm_r/SystemLow-SystemHigh@mls:~]# echo $(( 232612 / 2048 ))
113
[root/sysadm_r/SystemLow-SystemHigh@mls:~]# sysctl -w vm.nr_hugepages=200
vm.nr_hugepages = 200
[postgres/dbadm_r/SystemLow-SystemHigh@mls:~]$ grep ^shared_buffers /var/lib/pgsql/10/data/postgresql.conf
shared_buffers = 4MB # min 128kB
[postgres/dbadm_r/SystemLow-SystemHigh@mls:~]$ grep ^huge_pages /var/lib/pgsql/10/data/postgresql.conf
huge_pages = on
[root/sysadm_r/SystemLow-SystemHigh@mls:~]# getenforce
Enforcing
[root/sysadm_r/SystemLow-SystemHigh@mls:~]# grep Huge /proc/meminfo
AnonHugePages: 12288 kB
HugePages_Total: 200
HugePages_Free: 196
HugePages_Rsvd: 2
HugePages_Surp: 0
Hugepagesize: 2048 kB
-
-
Save anonymous/c8106ba77d50f87a57cbd875bbe84fbb to your computer and use it in GitHub Desktop.
Huge pages postgres in Enforcing
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For reference, I followed these instructions: https://www.postgresql.org/docs/10/static/kernel-resources.html#LINUX-HUGE-PAGES for the configuration above.