From: | Martin Gainty <mgainty(at)hotmail(dot)com> |
---|---|
To: | <gsmith(at)gregsmith(dot)com> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Can I have a look at your TuningWizard generated config file? |
Date: | 2009-08-01 14:57:43 |
Message-ID: | BLU142-W130DAC61416594CCA62F5BAE110@phx.gbl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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: [GENERAL] Can I have a look at your TuningWizard generated config file?
From: jennifer(dot)trey(at)gmail(dot)com
To: gsmith(at)gregsmith(dot)com
CC: selenamarie(at)gmail(dot)com; pgsql-general(at)postgresql(dot)org
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 = 2097152kernel.shmmni = 4096vm.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=10486808576kernel.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
http://www.windowslive.com/online/photos?ocid=PID23393::T:WLMTAGL:ON:WL:en-US:SI_PH_software:082009
From | Date | Subject | |
---|---|---|---|
Next Message | John | 2009-08-01 15:11:12 | Re: MSSQL to PostgreSQL |
Previous Message | Isak Hansen | 2009-08-01 14:50:45 | Re: MSSQL to PostgreSQL |