Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id E63879FB36C for ; Mon, 26 Feb 2007 12:52:50 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 73968-07 for ; Mon, 26 Feb 2007 12:52:45 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from floppy.pyrenet.fr (news.pyrenet.fr [194.116.145.2]) by postgresql.org (Postfix) with ESMTP id 90E689FB336 for ; Mon, 26 Feb 2007 12:52:44 -0400 (AST) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id 706D830B2A; Mon, 26 Feb 2007 17:52:42 +0100 (MET) From: Mark Stosberg X-Newsgroups: pgsql.performance Subject: low memory usage reported by 'top' indicates poor tuning? Date: Mon, 26 Feb 2007 11:52:09 -0500 Organization: Hub.Org Networking Services Lines: 37 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@news.hub.org User-Agent: Thunderbird 1.5.0.8 (X11/20061109) To: pgsql-performance@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.235 tagged_above=0 required=5 tests=AWL, BAYES_50 X-Spam-Level: X-Archive-Number: 200702/297 X-Sequence-Number: 23351 Hello, I'm trying to make sense of the memory usage reported by 'top', compared to what "pg_database_size" shows. Here's one result: select pg_size_pretty(pg_database_size('production')); pg_size_pretty ---------------- 6573 MB Now, looking at memory use with "top", there is a lot memory that isn't being used on the system: Mem: 470M Active, 2064M Inact ( 3 Gigs RAM, total ). Overall performance is decent, so maybe there's no problem. However, I wonder if we've under-allocated memory to PostgreSQL. (This is a dedicated FreeBSD DB server). Some memory settings include: shared_buffers = 8192 (we have 450 connections) max_fsm_pages = 1250000 (we kept getting HINTs to bump it, so we did) Maybe we should be bumping up the "sort_mem" and "vacuum_mem" as well? I do sometimes see sorting and vacuuming as showing up as things I'd like to run faster. This list has been a great resource for performance tuning help, and I continue to appreciate your help. We've used PostgreSQL on every project we've had a choice on for the last 10 years. (Has it been that long?!) We've never regretted it once. Mark