pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Csaba Nagy <nagy@ecircle-ag.com>
To: Gregory Stark <stark@enterprisedb.com>
Cc: Decibel! <decibel@decibel.org>
Cc: pgsql-performance@postgresql.org
Subject: Re: Linux mis-reporting memory
Date: Fri, 21 Sep 2007 10:30:01 +0200
Message-ID: <1190363401.4661.116.camel@PCD12478> (raw)
In-Reply-To: <87r6ksa1jb.fsf@oxford.xeocode.com>
References: <20070920230400.GM95343@decibel.org>
	<16213.1190329934@sss.pgh.pa.us>
	<87r6ksa1jb.fsf@oxford.xeocode.com>

On Fri, 2007-09-21 at 09:03 +0100, Gregory Stark wrote:
> >> Mem:  32945280k total, 32871832k used,    73448k free,   247432k buffers
> >> Swap:  1951888k total,    42308k used,  1909580k free, 30294300k cached
> >
> It seems to imply Linux is paging out sysV shared memory. In fact some of
> Heikki's tests here showed that Linux would do precisely that.

But then why is it not reporting that in the "Swap: used" section ? It
only reports 42308k used swap. 

I have a box where I just executed 3x a select count(*) from a table
which has ~5.5 GB size on disk, and the count executed in <4 seconds,
which I take as it is all cached (shared memory is set to 12GB - I use
the box for testing for now, otherwise I would set it far lower because
I have bad experience with setting it more than 1/3 of the available
memory). Top reported at the end of the process:

Mem:  16510724k total, 16425252k used,    85472k free,    10144k buffers
Swap:  7815580k total,   157804k used,  7657776k free, 15980664k cached

I also watched it during the selects, but it was not significantly
different. So my only conclusion is that the reported "cached" value is
either including the shared memory or is simply wrong... or I just don't
get how linux handles memory.

Cheers,
Csaba.





view thread (16+ messages)  latest in thread

Message-ID: <1190363401.4661.116.camel@PCD12478>
Permalink:  ../1190363401.4661.116.camel@PCD12478/
Also on:    postgresql.org/message-id/1190363401.4661.116.camel@PCD12478

 · 

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: nagy@ecircle-ag.com, stark@enterprisedb.com, decibel@decibel.org
  Subject: Re: Linux mis-reporting memory
  In-Reply-To: <1190363401.4661.116.camel@PCD12478>

* 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