From: Daniel Walker <danielwa@cisco.com>
To: Johannes Weiner <hannes@cmpxchg.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
Michal Hocko <mhocko@suse.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, "Khalid Mughal (khalidm)" <khalidm@cisco.com>,
"xe-kernel@external.cisco.com" <xe-kernel@external.cisco.com>,
Rik van Riel <riel@redhat.com>
Subject: Re: computing drop-able caches
Date: Thu, 28 Jan 2016 17:29:41 -0800 [thread overview]
Message-ID: <56AAC085.9060509@cisco.com> (raw)
In-Reply-To: <56AABA79.3030103@cisco.com>
[-- Attachment #1: Type: text/plain, Size: 2162 bytes --]
On 01/28/2016 05:03 PM, Daniel Walker wrote:
> On 01/28/2016 03:58 PM, Johannes Weiner wrote:
>> On Thu, Jan 28, 2016 at 03:42:53PM -0800, Daniel Walker wrote:
>>> "Currently there is no way to figure out the droppable pagecache size
>>> from the meminfo output. The MemFree size can shrink during normal
>>> system operation, when some of the memory pages get cached and is
>>> reflected in "Cached" field. Similarly for file operations some of
>>> the buffer memory gets cached and it is reflected in "Buffers" field.
>>> The kernel automatically reclaims all this cached & buffered memory,
>>> when it is needed elsewhere on the system. The only way to manually
>>> reclaim this memory is by writing 1 to /proc/sys/vm/drop_caches. "
>> [...]
>>
>>> The point of the whole exercise is to get a better idea of free
>>> memory for
>>> our employer. Does it make sense to do this for computing free memory?
>> /proc/meminfo::MemAvailable was added for this purpose. See the doc
>> text in Documentation/filesystem/proc.txt.
>>
>> It's an approximation, however, because this question is not easy to
>> answer. Pages might be in various states and uses that can make them
>> unreclaimable.
>
>
> Khalid was telling me that our internal sources rejected MemAvailable
> because it was not accurate enough. It says in the description,
> "The estimate takes into account that the system needs some page cache
> to function well". I suspect that's part of the inaccuracy. I asked
> Khalid to respond with more details on this.
>
Some quotes,
"
[regarding MemAvaiable]
This new metric purportedly helps usrespace assess available memory. But,
its again based on heuristic, it takes 1/2 of page cache as reclaimable..
Somewhat arbitrary choice. Maybe appropriate for desktops, where page
cache is mainly used as page cache, not as a first class store which is
the case on embedded systems. Our systems are swap less, they have little
secondary storage, they use in-memory databases/filesystems/shared memories/
etc. which are all setup on page caches).. This metric as it is implemented
in 3.14 leads to a totally mis-leading picture of available memory"
Daniel
[-- Attachment #2: Type: text/html, Size: 4737 bytes --]
next prev parent reply other threads:[~2016-01-29 1:29 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-28 23:42 Daniel Walker
2016-01-28 23:58 ` Johannes Weiner
2016-01-29 1:03 ` Daniel Walker
2016-01-29 1:29 ` Daniel Walker [this message]
2016-01-29 1:55 ` Johannes Weiner
2016-01-29 21:21 ` Daniel Walker
2016-01-29 22:33 ` Johannes Weiner
2016-01-29 22:41 ` Rik van Riel
2016-02-08 20:57 ` Khalid Mughal (khalidm)
2016-02-10 18:04 ` Daniel Walker
2016-02-10 18:13 ` Dave Hansen
2016-02-10 19:11 ` Daniel Walker
2016-02-11 22:11 ` Rik van Riel
2016-02-12 18:01 ` Khalid Mughal (khalidm)
2016-02-12 21:46 ` Dave Hansen
2016-02-12 22:15 ` Johannes Weiner
2016-02-12 18:06 ` Dave Hansen
2016-02-12 18:15 ` Daniel Walker
2016-02-12 18:18 ` Dave Hansen
2016-02-12 18:25 ` Daniel Walker
2016-02-12 20:15 ` Daniel Walker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56AAC085.9060509@cisco.com \
--to=danielwa@cisco.com \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=khalidm@cisco.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=riel@redhat.com \
--cc=viro@zeniv.linux.org.uk \
--cc=xe-kernel@external.cisco.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox