public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Stefanita Rares Dumitrescu <katmai@keptprivate.com>
Cc: xfs@oss.sgi.com
Subject: Re: xfs corrupted
Date: Wed, 16 Oct 2013 07:26:40 +1100	[thread overview]
Message-ID: <20131015202640.GR4446@dastard> (raw)
In-Reply-To: <525D9E3B.5040507@keptprivate.com>

On Tue, Oct 15, 2013 at 09:57:47PM +0200, Stefanita Rares Dumitrescu wrote:
> Since i am using centos 5.9, the version of the xfsprogs seems to be
> old, so i cloned the new one from sgi.
> 
> I have a machine with 4 gb ram, and 4 gb swap, and it's all been
> eaten up by xfs_repair, and slowed down to a crawl.
> 
> the sdc partition is the one being checked. i am all out of memory
> now. 4 gb phys and 4 gb swap all gone.
> 
> http://pastebin.ca/2467064
> 
> posted to pastebin for better formatting.
> 
> i was using:
> 
> [root@kp4 ~]# xfs_repair -o bhash=16384 -o ihash=16384 -o ag_stride=16 \
> > /dev/sdc >& /tmp/repair.log

You don't have enough RAM to run threaded prefetching and parallel
AG processing. You'd do better to turn prefetching off entirely with
"-P" if you are having OOM problems.

> but now i am trying the -m option to see if the memory can be
> limited, so the server doesn't freeze.
> 
> [root@kp4 ~]# xfs_repair -m 3072 -o ag_stride=16 /dev/sdc >& /tmp/repair.log
> 
> nothing in dmesg either.

Give it another 10-20GB of swap, and it should be fine. xfs_repair
usually only thrashes swap when you don't have enough of it and it
keeps trying to free memory, paging in pages that are in swap to
free cached objects from them. Most of the memory references that
repair makes are quite local, so when pages are swapped out they
generally aren't needed again for a while except when cache reclaim
kicks in. Hence if you give it enough swap that it can grow without
bounds, then it should still be quite efficient.

Keep in mind that badly corrupted filesystems require lots more
memory than clean filesystems to check and repair as there is lots
more intermediate state that repair needs to hold in memory about
partially or incompletely referenced objects. Don't be surprised if
the amount of memory needed to repair a badly broken filesystem is
10-100x the amount of RAM needed to run xfs_repair on the same clean
filesystem....

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  parent reply	other threads:[~2013-10-15 20:26 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-15  8:41 xfs corrupted katmai
2013-10-15 18:34 ` Emmanuel Florac
2013-10-15 18:45   ` Stefanita Rares Dumitrescu
2013-10-15 19:07     ` Chris Murphy
2013-10-15 19:52       ` Emmanuel Florac
2013-10-15 19:34     ` Emmanuel Florac
2013-10-15 19:57       ` Stefanita Rares Dumitrescu
2013-10-15 20:05         ` Emmanuel Florac
2013-10-15 20:17           ` Stefanita Rares Dumitrescu
2013-10-15 20:18           ` Stefanita Rares Dumitrescu
2013-10-15 20:26         ` Dave Chinner [this message]
2013-10-16 12:23           ` Stefanita Rares Dumitrescu
2013-10-16 13:32           ` Stefanita Rares Dumitrescu
2013-10-16 17:33             ` Keith Keller
2013-10-16 22:16             ` Dave Chinner
2013-10-16 14:32           ` Stefanita Rares Dumitrescu
2013-10-16 20:52           ` Stefanita Rares Dumitrescu
2013-10-17 18:04           ` Stefanita Rares Dumitrescu
2013-10-15 20:02       ` Stefanita Rares Dumitrescu

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=20131015202640.GR4446@dastard \
    --to=david@fromorbit.com \
    --cc=katmai@keptprivate.com \
    --cc=xfs@oss.sgi.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