Skip site navigation (1) Skip section navigation (2)

Re: Linux mis-reporting memory

From: Csaba Nagy <nagy(at)ecircle-ag(dot)com>
To: Gregory Stark <stark(at)enterprisedb(dot)com>
Cc: Decibel! <decibel(at)decibel(dot)org>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Linux mis-reporting memory
Date: 2007-09-21 08:30:01
Message-ID: 1190363401.4661.116.camel@PCD12478 (view raw or flat)
Thread:
Lists: pgsql-performance
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.



In response to

Responses

pgsql-performance by date

Next:From: Gregory StarkDate: 2007-09-21 09:43:07
Subject: Re: Linux mis-reporting memory
Previous:From: Gregory StarkDate: 2007-09-21 08:03:04
Subject: Re: Linux mis-reporting memory

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group