From owner-freebsd-questions@FreeBSD.ORG Mon Mar 20 21:25:25 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6C20A16A420 for ; Mon, 20 Mar 2006 21:25:25 +0000 (UTC) (envelope-from mmiranda@123.com.sv) Received: from asgard1.americatelsal.com (asgard2.americatelsal.com [200.13.161.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id B835F43D48 for ; Mon, 20 Mar 2006 21:25:24 +0000 (GMT) (envelope-from mmiranda@123.com.sv) Received: (qmail 59059 invoked from network); 20 Mar 2006 21:48:04 -0000 Received: from unknown (HELO ?192.168.10.124?) (200.13.161.68) by asgard1.americatelsal.com with SMTP; 20 Mar 2006 21:48:04 -0000 Message-ID: <441F1E9F.8000408@123.com.sv> Date: Mon, 20 Mar 2006 15:29:03 -0600 From: Miguel User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Charles Swiger References: <441F125F.8030101@123.com.sv> <2F7CD998-9048-4299-BEED-9CA475787B2B@mac.com> In-Reply-To: <2F7CD998-9048-4299-BEED-9CA475787B2B@mac.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: setting shmmax for postgres X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Mar 2006 21:25:25 -0000 Charles Swiger wrote: > On Mar 20, 2006, at 3:36 PM, Miguel wrote: > >> shiva2# sysctl -a kern.ipc.shmmax >> kern.ipc.shmmax: 2147483647 > Opss, typo here, its 1147483647 >> >> but postgres always fails with this error >> >> The PostgreSQL documentation contains more information about shared >> memory configuration. >> FATAL: could not create shared memory segment: Cannot allocate memory >> DETAIL: Failed system call was shmget(key=5432001, size=1149067264, >> 03600). >> HINT: This error usually means that PostgreSQL's request for a >> shared memory segment exceeded available memory or swap space. To >> reduce the request size (currently 1149067264 bytes), reduce >> PostgreSQL's shared_buffers parameter (currently 137626) and/or its >> max_connections parameter (currently 200). > > > Just how much RAM do you have in the machine? I don't think you can > allocate more than 256MB or so to SysV shared memory without tuning > the number of KVA pages being allocated to the kernel...? Maybe it > depends on whether the SysV shmem segments are wired down by default > or not, I think there's a sysctl which controls that. I have 3G of RAM > > You should revert Postgres back to a more reasonable default shared > region size for now and rebuild the kernel to increase these > parameters if you actually have the RAM and the need to do so. > > -- > -Chuck what parameters? I cant find any related in GENERIC --- Miguel