Received: from localhost (unknown [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 492A69FA145 for ; Thu, 20 Sep 2007 20:12:30 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 87652-03 for ; Thu, 20 Sep 2007 20:12:14 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 1B2E69FA06D for ; Thu, 20 Sep 2007 20:12:18 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id l8KNCEog016214; Thu, 20 Sep 2007 19:12:14 -0400 (EDT) To: Decibel! cc: pgsql-performance@postgresql.org Subject: Re: Linux mis-reporting memory In-reply-to: <20070920230400.GM95343@decibel.org> References: <20070920230400.GM95343@decibel.org> Comments: In-reply-to Decibel! message dated "Thu, 20 Sep 2007 18:04:01 -0500" Date: Thu, 20 Sep 2007 19:12:14 -0400 Message-ID: <16213.1190329934@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200709/342 X-Sequence-Number: 26887 Decibel! 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