From: | Glyn Astill <glynastill(at)yahoo(dot)co(dot)uk> |
---|---|
To: | Huan Ruan <huan(dot)ruan(dot)it(at)gmail(dot)com>, "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org> |
Subject: | Re: shared_buffers vs Linux file cache |
Date: | 2015-01-15 17:10:31 |
Message-ID: | 1447891004.1779021.1421341832048.JavaMail.yahoo@jws11167.mail.ir2.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
> From: Huan Ruan <huan(dot)ruan(dot)it(at)gmail(dot)com>
>To: pgsql-performance(at)postgresql(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Janes | 2015-01-15 22:22:17 | Re: shared_buffers vs Linux file cache |
Previous Message | Huan Ruan | 2015-01-15 11:30:55 | shared_buffers vs Linux file cache |