X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id C7F505364C for ; Tue, 3 May 2005 22:13:11 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 49195-05 for ; Wed, 4 May 2005 01:13:10 +0000 (GMT) Received: from hummer.onthenet.com.au (hummer.OntheNet.com.au [203.13.68.9]) by svr1.postgresql.org (Postfix) with ESMTP id C7F5153601 for ; Tue, 3 May 2005 22:13:09 -0300 (ADT) Received: from [192.168.2.26] (imp5.dsl.onthenet.net [203.144.16.135]) by hummer.onthenet.com.au (Postfix) with ESMTP id D997119FCA1 for ; Wed, 4 May 2005 11:13:10 +1000 (EST) Received: from 127.0.0.1 (AVG SMTP 7.0.308 [266.11.2]); Wed, 04 May 2005 11:12:52 +1000 Message-ID: <42782194.7040500@wildcash.com> Date: Wed, 04 May 2005 11:12:52 +1000 From: Chris Hebrard User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040616 X-Accept-Language: en-us, en To: pgsql-performance@postgresql.org Subject: Kernel Resources and max_connections X-Enigmail-Version: 0.89.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=ISO-8859-1; format=flowed X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200505/31 X-Sequence-Number: 12195 Hi, I have postgres 8.0.2 installed on FreeBSD FreeBSD 4.11-RELEASE with 2GB of RAM. When trying to set max_connections=256 I get the following error message: FATAL: could not create semaphores: No space left on device DETAIL: Failed system call was semget(5432017, 17, 03600). HINT: This error does *not* mean that you have run out of disk space. It occurs when either the system limit for the maximum number of semaphore sets (SEMMNI), or the system wide maximum number of semaphores (SEMMNS), would be exceeded. You need to raise the respective kernel parameter. Alternatively, reduce PostgreSQL's consumption of semaphores by reducing its max_connections parameter (currently 256). The PostgreSQL documentation contains more information about configuring your system for PostgreSQL. I have read through the kernel resources documentation for postgres 8 and set values accordingly. Some settings are not staying after a reboot, even if I place them in /boot/loader.conf. So far I'm able to get max_connections to 250. Here is a dump of kern.ipc values: kern.ipc.maxsockbuf: 262144 kern.ipc.sockbuf_waste_factor: 8 kern.ipc.somaxconn: 128 kern.ipc.max_linkhdr: 16 kern.ipc.max_protohdr: 60 kern.ipc.max_hdr: 76 kern.ipc.max_datalen: 136 kern.ipc.nmbclusters: 65536 kern.ipc.msgmax: 16384 kern.ipc.msgmni: 40 kern.ipc.msgmnb: 2048 kern.ipc.msgtql: 40 kern.ipc.msgssz: 8 kern.ipc.msgseg: 2048 kern.ipc.semmap: 30 kern.ipc.semmni: 256 kern.ipc.semmns: 272 kern.ipc.semmnu: 30 kern.ipc.semmsl: 60 kern.ipc.semopm: 100 kern.ipc.semume: 10 kern.ipc.semusz: 92 kern.ipc.semvmx: 32767 kern.ipc.semaem: 16384 kern.ipc.shmmax: 33554432 kern.ipc.shmmin: 1 kern.ipc.shmmni: 192 kern.ipc.shmseg: 128 kern.ipc.shmall: 8192 kern.ipc.shm_use_phys: 0 kern.ipc.shm_allow_removed: 0 kern.ipc.mbuf_wait: 32 kern.ipc.mbtypes: 38 551 3 0 0 0 0 0 0 0 0 0 0 0 0 0 kern.ipc.nmbufs: 262144 kern.ipc.nsfbufs: 8704 kern.ipc.nsfbufspeak: 7 kern.ipc.nsfbufsused: 0 kern.ipc.m_clreflimithits: 0 kern.ipc.mcl_pool_max: 0 kern.ipc.mcl_pool_now: 0 kern.ipc.maxsockets: 65536 And boot/loader.conf: userconfig_script_load="YES" kern.ipc.nmbclusters="65536" kern.maxfiles="65536" kern.maxfilesperproc="65536" net.inet.tcp.mssdflt="1460" kern.somaxconn="4096" kern.ipc.semmns="272" kern.ipc.semmni="256" kern.ipc.shmmax="66099200" kern.ipc.shmmax and kern.ipc.shmmin will not stay to what I set them to. What am I doing wrong or not doing at all? Your help is greatly appreciated. Regards, Chris. -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.11.2 - Release Date: 5/2/2005