PostgreSQL's share_buffer calculation using shmget() versus kernel.shmmax

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



All,

I'm wondering about how postgresql calculates the value for shared buffers as I see some discrepancies with what the following script provides versus what is recommended in the pgctl.log when the database fails to start.

#!/bin/bash
# simple shmsetup script
page_size=`getconf PAGE_SIZE`
phys_pages=`getconf _PHYS_PAGES`
shmall=`expr $phys_pages / 2`
shmmax=`expr $shmall \* $page_size` 
echo kernel.shmmax = $shmmax
echo kernel.shmall = $shmall

Any pointers which would explain these differences would be greatly appreciate. Ultimately, I'd like to calculate the expected kernel.shmmax which matches postgresql's shmget() call.

TIA,

Mel 

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux