Search Postgresql Archives

Re: Can I have a look at your TuningWizard generated config file?

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

 



cat /proc/sys/kernel/shmmax
1999999999

shmmax controls the maximum amount of memory to be allocated for shared memory,
(1,999,999,999 in this instance.)

http://ps-ax.com/shared-mem.html

concerning shmall
set shmall parameter for total amount of shared memory pages that can be used system wide
shmall could be ceil(shmmax/PAGE_SIZE)
http://www.puschitz.com/TuningLinuxForOracle.shtml#SettingSharedMemory

PAGE_SIZE determined by
$ getconf PAGE_SIZE
4096

Martin Gainty
______________________________________________
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.






Date: Sat, 1 Aug 2009 15:48:34 +0200
Subject: Re: Can I have a look at your TuningWizard generated config file?
From: jennifer.trey@xxxxxxxxx
To: gsmith@xxxxxxxxxxxxx
CC: selenamarie@xxxxxxxxx; pgsql-general@xxxxxxxxxxxxxx

Hmm.. not done quite yet it seems :(

I tried initially to set shared_buffers to 1024MB but I got this message : 

2009-08-01 15:04:46 CESTFATAL:  could not create shared memory segment: Invalid argument
2009-08-01 15:04:46 CESTDETAIL:  Failed system call was shmget(key=5432001, size=1106247680, 03600).
2009-08-01 15:04:46 CESTHINT:  This error usually means that PostgreSQL's request for a shared memory segment exceeded your kernel's SHMMAX parameter.  You can either reduce the request size or reconfigure the kernel with larger SHMMAX.  To reduce the request size (currently 1106247680 bytes), reduce PostgreSQL's shared_buffers parameter (currently 131072) and/or its max_connections parameter (currently 153).
        If the request size is already small, it's possible that it is less than your kernel's SHMMIN parameter, in which case raising the request size or reconfiguring SHMMIN is called for.

Lowered it to 64MB and same thing happen. Changed to 128kB and the server started. 

Reading on shared_buffers thing on  http://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server I can see that this seems to be something expected, but I am confused on how to fix this ... 

sysctl -a | grep -i shm
error: permission denied on key 'net.ipv4.route.flush'
error: permission denied on key 'net.ipv6.route.flush'
kernel.shmmax = 33554432
kernel.shmall = 2097152
kernel.shmmni = 4096
vm.hugetlb_shm_group = 0

I am running Ubuntu Server 9.04 so I am guessing I should be looking under Linux on  http://www.postgresql.org/docs/current/static/kernel-resources.html

I am confused about this part : 
$ sysctl -w kernel.shmmax=134217728
$ sysctl -w kernel.shmall=2097152

In addition these settings can be saved between reboots in /etc/sysctl.conf.

Should I just append that file with two lines : 

kernel.shmmax=10486808576
kernel.shmmall=?? What should be here? Leave it alone? I am thinking I shouldn't include this, only the above one... right?

Thanks in advance / Jen



Get free photo software from Windows Live Click here.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux