From owner-freebsd-questions@FreeBSD.ORG Fri Oct 26 08:46:41 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6431416A418 for ; Fri, 26 Oct 2007 08:46:41 +0000 (UTC) (envelope-from lists@lozenetz.org) Received: from mail.webreality.org (mailserver.webreality.org [217.75.141.5]) by mx1.freebsd.org (Postfix) with ESMTP id CE4B413C48E for ; Fri, 26 Oct 2007 08:46:39 +0000 (UTC) (envelope-from lists@lozenetz.org) Received: from [10.0.1.100] (unknown [87.121.18.230]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.webreality.org (Postfix) with ESMTP id 35225FFE114; Fri, 26 Oct 2007 11:31:01 +0300 (EEST) Message-ID: <4721A5C1.9070309@lozenetz.org> Date: Fri, 26 Oct 2007 11:30:57 +0300 From: Anton - Valqk User-Agent: Icedove 1.5.0.10 (X11/20070329) MIME-Version: 1.0 To: freebsd-questions@FreeBSD.ORG, hoschi@mouhaha.de, freebsd-jail@FreeBSD.ORG References: <200710251438.l9PEcrwe063070@lurza.secnetix.de> In-Reply-To: <200710251438.l9PEcrwe063070@lurza.secnetix.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-HostIT-MailScanner-Information: Please contact the ISP for more information X-HostIT-MailScanner: Found to be clean X-HostIT-MailScanner-From: lists@lozenetz.org Cc: Subject: Re: multiple postgresql servers in multiple jails? 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: Fri, 26 Oct 2007 08:46:41 -0000 You can alternatively set the SEM* and SHMMAX in the loader.conf. I have a server runing two pgs. #> cat /boot/loader.conf kern.ipc.semmni=256 kern.ipc.semmns=512 kern.ipc.semmnu=256 kern.ipc.semmap=256 Oliver Fromme wrote: > Oliver Peter wrote: > > Oliver Fromme wrote: > > > Oliver Peter wrote: > > > > Does anybody have a running system with more than one jail hosting > > > > more than one postgres server? > > > > > > Yes, you must configure them to use different port numbers, > > > because the SysV IPC IDs are derived from the port number. > > > If you try to run both servers with the default port, you'll > > > get a conflict. Configure different port numbers, and it > > > will work. > > > > Thanks for that hint. After changing the port numbers for each > > instance to a different one, it works - but only at first glance. > > After making some test creates and inserts to all servers at the same > > time I receive the 'out of memory' messages again... > > Different UIDs, different ports, same error. > > Can you please give the output from "ipcs -M" and "ipcs -p"? > > The latter shows the process IDs of the creator (CPID) and > last user (LPID) of shared memory resources. You can look > up the jails in which those processes are running, so to > make sure that none of the resources was taken over by a > different jail. > > The "jps" script could be useful: > > http://www.secnetix.de/~olli/scripts/jps > > By the way, "ipcs -bm" displays the shared memory segment > sizes. > > > > By the way, the PostgreSQL developers do _not_ recommend to > > > run multiple servers on the same machine, because of bad > > > efficiency. It is much better (performance-wise) to run > > > all databases within the same server engine. PostgreSQL > > > has all the authentication and permission features you need > > > to separate multiple databases within a single server, so > > > there is really no need to use multiple jails. > > > > Of course I understand that. But I would like to setup a test server > > in a different jail beside my production jail/pgsql-server to be sure > > not to crash my production server. > > Performance does not matter (at this time in this specific case of > > course!). > > I see. In that case it is probably OK. > > > > I have these on a machine with a single PostgreSQL server, > > > as per recommendations of the developers: > > > > > > options SHMMAXPGS=65536 > > > options SEMMAP=1024 > > > options SEMMNI=64 > > > options SEMMNS=1024 > > > options SEMUME=64 > > > options SEMMNU=128 > > > > Is this a good recommendation for a machine with only 1GB of RAM? > > In fact, the above lines are from a machine with 256 MB RAM. > For 1 GB you can probably double the number of shared memory > pages (SHMMAXPGS value). The semaphore values (SEM*) should > be sufficient in either case, I think. > > Best regards > Oliver > > -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.