linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: Dave Chinner <david@fromorbit.com>
Cc: arekm@maven.pl, linux-ext4@vger.kernel.org, linux-mm@kvack.org
Subject: Re: 4.7.0, cp -al causes OOM
Date: Sun, 14 Aug 2016 12:50:49 +0200	[thread overview]
Message-ID: <20160814105048.GD9248@dhcp22.suse.cz> (raw)
In-Reply-To: <20160813014259.GB16044@dastard>

On Sat 13-08-16 11:42:59, Dave Chinner wrote:
> On Fri, Aug 12, 2016 at 09:44:55AM +0200, Michal Hocko wrote:
> > > [...]
> > > 
> > > > [114824.060378] Mem-Info:
> > > > [114824.060403] active_anon:170168 inactive_anon:170168 isolated_anon:0
> > > >                  active_file:192892 inactive_file:133384 isolated_file:0
> > > 
> > > LRU 32%
> > > 
> > > >                  unevictable:0 dirty:37109 writeback:1 unstable:0
> > > >                  slab_reclaimable:1176088 slab_unreclaimable:109598
> > > 
> > > slab 61%
> > > 
> > > [...]
> > > 
> > > That being said it is really unusual to see such a large kernel memory
> > > foot print. The slab memory consumption grows but it doesn't seem to be
> > > a memory leak at first glance.
> 
> >From discussions on #xfs, it's the ext4 inode slab that is consuming
> most of this memory. Which, of course, is expected when running
> a workload that is creating millions of lots of hardlinks.
> 
> AFAICT, the difference between XFS and ext4 in this case is that XFS
> throttles direct reclaim to the synchronous inode reclaim rate in
> its custom inode cache shrinker. This is necessary because when we
> are dirtying large numbers of inodes, memory reclaim encounters
> those dirty inodes and can't reclaim them immediately. i.e. it takes
> IO to reclaim them, just like it does for dirty pages.

OK, I see. Thanks for the clarification. This also sounds like a reason
why the compaction fails for this setup. The available reclaimable LRU
pages are probably not sufficient to form order-2 pages. But that would
require more debugging data.

> However, we throttle the rate at which we dirty pages to prevent
> filling memory with unreclaimable dirty pages as that causes
> spurious OOM situations to occur. The same spurious OOM situations
> occur when memory is full of dirty inodes, and so allocation rate
> throttling is needed for large scale inode cache intersive workloads
> like this as well....

Is there any generic way to do this throttling or every fs has to
implement its own way?

Thanks!
-- 
Michal Hocko
SUSE Labs

--
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>

  reply	other threads:[~2016-08-14 10:50 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-12  7:01 4.7.0, cp -al causes OOM Arkadiusz Miskiewicz
2016-08-12  7:43 ` Michal Hocko
2016-08-12  7:44   ` Michal Hocko
2016-08-13  1:42     ` Dave Chinner
2016-08-14 10:50       ` Michal Hocko [this message]
2016-08-23  2:20         ` Dave Chinner
2016-08-14 12:51   ` Michal Hocko
2016-08-14 12:53     ` [PATCH] mm, oom: report compaction/migration stats for higher order requests Michal Hocko
2016-08-15  8:51       ` Michal Hocko
2016-08-16 11:18         ` Arkadiusz Miskiewicz
2016-08-16 14:10           ` Michal Hocko
2016-08-17  8:34             ` Arkadiusz Miśkiewicz
2016-08-17  9:29               ` Michal Hocko
2016-08-18 18:49                 ` Arkadiusz Miskiewicz
2016-08-19  6:44                   ` Vlastimil Babka
2016-08-21 21:19                     ` Arkadiusz Miskiewicz
2016-08-22  7:02                       ` Michal Hocko
2016-08-17 10:57           ` Jan Kara

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=20160814105048.GD9248@dhcp22.suse.cz \
    --to=mhocko@kernel.org \
    --cc=arekm@maven.pl \
    --cc=david@fromorbit.com \
    --cc=linux-ext4@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).