From: Cheng Rk <crquan@ymail.com>
To: Konstantin Khlebnikov <koct9i@gmail.com>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: Re: How to controll Buffers to be dilligently reclaimed?
Date: Fri, 13 Feb 2015 18:07:10 +0000 (UTC) [thread overview]
Message-ID: <1447872036.2240531.1423850830637.JavaMail.yahoo@mail.yahoo.com> (raw)
In-Reply-To: <131740628.109294.1423821136530.JavaMail.yahoo@mail.yahoo.com>
On Thursday, February 12, 2015 11:34 PM, Konstantin Khlebnikov <koct9i@gmail.com> wrote:
>>
>> -bash-4.2$ sudo losetup -a
>> /dev/loop0: [0005]:16512 (/dev/dm-2)
>> -bash-4.2$ free -m
>> total used free shared buffers cached
>> Mem: 48094 46081 2012 40 40324 2085
>> -/+ buffers/cache: 3671 44422
>> Swap: 8191 5 8186
>>
>> I've tried sysctl mm.vfs_cache_pressure=10000 but that seems working to Cached
>> memory, I wonder is there another sysctl for reclaming Buffers?
> AFAIK "Buffers" is just a page-cache of block devices.
> From reclaimer's point of view they have no difference from file page-cache.
> Could you post oom-killer log, there should be a lot of numbers
> describing memory state.
in this case, 40GB memory got stuck in Buffers, and 90+% of them are reclaimable (can be verified by vm.drop_caches manual reclaim)
if Buffers are treated same as Cached, why mm.vfs_cache_pressure=10000 (or even I tried up to 1,000,000) can't get Buffers reclaimed early?
I have some oom-killer msgs but were with older kernels, after set vm.overcommit_memory=2, it simply returns -ENOMEM, unable to spawn any new container, why doesn't it even try to reclaim some memory from those 40GB Buffers,
The Buffers in use is 44GB, from total memory of 48GB, it's the Inactive(file) 41GB consumed the most, why this much memory is reclaimable to vm/drop_caches but not to application requesting memory?
Is there a sysctl can make Buffers / Inactive(file) be reclaimed early and often ?
(since to this system it's mounting /dev/loop0 and have a lot of small temporary files created there, keeping them in Buffers for longer time is useless, how can I make it reclaimed earlier than later when applications need memory? )
-bash-4.2$ cat /proc/meminfo
MemTotal: 49286656 kB
MemFree: 2040944 kB
MemAvailable: 47809824 kB
Buffers: 44258776 kB
Cached: 456868 kB
SwapCached: 0 kB
Active: 3783592 kB
Inactive: 41535112 kB
Active(anon): 402776 kB
Inactive(anon): 282308 kB
Active(file): 3380816 kB
Inactive(file): 41252804 kB
Thanks,
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2015-02-13 18:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-13 0:52 Cheng Rk
2015-02-13 7:34 ` Konstantin Khlebnikov
2015-02-13 9:52 ` Cheng Rk
2015-02-13 18:07 ` Cheng Rk [this message]
2015-02-18 14:23 ` Michal Hocko
2015-02-18 19:44 ` Cheng Rk
2015-02-19 9:46 ` Michal Hocko
2015-02-20 20:33 ` Cheng Rk
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=1447872036.2240531.1423850830637.JavaMail.yahoo@mail.yahoo.com \
--to=crquan@ymail.com \
--cc=koct9i@gmail.com \
--cc=linux-mm@kvack.org \
/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