pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Arnau <arnaulist@andromeiberica.com>
To: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: A question about memory usage
Date: Tue, 12 Jun 2007 19:26:56 +0200
Message-ID: <466ED760.6060202@andromeiberica.com> (raw)

Hi all,

   I have a server with 4GB of RAM and I wanted to know how much memory
is being used by a PostgreSQL. To do so I have executed the following:

   ps -A -o rss,vsz,command|grep postgres | awk '{rss += $1; vsz += $2 }
END { print "Real: ",rss/1024"MB Virtual: ",vsz/1024"MB" }'

And the result is:
   Real:  157.59MB Virtual:  6359.04MB

So I understand that amount of virtual memory must be swapped to disk as
it's bigger that my physical memory. To check this I have executed the
free command and I get the following results:

         total         used       free     shared    buffers     cached
Mem:   4153180     3988536     164644          0     161400    3117900
-/+ buffers/cache:  709236    3443944
Swap:      6215672      64    6215608

   So my question is, what I'm doing wrong? because the swap it's almost
empty

Thank you very much
-- 
Arnau



view thread (5+ messages)  latest in thread

Message-ID: <466ED760.6060202@andromeiberica.com>
Permalink:  ../466ED760.6060202@andromeiberica.com/
Also on:    postgresql.org/message-id/466ED760.6060202@andromeiberica.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: arnaulist@andromeiberica.com
  Subject: Re: A question about memory usage
  In-Reply-To: <466ED760.6060202@andromeiberica.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox