pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Craig A. James <cjames@modgraph-usa.com>
To: mcelroy, tim <tim.mcelroy@bostonstock.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Memory and/or cache issues?
Date: Fri, 05 May 2006 07:51:26 -0700
Message-ID: <445B666E.6000908@modgraph-usa.com> (raw)
In-Reply-To: <0C4841B42F87D51195BD00B0D020F5CB044B2611@MORPHEUS>
References: <0C4841B42F87D51195BD00B0D020F5CB044B2611@MORPHEUS>

mcelroy, tim wrote:
> Sorry, been up all night and maybe provided too much information or not 
> the right information and only confused folks, tired I guess.  When I 
> say 'in use' I am referring to the 'used' column.  Thanks all who have 
> responded to this inquiry, I appreciate it.
> 
> Here's free from PROD001:
> [root@wbibsngwyprod001 kernel]# free -k -t
>              total       used       free     shared    buffers     cached
> Mem:       7643536    6975772     667764          0     165496    5393396
> -/+ buffers/cache:    1416880    6226656
> Swap:      8185108       5208    8179900
> Total:    15828644    6980980    8847664

On Linux (unlike most Unix systems), "used" includes both processes AND the kernel's file-system buffers, which means "used" will almost always be close to 100%.  Starting with a freshly-booted system, you can issue almost any command that scans files, and "used" will go up and STAY at nearly 100% of memory.  For example, reboot and try "tar cf - / >/dev/null" and you'll see the same sort of "used" numbers.

In My Humble Opinion, this is a mistake in Linux.  This confuses just about everyone the first time they see it (including me), because the file-system buffers are dynamic and will be relenquished by the kernel if another process needs memory.  On Unix systems, "used" means, "someone else is using it and you can't have it", which is what most of us really want to know.

Craig



view thread (27+ messages)  latest in thread

Message-ID: <445B666E.6000908@modgraph-usa.com>
Permalink:  ../445B666E.6000908@modgraph-usa.com/
Also on:    postgresql.org/message-id/445B666E.6000908@modgraph-usa.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-performance@postgresql.org
  Cc: cjames@modgraph-usa.com, tim.mcelroy@bostonstock.com
  Subject: Re: Memory and/or cache issues?
  In-Reply-To: <445B666E.6000908@modgraph-usa.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