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 86593D7147 for ; Tue, 11 Oct 2005 11:54:28 -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 88598-09 for ; Tue, 11 Oct 2005 14:54:24 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.201]) by svr1.postgresql.org (Postfix) with ESMTP id 6EA15D7055 for ; Tue, 11 Oct 2005 11:54:26 -0300 (ADT) Received: by wproxy.gmail.com with SMTP id i20so679745wra for ; Tue, 11 Oct 2005 07:54:31 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:mime-version:content-type:content-transfer-encoding:content-disposition; b=T1oHGcnYwyp7rTOxZJ3JuIUk6P8DDusaxYdx6rS2GPjY+54ML0IuuzqENFiyM34Xd6wzStriEHstYOfbCyas3n70jvIdKx5815qUNYp1N0WE0MJlTy5wICoTk8oUVld2KgRxUJGJ56hZZ2m+L3F6FMlw/9MlDd6QKGi8G5rfQHg= Received: by 10.54.99.18 with SMTP id w18mr3590387wrb; Tue, 11 Oct 2005 07:54:31 -0700 (PDT) Received: by 10.54.144.4 with HTTP; Tue, 11 Oct 2005 07:54:31 -0700 (PDT) Message-ID: Date: Tue, 11 Oct 2005 16:54:31 +0200 From: Claus Guttesen To: Sven Willenberger Subject: effective cache size on FreeBSD (WAS: Performance on SUSE w/ reiserfs) Cc: Jon Brisbin , pgsql-performance@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.024 required=5 tests=[RCVD_BY_IP=0.024] X-Spam-Level: X-Archive-Number: 200510/197 X-Sequence-Number: 14965 > > I have a postgresql 7.4.8-server with 4 GB ram. > > #effective_cache_size =3D 1000 # typically 8KB each > > > > This is computed by sysctl -n vfs.hibufspace / 8192 (on FreeBSD). So I > > changed it to: > > > > effective_cache_size =3D 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=3D/dev/zero of=3D/usr/local/pgsql/iotest bs=3D128k count=3D16384 to= create > a 2G file then > dd if=3D/usr/local/pgsql/iotest of=3D/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)? regards Claus