Re: free RAM not being used for page cache

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Kevin Grittner <kgrittn(at)ymail(dot)com>
Cc: Merlin Moncure <mmoncure(at)gmail(dot)com>, Kevin Goess <kgoess(at)bepress(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: free RAM not being used for page cache
Date: 2014-07-30 19:21:28
Message-ID: CAOR=d=1n3WXghg_hjojk3JAQN-1SE5xj+KOtv4v9GcJ0wQKv5w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Jul 30, 2014 at 1:05 PM, Kevin Grittner <kgrittn(at)ymail(dot)com> wrote:
> Merlin Moncure <mmoncure(at)gmail(dot)com> wrote:
>> On Wed, Jul 30, 2014 at 12:51 PM, Kevin Goess <kgoess(at)bepress(dot)com> wrote:
>>
>>> A couple months ago we upgraded the RAM on our database servers from 48GB to
>>> 64GB. Immediately afterwards the new RAM was being used for page cache,
>>> which is what we want, but that seems to have dropped off over time, and
>>> there's currently actually like 12GB of totally unused RAM.
>
>> could be a numa issue.
>
> I was thinking the same thing.
>
> The other thought was that it could be a usage pattern and/or
> monitoring issue. When there are transient requests for large
> amounts of memory, it will discard cache to satisfy those (e.g.,
> work_mem or maintenance_work_mem allocations). If the *active*
> portion of the database is not as big as RAM, it might not refill
> right away. This could be compounded on your monitoring graphs if
> they summarize by taking the *average* RAM usage for an interval
> rather than the *maximum* usage for that interval. Intermittent
> spikes in usage could make it look like the RAM is unused if you
> are averaging; personally, I would prefer to use maximum for a
> metric like this. Many monitoring systems allow you to choose.

In fact, looking at the png he attached, I'd bet they cranked up
work_mem and / or connections sometime around the end of January and
that's what we're seeing here. More memory used for sorts etc, less
left for caching.

--
To understand recursion, one must first understand recursion.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Emir Ibrahimbegovic 2014-07-31 00:41:30 Inconsistent results postgresql
Previous Message Seref Arikan 2014-07-30 19:20:39 Re: How can I create null value from function call with no results?