X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.192]) by svr1.postgresql.org (Postfix) with ESMTP id 63B24CC40B for ; Tue, 15 Jul 2003 17:10:10 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr4.postgresql.org [64.117.224.192]) (amavisd-new, port 10024) with ESMTP id 39051-09 for ; Tue, 15 Jul 2003 17:10:38 +0000 (GMT) Received: from domain.com (unknown [208.254.142.2]) by svr1.postgresql.org (Postfix) with SMTP id 72FA4CB571 for ; Tue, 15 Jul 2003 14:10:08 -0300 (ADT) Received: (qmail 72648 invoked from network); 15 Jul 2003 17:10:36 -0000 Received: from unknown (HELO localhost) (127.0.0.1) by localhost.uu.net with SMTP; 15 Jul 2003 17:10:36 -0000 Received: from showie ([172.18.7.196] [172.18.7.196]) by mail1.centwire.com (VaMailArmor-2.0.1.7) id 72609-790785AE; Tue, 15 Jul 2003 12:10:33 -0500 Message-ID: <005e01c34af4$9578e670$c40712ac@showie> From: "Stephen Howie" To: "Vivek Khera" , References: <012701c34a14$9b60ce80$c40712ac@showie> <200307141702.25620.dev@archonet.com> <017201c34a2c$a4fd5c70$c40712ac@showie> Subject: Re: Tunning FreeeBSD and PostgreSQL Date: Tue, 15 Jul 2003 12:14:43 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-AntiVirus: checked by Vexira MailArmor (version: 2.0.1.7; VAE: 6.20.0.1; VDF: 6.20.0.38; host: mail2.centwire.com) X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/234 X-Sequence-Number: 2527 Vivek, Thanks, for your reply. May I ask what you system setup is like (i.e. memory and such)? ----- Original Message ----- From: "Vivek Khera" Newsgroups: ml.postgres.performance To: Sent: Tuesday, July 15, 2003 11:44 AM Subject: Re: [PERFORM] Tunning FreeeBSD and PostgreSQL > >>>>> "SH" == Stephen Howie writes: > > SH> Richard- > SH> That was very helpfull Thanks! > SH> I still would like some guidance on tunning FreeBSD (shmmax and shmmaxpgs). > SH> Do I need to even touch these settings? > > Here's what I use on FreeBSD 4.7/4.8. The kernel settings don't hurt > anything being too large for the SHM values, since they are limits, > not anything pre-allocated (from my understanding). These settings > allow for up to 100,000 shared buffers (I currently only use 30,000 > buffers) > > > options SYSVMSG #SYSV-style message queues > > # only purpose of this box is to run PostgreSQL, which needs tons of shared > # memory, and some semaphores. > # Postgres allocates buffers in 8k chunks, so tell Postgres to use about > # 150 fewer than SHMMAXPGS/2 buffers to leave some room for other Postgres > # shared memory needs. > options SYSVSHM #SYSV-style shared memory > # Maximum number of shared memory pages system wide. > options SHMALL=262144 > # Maximum size, in pages (4k), of a single System V shared memory region. > options SHMMAXPGS=262144 > > # only need semaphores for PostgreSQL > options SYSVSEM #SYSV-style semaphores > # Maximum number of System V semaphores that can be used on the system at > # one time. > options SEMMNI=32 > # Total number of semaphores system wide > options SEMMNS=512 > # Maximum number of entries in a semaphore map. > options SEMMAP=256 > > > Also, in /etc/sysctl.conf I put > > # need lots of files for database > kern.maxfiles=8000 > # tuning for PostgreSQL > kern.ipc.shm_use_phys=1 > > > > -- > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= > Vivek Khera, Ph.D. Khera Communications, Inc. > Internet: khera@kciLink.com Rockville, MD +1-240-453-8497 > AIM: vivekkhera Y!: vivek_khera http://www.khera.org/~vivek/ > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster > >