Re: How much memory is PostgreSQL using

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: "Campbell, Lance" <lance(at)illinois(dot)edu>
Cc: Greg Smith <greg(at)2ndquadrant(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: How much memory is PostgreSQL using
Date: 2010-04-03 11:58:35
Message-ID: 4BB72D6B.7080009@lelarge.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Le 02/04/2010 22:10, Campbell, Lance a écrit :
> Greg,
> Thanks for your help.
>
> 1) How does the number of buffers provided by pg_buffercache compare to
> memory (buffers * X = Y meg)?

1 buffer is 8 KB.

> 2) Is there a way to tell how many total buffers I have available/max?

With pg_buffercache, yes.

SELECT count(*)
FROM pg_buffercache
WHERE relfilenode IS NOT NULL;

should give you the number of non-empty buffers.

--
Guillaume.
http://www.postgresqlfr.org
http://dalibo.com

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message raghavendra t 2010-04-03 16:38:11 ERROR: cache lookup failed for relation X
Previous Message David Crooke 2010-04-03 05:05:14 David Crooke wants to stay in touch on LinkedIn