Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YBnwU-00030l-3P for pgsql-performance@arkaria.postgresql.org; Thu, 15 Jan 2015 17:10:47 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YBnwT-00063j-8w for pgsql-performance@arkaria.postgresql.org; Thu, 15 Jan 2015 17:10:45 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YBnwQ-0005vh-0Z for pgsql-performance@postgresql.org; Thu, 15 Jan 2015 17:10:42 +0000 Received: from nm22.bullet.mail.ir2.yahoo.com ([212.82.96.46]) by magus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1YBnwK-0006Hs-4z for pgsql-performance@postgresql.org; Thu, 15 Jan 2015 17:10:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1421341833; bh=SsmF//bcOVBAoro0+yyVIBnFuKX1qLsjppTXirGGWVs=; h=Date:From:Reply-To:To:In-Reply-To:References:Subject:From:Subject; b=KIEiPFvePR9am+riFl9+WsdGQVvzpCga/yGMAmVTTOwjGd8ascR7742/kzBK8sCeJu7twIzb87cBYLu7FyMUYz8POFaiex3/ndO7zFn9u8i1KjUvqfKZBJ/W8k9dlhY0QxlO5doAEqfEmJvD28pH763oOU5Fh0ViXJ62Ic2htCyzTnspLm+UN5V5arT/hjlLlO7iaGuBtx1CARSPT5lMZXUQi32MsaKgQ7Ju0hGVGb3RlgIwioQWoRgIvq+aBQhFwGbSO9Qnj5j1fS5cjNtDg9orCkuUUYG8KNPUJaghI1SQnNfoWe/Z5DJDN2u4dJNa+ig268LfsCPij/yIqWY3mw== Received: from [212.82.98.58] by nm22.bullet.mail.ir2.yahoo.com with NNFMP; 15 Jan 2015 17:10:33 -0000 Received: from [212.82.98.78] by tm11.bullet.mail.ir2.yahoo.com with NNFMP; 15 Jan 2015 17:10:33 -0000 Received: from [127.0.0.1] by omp1015.mail.ir2.yahoo.com with NNFMP; 15 Jan 2015 17:10:33 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 707729.17571.bm@omp1015.mail.ir2.yahoo.com X-YMail-OSG: s4ImsVcVM1mxw2ymuDGWYtmSE7JXXpmUl0mlfNArZnH7_f_9jEDQXpHTagQ7zrJ qXz41y1l8NTV3.AePWf91uNT369jshkv_eHE.wWzBUdnZ3MQX.iB74GmOKXeeAxign.52rwTd8IG NPZsRb0r0jUSr_TGQnuS_Ck0FkC5IOlhHmQu7yLb8MUHCYLEufEapNiyAsRnq49smt0PhgFDoqYK hrgFPqApFlMLbO2YAEybjnn86IAaM_8EokBSKIr50q8ejiCSwxYYgSvcHG4ItFNQVgOEr1NY2nAp 88wnSHbDfBzEFMM8qcax1mIjgiarW3jlQJwqMoXR5TGUvb5KTqHugS7SOLMnw3S3E6pczvPlwMAa 7IVi4kQ.1ihXdPjbHk4DKp1TmGoDaqdTUilgyqEYS9Xao1LK2xh.9rxaNR.zItCmMJ9tR7KAGm0s w9djnNucPF488ubsAxh4cyW0Jw707CdmKedbwN5.A1zm4E035mLahnFUK_vbDUnC3lcML_3EdA.d RfPfficqnfoAYXZ2773JeGUAAfs2ihuNekB7dc7ZzrEI65SVvikQXg7FJID0UEK_VQIeXfFIAdpC IpBLEwJJgswdD.EI6ilbSaR1zWu8- Received: by 212.82.98.116; Thu, 15 Jan 2015 17:10:33 +0000 Date: Thu, 15 Jan 2015 17:10:31 +0000 (UTC) From: Glyn Astill Reply-To: Glyn Astill To: Huan Ruan , "pgsql-performance@postgresql.org" Message-ID: <1447891004.1779021.1421341832048.JavaMail.yahoo@jws11167.mail.ir2.yahoo.com> In-Reply-To: References: Subject: Re: shared_buffers vs Linux file cache MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Length: 1055 X-Pg-Spam-Score: -2.0 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org > From: Huan Ruan >To: pgsql-performance@postgresql.org >Sent: Thursday, 15 January 2015, 11:30 >Subject: [PERFORM] shared_buffers vs Linux file cache > > > >Hi All > > >I thought 'shared_buffers' sets how much memory that is dedicated to PostgreSQL to use for caching data, therefore not available to other applications. > > >However, as shown in the following screenshots, The server (CentOS 6.6 64bit) has 64GB of RAM, and 'shared_buffer' is set to 32GB, but the free+buffer+cache is 60GB. > > >Shouldn't the maximum value for free+buffer+cache be 32GB ( 64 - 32)? >Is 'shared_buffers' pre allocated to Postgres, and Postgres only? > I've not looked at the images, but I think you're getting PostgreSQL shared_buffers and the OS buffercache mixed up; they are not the same. PostgreSQL shared_buffers is specific to postgres, whereas the OS buffercache will just use free memory to cache data pages from disk, and this is what you're seeing. Some reading for you: http://www.tldp.org/LDP/sag/html/buffer-cache.html Glyn -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance