From owner-freebsd-bugs@FreeBSD.ORG Thu Feb 10 17:50:17 2005 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 958CB16A4D3 for ; Thu, 10 Feb 2005 17:50:17 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4BD9E43D3F for ; Thu, 10 Feb 2005 17:50:17 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id j1AHoHM3036876 for ; Thu, 10 Feb 2005 17:50:17 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id j1AHoHOv036875; Thu, 10 Feb 2005 17:50:17 GMT (envelope-from gnats) Resent-Date: Thu, 10 Feb 2005 17:50:17 GMT Resent-Message-Id: <200502101750.j1AHoHOv036875@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Robert Millan Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0364816A4CE for ; Thu, 10 Feb 2005 17:49:06 +0000 (GMT) Received: from khazad.dyndns.org (137.red-62-57-138.user.auna.net [62.57.138.137]) by mx1.FreeBSD.org (Postfix) with ESMTP id A145E43D1F for ; Thu, 10 Feb 2005 17:49:05 +0000 (GMT) (envelope-from rmh@khazad.dyndns.org) Received: from rmh by khazad.dyndns.org with local (Exim 4.34) id 1CzILG-0007uH-MH for FreeBSD-gnats-submit@freebsd.org; Thu, 10 Feb 2005 18:43:02 +0100 Message-Id: Date: Thu, 10 Feb 2005 18:43:02 +0100 From: Robert Millan To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: kern/77353: grow SysV IPC kernel limits X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Robert Millan List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Feb 2005 17:50:17 -0000 >Number: 77353 >Category: kern >Synopsis: grow SysV IPC kernel limits >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Feb 10 17:50:14 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Robert Millan >Release: GNU/kFreeBSD 5.3-3 i686 >Organization: Debian >Environment: System: GNU/kFreeBSD aragorn 5.3-3 #0: Thu Feb 10 15:39:57 CET 2005 i686 GNU/KFreeBSD postgresql documentation encourages to grow SysV IPC limits on *BSD systems. I have verified that the GENERIC limits on SysV IPC are too low to be able to run postgresql. Please adjust them as the documentation recommends: The options SYSVSHM and SYSVSEM need to be enabled when the kernel is compil ed. (They are by default.) The maximum size of shared memory is determined by th e option SHMMAXPGS (in pages). The following shows an example of how to set the various parameters: options SYSVSHM options SHMMAXPGS=4096 options SHMSEG=256 options SYSVSEM options SEMMNI=256 options SEMMNS=512 options SEMMNU=256 options SEMMAP=256 (On NetBSD and OpenBSD the key word is actually option singular.) You might also want to configure your kernel to lock shared memory into RAM and prevent it from being paged out to swap. Use the sysctl setting kern.ipc.shm _use_phys. >Description: >How-To-Repeat: >Fix: --- src/sys/i386/conf/GENERIC~ 2005-02-01 21:44:25.000000000 +0100 +++ src/sys/i386/conf/GENERIC 2005-02-01 21:47:12.000000000 +0100 @@ -49,8 +49,14 @@ options SCSI_DELAY=15000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) support options SYSVSHM # SYSV-style shared memory +options SHMMAXPGS=4096 +options SHMSEG=256 options SYSVMSG # SYSV-style message queues options SYSVSEM # SYSV-style semaphores +options SEMMNI=256 +options SEMMNS=512 +options SEMMNU=256 +options SEMMAP=256 options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extension s options KBD_INSTALL_CDEV # install a CDEV entry in /dev options AHC_REG_PRETTY_PRINT # Print register bitfields in debug >Release-Note: >Audit-Trail: >Unformatted: