X-Original-To: pgsql-performance-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id D00DF9FB348 for ; Wed, 30 Aug 2006 15:22:44 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 60667-03-2 for ; Wed, 30 Aug 2006 15:22:35 -0300 (ADT) X-Greylist: delayed 06:59:39.938057 by SQLgrey- Received: from wumpus.mythic-beasts.com (wumpus.mythic-beasts.com [212.69.37.9]) by postgresql.org (Postfix) with ESMTP id 1410E9FB333 for ; Wed, 30 Aug 2006 15:22:20 -0300 (ADT) Received: from sphinx.mythic-beasts.com ([212.69.37.6]) by wumpus.mythic-beasts.com with esmtp (Exim 4.50) id 1GIUhf-0003rm-7O for pgsql-performance@postgresql.org; Wed, 30 Aug 2006 19:22:19 +0100 Received: from xelah (helo=localhost) by sphinx.mythic-beasts.com with local-esmtp (Exim 4.51) id 1GIUhe-0002F8-UG for pgsql-performance@postgresql.org; Wed, 30 Aug 2006 19:22:18 +0100 Date: Wed, 30 Aug 2006 19:22:18 +0100 (BST) From: Alex Hayward X-X-Sender: xelah@sphinx.mythic-beasts.com To: pgsql-performance@postgresql.org Subject: Re: performance problems. In-Reply-To: <20060830162657.GD81373@pervasive.com> Message-ID: References: <44F55A7F.40305@sorbs.net> <20060830162657.GD81373@pervasive.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.1 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200608/483 X-Sequence-Number: 20668 On Wed, 30 Aug 2006, Jim C. Nasby wrote: > On Wed, Aug 30, 2006 at 10:10:28AM -0400, Vivek Khera wrote: > > effective_cache_size = 27462 # `sysctl -n > > vfs.hibufspace` / 8192 (BLKSZ) > > random_page_cost = 2 > > You misunderstand how effective_cache_size is used. It's the *only* > memory factor that plays a role in cost estimator functions. This means > it should include the memory set aside for caching in shared_buffers. > > Also, hibufspace is only talking about filesystem buffers in FreeBSD, > which AFAIK has nothing to do with total memory available for caching, > since VM pages are also used to cache data. I believe it's not talking about quantities of buffers at all, but about kernel virtual address space. It's something like the amount of kernel virtual address space available for mapping buffer-cache pages in to kernel memory. It certainly won't tell you (or even approximate) how much PostgreSQL data is being cached by the OS. Cached PostgreSQL data will appear in the active, inactive and cached values - and (AFAIK) there isn't any distinction between file-backed pages and swap-backed pages amongst those.