low memory usage reported by 'top' indicates poor tuning?

From: Mark Stosberg <mark(at)summersault(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: low memory usage reported by 'top' indicates poor tuning?
Date: 2007-02-26 16:52:09
Message-ID: erv38o$1su3$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Joshua D. Drake 2007-02-26 17:04:00 Re: Writting a "search engine" for a pgsql DB
Previous Message Kris Jurka 2007-02-26 16:45:24 Re: does prepareThreshold work? forced to use old driver