linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: Marinko Catovic <marinko.catovic@gmail.com>
Cc: linux-mm@kvack.org, Michal Hocko <mhocko@kernel.org>
Subject: Re: Caching/buffers become useless after some time
Date: Mon, 6 Aug 2018 11:40:28 +0200	[thread overview]
Message-ID: <30f7ec9a-e090-06f1-1851-b18b3214f5e3@suse.cz> (raw)
In-Reply-To: <CADF2uSrhKG=ntFWe96YyDWF8DFGyy4Jo4YFJFs=60CBXY52nfg@mail.gmail.com>

On 08/03/2018 04:13 PM, Marinko Catovic wrote:
> Thanks for the analysis.
> 
> So since I am no mem management dev, what exactly does this mean?
> Is there any way of workaround or quickfix or something that can/will
> be fixed at some point in time?

Workaround would be the manual / periodic cache flushing, unfortunately.

Maybe a memcg with kmemcg limit? Michal could know more.

A long-term generic solution will be much harder to find :(

> I can not imagine that I am the only one who is affected by this, nor do I
> know why my use case would be so much different from any other.
> Most 'cloud' services should be affected as well.

Hmm, either your workload is specific in being hungry for fs metadata
and not much data (page cache). And/Or there's some source of the
high-order allocations that others don't have, possibly related to some
piece of hardware?

> Tell me if you need any other snapshots or whatever info.
> 
> 2018-08-02 18:15 GMT+02:00 Vlastimil Babka <vbabka@suse.cz
> <mailto:vbabka@suse.cz>>:
> 
>     On 07/31/2018 12:08 AM, Marinko Catovic wrote:
>     > 
>     >> Can you provide (a single snapshot) /proc/pagetypeinfo and
>     >> /proc/slabinfo from a system that's currently experiencing the issue,
>     >> also with /proc/vmstat and /proc/zoneinfo to verify? Thanks.
>     > 
>     > your request came in just one day after I 2>drop_caches again when the
>     > ram usage
>     > was really really low again. Up until now it did not reoccur on any of
>     > the 2 hosts,
>     > where one shows 550MB/11G with 37G of totally free ram for now - so not
>     > that low
>     > like last time when I dropped it, I think it was like 300M/8G or so, but
>     > I hope it helps:
> 
>     Thanks.
> 
>     > /proc/pagetypeinfoA  https://pastebin.com/6QWEZagL
> 
>     Yep, looks like fragmented by reclaimable slabs:
> 
>     NodeA  A  0, zoneA  A Normal, typeA  A  UnmovableA  29101A  32754A  A 8372A 
>     A 2790A  A 1334A  A  354A  A  A 23A  A  A  3A  A  A  4A  A  A  0A  A  A  0
>     NodeA  A  0, zoneA  A Normal, typeA  A  A  Movable 142449A  83386A  99426A 
>     69177A  36761A  12931A  A 1378A  A  A 24A  A  A  0A  A  A  0A  A  A  0
>     NodeA  A  0, zoneA  A Normal, typeA  Reclaimable 467195 530638 355045
>     192638A  80358A  15627A  A 2029A  A  231A  A  A 18A  A  A  0A  A  A  0
> 
>     Number of blocks typeA  A  A UnmovableA  A  A  MovableA  ReclaimableA 
>     A HighAtomicA  A  A  Isolate
>     Node 0, zoneA  A  A  DMAA  A  A  A  A  A  1A  A  A  A  A  A  7A  A  A  A  A  A  0A  A  A  A 
>     A  A  0A  A  A  A  A  A  0
>     Node 0, zoneA  A  DMA32A  A  A  A  A  A 34A  A  A  A  A  703A  A  A  A  A  375A  A  A  A 
>     A  A  0A  A  A  A  A  A  0
>     Node 0, zoneA  A NormalA  A  A  A  A 1672A  A  A  A  14276A  A  A  A  15659A  A  A  A 
>     A  A  1A  A  A  A  A  A  0
> 
>     Half of the memory is marked as reclaimable (2 megabyte) pageblocks.
>     zoneinfo has nr_slab_reclaimable 1679817 so the reclaimable slabs occupy
>     only 3280 (6G) pageblocks, yet they are spread over 5 times as much.
>     It's also possible they pollute the Movable pageblocks as well, but the
>     stats can't tell us. Either the page grouping mobility heuristics are
>     broken here, or the worst case scenario happened - memory was at
>     some point
>     really wholly filled with reclaimable slabs, and the rather random
>     reclaim
>     did not result in whole pageblocks being freed.
> 
>     > /proc/slabinfoA  https://pastebin.com/81QAFgke
> 
>     Largest caches seem to be:
>     # nameA  A  A  A  A  A  <active_objs> <num_objs> <objsize> <objperslab>
>     <pagesperslab> : tunables <limit> <batchcount> <sharedfactor> :
>     slabdata <active_slabs> <num_slabs> <sharedavail>
>     ext4_inode_cacheA  3107754 3759573A  A 1080A  A  3A  A  1 : tunablesA  A 24A 
>     A 12A  A  8 : slabdata 1253191 1253191A  A  A  0
>     dentryA  A  A  A  A  A  2840237 7328181A  A  192A  A 21A  A  1 : tunablesA  120A 
>     A 60A  A  8 : slabdata 348961 348961A  A  120
> 
>     The internal framentation of dentry cache is significant as well.
>     Dunno if some of those objects pin movable pages as well...
> 
>     So looks like there's insufficient slab reclaim (shrinker activity), and
>     possibly problems with page grouping by mobility heuristics as well...
> 
>     > /proc/vmstatA  https://pastebin.com/S7mrQx1s
>     > /proc/zoneinfoA  https://pastebin.com/csGeqNyX
>     >
>     > also please note - whether this makes any difference: there is no swap
>     > file/partition
>     > I am using this without swap space. imho this should not be
>     necessary since
>     > applications running on the hosts would not consume more than
>     20GB, the rest
>     > should be used by buffers/cache.
>     >
> 
> 

  reply	other threads:[~2018-08-06  9:42 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-11 13:18 Marinko Catovic
2018-07-12 11:34 ` Michal Hocko
2018-07-13 15:48   ` Marinko Catovic
2018-07-16 15:53     ` Marinko Catovic
2018-07-16 16:23       ` Michal Hocko
2018-07-16 16:33         ` Marinko Catovic
2018-07-16 16:45           ` Michal Hocko
2018-07-20 22:03             ` Marinko Catovic
2018-07-27 11:15               ` Vlastimil Babka
2018-07-30 14:40                 ` Michal Hocko
2018-07-30 22:08                   ` Marinko Catovic
2018-08-02 16:15                     ` Vlastimil Babka
2018-08-03 14:13                       ` Marinko Catovic
2018-08-06  9:40                         ` Vlastimil Babka [this message]
2018-08-06 10:29                           ` Marinko Catovic
2018-08-06 12:00                             ` Michal Hocko
2018-08-06 15:37                               ` Christopher Lameter
2018-08-06 18:16                                 ` Michal Hocko
2018-08-09  8:29                                   ` Marinko Catovic
2018-08-21  0:36                                     ` Marinko Catovic
2018-08-21  6:49                                       ` Michal Hocko
2018-08-21  7:19                                         ` Vlastimil Babka
2018-08-22 20:02                                           ` Marinko Catovic
2018-08-23 12:10                                             ` Vlastimil Babka
2018-08-23 12:21                                               ` Michal Hocko
2018-08-24  0:11                                                 ` Marinko Catovic
2018-08-24  6:34                                                   ` Vlastimil Babka
2018-08-24  8:11                                                     ` Marinko Catovic
2018-08-24  8:36                                                       ` Vlastimil Babka
2018-08-29 14:54                                                         ` Marinko Catovic
2018-08-29 15:01                                                           ` Michal Hocko
2018-08-29 15:13                                                             ` Marinko Catovic
2018-08-29 15:27                                                               ` Michal Hocko
2018-08-29 16:44                                                                 ` Marinko Catovic
2018-10-22  1:19                                                                   ` Marinko Catovic
2018-10-23 17:41                                                                     ` Marinko Catovic
2018-10-26  5:48                                                                       ` Marinko Catovic
2018-10-26  8:01                                                                     ` Michal Hocko
2018-10-26 23:31                                                                       ` Marinko Catovic
2018-10-27  6:42                                                                         ` Michal Hocko
     [not found]                                                                     ` <6e3a9434-32f2-0388-e0c7-2bd1c2ebc8b1@suse.cz>
2018-10-30 15:30                                                                       ` Michal Hocko
2018-10-30 16:08                                                                         ` Marinko Catovic
2018-10-30 17:00                                                                           ` Vlastimil Babka
2018-10-30 18:26                                                                             ` Marinko Catovic
2018-10-31  7:34                                                                               ` Michal Hocko
2018-10-31  7:32                                                                             ` Michal Hocko
2018-10-31 13:40                                                                             ` Vlastimil Babka
2018-10-31 14:53                                                                               ` Marinko Catovic
2018-10-31 17:01                                                                                 ` Michal Hocko
2018-10-31 19:21                                                                                   ` Marinko Catovic
2018-11-01 13:23                                                                                     ` Michal Hocko
2018-11-01 22:46                                                                                       ` Marinko Catovic
2018-11-02  8:05                                                                                         ` Michal Hocko
2018-11-02 11:31                                                                                           ` Marinko Catovic
2018-11-02 11:49                                                                                             ` Michal Hocko
2018-11-02 12:22                                                                                               ` Vlastimil Babka
2018-11-02 12:41                                                                                                 ` Marinko Catovic
2018-11-02 13:13                                                                                                   ` Vlastimil Babka
2018-11-02 13:50                                                                                                     ` Marinko Catovic
2018-11-02 14:49                                                                                                       ` Vlastimil Babka
2018-11-02 14:59                                                                                 ` Vlastimil Babka
2018-11-30 12:01                                                                                   ` Marinko Catovic
2018-12-10 21:30                                                                                     ` Marinko Catovic
2018-12-10 21:47                                                                                       ` Michal Hocko
2018-10-31 13:12                                                                     ` Vlastimil Babka
2018-08-24  6:24                                                 ` Vlastimil Babka

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=30f7ec9a-e090-06f1-1851-b18b3214f5e3@suse.cz \
    --to=vbabka@suse.cz \
    --cc=linux-mm@kvack.org \
    --cc=marinko.catovic@gmail.com \
    --cc=mhocko@kernel.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