From owner-freebsd-questions@FreeBSD.ORG Mon Mar 20 21:33:41 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 9491416A422 for ; Mon, 20 Mar 2006 21:33:41 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from pi.codefab.com (pi.codefab.com [199.103.21.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id 35E2443D49 for ; Mon, 20 Mar 2006 21:33:41 +0000 (GMT) (envelope-from cswiger@mac.com) Received: from localhost (localhost [127.0.0.1]) by pi.codefab.com (Postfix) with ESMTP id 95CFA5F1A; Mon, 20 Mar 2006 16:33:40 -0500 (EST) Received: from pi.codefab.com ([127.0.0.1]) by localhost (pi.codefab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 78017-05; Mon, 20 Mar 2006 16:33:39 -0500 (EST) Received: from [199.103.21.238] (pan.codefab.com [199.103.21.238]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by pi.codefab.com (Postfix) with ESMTP id 943C95CFC; Mon, 20 Mar 2006 16:33:39 -0500 (EST) In-Reply-To: <441F1E9F.8000408@123.com.sv> References: <441F125F.8030101@123.com.sv> <2F7CD998-9048-4299-BEED-9CA475787B2B@mac.com> <441F1E9F.8000408@123.com.sv> Mime-Version: 1.0 (Apple Message framework v746.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Charles Swiger Date: Mon, 20 Mar 2006 16:33:38 -0500 To: Miguel X-Mailer: Apple Mail (2.746.3) X-Virus-Scanned: amavisd-new at codefab.com 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:33:41 -0000 On Mar 20, 2006, at 4:29 PM, Miguel wrote: >> 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 OK. You probably want to tune the SGA or whatever Postgres calls it to 512-768 MB, then, but I will happily defer to someone more familiar with that particular database. >> 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 Look at NOTES, specificly here: # Set the number of PV entries per process. Increasing this can # stop panics related to heavy use of shared memory. However, that can # (combined with large amounts of physical memory) cause panics at # boot time due the kernel running out of VM space. # # If you're tweaking this, you might also want to increase the sysctls # "vm.v_free_min", "vm.v_free_reserved", and "vm.v_free_target". # # The value below is the one more than the default. # options PMAP_SHPGPERPROC=201 # # Change the size of the kernel virtual address space. Due to # constraints in loader(8) on i386, this must be a multiple of 4. # 256 = 1 GB of kernel address space. Increasing this also causes # a reduction of the address space in user processes. 512 splits # the 4GB cpu address space in half (2GB user, 2GB kernel). # options KVA_PAGES=260 -- -Chuck