X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 855CCD6D71 for ; Tue, 11 Oct 2005 12:01:39 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 21956-02 for ; Tue, 11 Oct 2005 15:01:36 +0000 (GMT) Received: from smtp-gw-cl-c.dmv.com (smtp-gw-cl-c.dmv.com [216.240.97.41]) by svr1.postgresql.org (Postfix) with ESMTP id 25D27D722D for ; Tue, 11 Oct 2005 12:01:35 -0300 (ADT) Received: from mail-gw-cl-a.dmv.com (mail-gw-cl-a.dmv.com [216.240.97.38]) by smtp-gw-cl-c.dmv.com (8.12.10/8.12.10) with ESMTP id j9BF1PQb074223; Tue, 11 Oct 2005 11:01:25 -0400 (EDT) (envelope-from sven@dmv.com) Received: from lanshark.dmv.com (lanshark.dmv.com [216.240.97.46]) by mail-gw-cl-a.dmv.com (8.12.9/8.12.9) with ESMTP id j9BF1PLR019756; Tue, 11 Oct 2005 11:01:25 -0400 (EDT) (envelope-from sven@dmv.com) Subject: Re: effective cache size on FreeBSD (WAS: Performance on SUSE w/ From: Sven Willenberger To: Claus Guttesen Cc: Jon Brisbin , pgsql-performance@postgresql.org In-Reply-To: References: Content-Type: text/plain Date: Tue, 11 Oct 2005 11:04:24 -0400 Message-Id: <1129043064.1975.22.camel@lanshark.dmv.com> Mime-Version: 1.0 X-Mailer: Evolution 2.2.1.1 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.39 X-Scanned-By: MIMEDefang 2.48 on 216.240.97.38 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.33 required=5 tests=[AWL=-0.162, DNS_FROM_RFC_WHOIS=0.492] X-Spam-Level: X-Archive-Number: 200510/199 X-Sequence-Number: 14967 On Tue, 2005-10-11 at 16:54 +0200, Claus Guttesen wrote: > > > I have a postgresql 7.4.8-server with 4 GB ram. > > > #effective_cache_size = 1000 # typically 8KB each > > > > > > This is computed by sysctl -n vfs.hibufspace / 8192 (on FreeBSD). So I > > > changed it to: > > > > > > effective_cache_size = 27462 # typically 8KB each > > > > Apparently this formula is no longer relevant on the FreeBSD systems as > > it can cache up to almost all the available RAM. With 4GB of RAM, one > > could specify most of the RAM as being available for caching, assuming > > that nothing but PostgreSQL runs on the server -- certainly 1/2 the RAM > > would be a reasonable value to tell the planner. > > > > (This was verified by using dd: > > dd if=/dev/zero of=/usr/local/pgsql/iotest bs=128k count=16384 to create > > a 2G file then > > dd if=/usr/local/pgsql/iotest of=/dev/null > > > > If you run systat -vmstat 2 you will see 0% diskaccess during the read > > of the 2G file indicating that it has, in fact, been cached) > > Thank you for your reply. Does this apply to FreeBSD 5.4 or 6.0 on > amd64 (or both)? > Not sure about 6.0 (but I don't know why it would change) but definitely on 5.4 amd64 (and I would imagine i386 as well). Sven