From owner-freebsd-questions@FreeBSD.ORG Wed Aug 27 19:42:22 2008 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 4ABD21065671 for ; Wed, 27 Aug 2008 19:42:22 +0000 (UTC) (envelope-from andrewlylegould@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.232]) by mx1.freebsd.org (Postfix) with ESMTP id 2492B8FC26 for ; Wed, 27 Aug 2008 19:42:21 +0000 (UTC) (envelope-from andrewlylegould@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so24736rvf.43 for ; Wed, 27 Aug 2008 12:42:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=KbQhPp2sMP7VeKcz2lwWMG7ZFhGMlMDlpIy+vcAF2tA=; b=F2Y+3SCnqm2Xf5leXTKICvaH1cfz4EHbUY8csM7eWJO1MmeS/GBJnjz4Xkol0E0KjE Wb3+1B7uR+eNRH1qQjlSTGyT/of9sF1O98afLczqwh3J2dHEMciP7MXhnnCqB1vt83Ah 11Z0+iiTs+bOaAO9wbZGlVPPD6BNDYlulkiU8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=F660yourmwuFLIADFmtt33yoPwGx0nSU5g/rHLxQ1RnAShwinpCqAf9aS7ibRDYKIs Q1HtFgqSl8LHN/BTJ6RPFbjbL8LQampEWYDo0k0YfLRimdmhi5Rz96rv7qyBY0kg7z+W hDVI9rXFCBDVI3jmkmtZEfmpXXQUXaS88Mxo8= Received: by 10.140.136.6 with SMTP id j6mr223363rvd.231.1219866140542; Wed, 27 Aug 2008 12:42:20 -0700 (PDT) Received: by 10.141.87.10 with HTTP; Wed, 27 Aug 2008 12:42:20 -0700 (PDT) Message-ID: Date: Wed, 27 Aug 2008 14:42:20 -0500 From: "Andrew Gould" To: Albert.Shih@obspm.fr In-Reply-To: <20080827191057.GA46302@pcjas.obspm.fr> MIME-Version: 1.0 References: <20080827191057.GA46302@pcjas.obspm.fr> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-questions@freebsd.org Subject: Re: kern.ipc.sem* and postgresql 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: Wed, 27 Aug 2008 19:42:22 -0000 On Wed, Aug 27, 2008 at 2:10 PM, Albert Shih wrote: > Hi all > > Classic question but I don't find the answers by google. > > If I've server with X procs, N Go ram and if the only purpose of this > server is to run a postgresql daemon how can I known/calculate what I mus= t > give to those variable > > set kern.ipc.semmni=3D? > set kern.ipc.semmns=3D? > set kern.ipc.semmnu=3D? > > and > > kern.ipc.shmall=3D? > kern.ipc.shmmax=3D? > kern.ipc.semmap=3D? > > Once those variables is determined how can I known/calculate the variable > in postgresql.conf ? > > shared_buffers =3D 32MB # min 128kB or max_connections*= 16kB > # (change requires restart) > #temp_buffers =3D 8MB # min 800kB > #max_prepared_transactions =3D 5 # can be 0 or more > # (change requires restart) > # Note: Increasing max_prepared_transactions costs ~600 bytes of shared > # memory > # per transaction slot, plus lock space (see max_locks_per_transaction). > #work_mem =3D 1MB # min 64kB > #maintenance_work_mem =3D 16MB # min 1MB > #max_stack_depth =3D 2MB # min 100kB > # - Free Space Map - > max_fsm_pages =3D 204800 # min max_fsm_relations*16, 6 b= ytes > each > # (change requires restart) > #max_fsm_relations =3D 1000 # min 100, ~70 bytes each > # (change requires restart) > > # - Kernel Resource Usage - > > #max_files_per_process =3D 1000 # min 25 > > ? > > Regards. > > JAS > -- > Albert SHIH > SIO batiment 15 > Observatoire de Paris Meudon > 5 Place Jules Janssen > 92195 Meudon Cedex > Heure local/Local time: > Mer 27 ao=FB 2008 21:06:02 CEST I used to perform financial/clinical data analysis using a PostgreSQL serve= r on FreeBSD, which entailed complex questions and a lot of data processing per query. I adjusted the PostgreSQL server using the configuration files; but never found a need to adjust the FreeBSD kernel. You can find information to help you at the links below. Managing Kernel Resources section of the manual: http://www.postgresql.org/docs/current/static/kernel-resources.html Hardware performance tuning section of the PostgreSQL manual: http://www.postgresql.org/files/documentation/books/aw_pgsql/hw_performance= / Global User Configuration Guide at Varlena's website: http://www.varlena.com/varlena/GeneralBits/Tidbits/annotated_conf_e.html Best of luck, Andrew