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

Re: Linux mis-reporting memory

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Decibel! <decibel(at)decibel(dot)org>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Linux mis-reporting memory
Date: 2007-09-20 23:12:14
Message-ID: 16213.1190329934@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-performance
Decibel! <decibel(at)decibel(dot)org> writes:
> I'm finding this rather interesting report from top on a Debian box...

> Mem:  32945280k total, 32871832k used,    73448k free,   247432k buffers
> Swap:  1951888k total,    42308k used,  1909580k free, 30294300k cached

> So how is it that linux thinks that 30G is cached?

Why would you think that a number reported by the operating system has
something to do with Postgres' shared memory?

I might be mistaken, but I think that in this report "cached" indicates
the amount of memory in use for kernel disk cache.  (No idea what the
separate "buffers" entry means, but it's obviously not all of the disk
buffers the kernel has got.)  It appears that the kernel is doing
exactly what it's supposed to do and using any not-currently-called-for
memory for disk cache ...

			regards, tom lane

In response to

Responses

pgsql-performance by date

Next:From: smiley2211Date: 2007-09-20 23:25:43
Subject: Re: Upgraded from 7.4 to 8.1.4 QUERIES NOW SLOW!!!
Previous:From: Decibel!Date: 2007-09-20 23:04:01
Subject: Linux mis-reporting memory

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