From: Glyn Astill <glynastill@yahoo.co.uk>
To: Huan Ruan <huan.ruan.it@gmail.com>
To: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: shared_buffers vs Linux file cache
Date: Thu, 15 Jan 2015 17:10:31 +0000 (UTC)
Message-ID: <1447891004.1779021.1421341832048.JavaMail.yahoo@jws11167.mail.ir2.yahoo.com> (raw)
In-Reply-To: <CAD1stZv-iJUTRoMkj8xq_NdaNhrtHvjKO98wzEJAhf+TsgYdcA@mail.gmail.com>
References: <CAD1stZv-iJUTRoMkj8xq_NdaNhrtHvjKO98wzEJAhf+TsgYdcA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>
> From: Huan Ruan <huan.ruan.it@gmail.com>
>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
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: glynastill@yahoo.co.uk, huan.ruan.it@gmail.com
Subject: Re: shared_buffers vs Linux file cache
In-Reply-To: <1447891004.1779021.1421341832048.JavaMail.yahoo@jws11167.mail.ir2.yahoo.com>
* 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