8GB = memory=8589934592
python pgtune \ -i /etc/postgresql/9.2/main/postgresql.conf \ -o postgresql.conf \ --memory=8589934592 \ --type=Desktop \ --connections=10
---------------------------------------------------------------------
http://dbasolutions.wikispaces.com/SHMMAX+and+SHMALL
Configuring SHMMAX and SHMALL for Oracle in Linux
SHMMAX and SHMALL -
SHMMAX is the maximum size of a single shared memory segment set in “bytes”.
silicon:~ # cat /proc/sys/kernel/shmmax536870912
536870912 = 512 kB -> (512 * 1024 * 1024)
SHMALL is the total size of Shared Memory Segments System wide set in “pages”.silicon:~ # cat /proc/sys/kernel/shmall
1415577
==============================================================================================The key thing to note here is the value of SHMMAX is set in "bytes" but the value of SHMMALL is set in "pages".==============================================================================================
What’s the optimal value for SHMALL?
Determine Page Size first, can be done in two ways. In my case it’s 4096 and that’s the recommended and default in most cases which you can keep the same.
silicon :~ # getconf PAGE_SIZE
4096or
silicon:~ # cat /proc/sys/kernel/shmmni4096
Convert 5GB into bytes and divide by page size, I used the linux calc to do the math.
5GB = ( 5 * 1024 * 1024 * 1024 ) bytes = 5368709120
-> shmmax (bytes) = ( 5 * 1024 * 1024 * 1024 ) = 5368709120-> shmall (pages) = ( 5 * 1024 * 1024 * 1024 )/ pagesize = ( 5 * 1024 * 1024 * 1024 )/ 4096 = 1310720
Brak komentarzy:
Prześlij komentarz