From owner-freebsd-database@FreeBSD.ORG Tue Aug 26 12:34:01 2003 Return-Path: Delivered-To: freebsd-database@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4FAF016A4BF; Tue, 26 Aug 2003 12:34:01 -0700 (PDT) Received: from abe.micropat.com (abe.micropat.com [204.17.221.119]) by mx1.FreeBSD.org (Postfix) with ESMTP id A194743FE1; Tue, 26 Aug 2003 12:33:59 -0700 (PDT) (envelope-from paul@pathiakis.com) Received: from 10.0.0.101 ([204.17.221.104]) by abe.micropat.com (Netscape Messaging Server 4.15) with ESMTP id HK8RCV00.EV7; Tue, 26 Aug 2003 15:26:55 -0400 From: Paul Pathiakis To: "Marc G. Fournier" Date: Tue, 26 Aug 2003 15:33:22 -0400 User-Agent: KMail/1.5.3 References: <200308250929.32143.paul@pathiakis.com> <200308261438.29700.paul@pathiakis.com> <20030826161914.E691@ganymede.hub.org> In-Reply-To: <20030826161914.E691@ganymede.hub.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200308261533.22411.paul@pathiakis.com> cc: freebsd-database@freebsd.org cc: freebsd-performance@freebsd.org Subject: Re: Tuning Postgresql on FreeBSD 5.1 X-BeenThere: freebsd-database@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: paul@pathiakis.com List-Id: Database use and development under FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Aug 2003 19:34:01 -0000 Hi, I'm running 5.1-RELEASE. No, I didn't enable it in my kernel config. Top shows only cpu 0 and cpu 2 running. However, as the machine boots it tells me that it enables cpu 1, 2, and 3. The only thing in my kernel that I enabled is SMP and APIC_IO. Thanks! P. On Tuesday 26 August 2003 03:19 pm, Marc G. Fournier wrote: > You are running -STABLE? Did you enable HTT in your kernel config file? > > On Tue, 26 Aug 2003, Paul Pathiakis wrote: > > Marc, > > > > I've tried disabling HTT in the BIOS (it's an Intel board). I've > > disable HTT, saved the changes and the kernel is still seeing 4 CPUs when > > it boots. Any ideas? > > > > Thanks, > > > > P. > > > > On Tuesday 26 August 2003 12:44 am, Marc G. Fournier wrote: > > > > > Again, the machine is a twin 2.8 Xeon HTT machine. HTT is turned > > > > > on and the machine sees 4 cpus. > > > > > > > > Have you played with toggling the sysctl machdep.cpu_idle_hlt? > > > > > > In fact, disabled HTT altogether ... I have a machine with pretty much > > > the same specs (2.4 vs 2.8 Xeon's) and I found performance noticeably > > > improved with HTT disabled ... not just with processes, but with > > > interactive sessions as well ... > > > > > > > >From your postgresql.conf: > > > > > > > > > > shared_buffers = 48000 # min max_connections*2 or 16, 8KB > > > > > each > > > > > > > > WHOA! This is too high by a factor of about 10. You probably want a > > > > shared buffers set to 4096. > > > > > > Why? If you have the memory and all that ... All my production servers > > > run: > > > > > > /usr/local/bin/postmaster -B 40960 -N 512 -i -p 5432 > > > -D/usr/local/pgsql/5432 -S (postgres) > > > > > > > > sort_mem = 32768 # min 64, size in KB > > > > > > > > This also seems high, divide by 8 and you're at a more reasonable > > > > level. > > > > > > Again, depends on alot of things here ... if he only has the one > > > connection to the DB, allowing for 32M of RAM to be used for sorting > > > isn't a bad thing, since it keeps the sorts off of the hard drive ... > > > that is one stat that I wish we kept somehow ... "max sort size" ...