All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger.kernel@dilger.ca>
To: Mala Iyer <malaiyer@gmail.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH]: icount: Replace the icount list by a two-level tree
Date: Mon, 1 Nov 2010 17:23:48 -0600	[thread overview]
Message-ID: <1C6D23BA-35F5-409F-A011-227E51075EB1@dilger.ca> (raw)
In-Reply-To: <loom.20101101T234449-996@post.gmane.org>

On 2010-11-01, at 16:49, Mala Iyer wrote:
> We are trying to use e2fsck on a embedded system with almost 3GB of swap and
> 200MB of physical memory. e2fsck on a 16TB ext3 filesystem always appears to
> fail with the following error
> 
> Pass 1D: Reconciling multiply-claimed blocks
> e2fsck: Memory allocation failed while retrying to read bitmaps for /dev/sda1

As a general rule of thumb, expect to use 1 byte of RAM for every block in the filesystem.  For a 16TB filesystem (2^32 blocks) I would expect to need about 4GB of RAM, from past experience.

There is a considerable amount of RAM savings that could be had by implementing more efficient sparse bitmap support internal to libext2fs.  The code is structured and ready to do this, but nobody has had a real need to do it before now.

Some proposals were discussed in the past (see for example the brief description in https://bugzilla.lustre.org/show_bug.cgi?id=12202, and you can Google for the referenced thread in the archives) to use run-length-encoding of sparse bitmaps, or possibly rb-tree structures.  In most cases, the bitmaps will have long runs of either all-ones or all-zeroes, so I expect even simple RLE encoding could help significantly.  Since this is an internal implementation detail, the code can be changed in future releases without impacting interoperability.

Also, https://bugzilla.lustre.org/attachment.cgi?id=10088 has an out-of-date patch (see the "ebitmap.c" file) that you might consider using for reference, but I also believe the APIs in libext2fs have changed significantly, as has the desired implementation, so I doubt the patch is useful for anything except finding out which code to start changing.

Cheers, Andreas






  reply	other threads:[~2010-11-01 23:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-18 14:04 Memory allocation failed, e2fsck: aborted Andre Noll
2010-08-18 20:20 ` Andreas Dilger
2010-08-19  0:54   ` Ted Ts'o
2010-08-19 13:10     ` Andre Noll
2010-08-19 17:16       ` Ted Ts'o
2010-08-20 14:40         ` Andre Noll
2010-08-20 14:36       ` Andre Noll
2010-08-19 13:01   ` Andre Noll
2010-08-19 19:03     ` Andreas Dilger
2010-08-20 12:46       ` Ted Ts'o
2010-08-20 14:39       ` Andre Noll
2010-08-23 15:53         ` [PATCH]: icount: Replace the icount list by a two-level tree Andre Noll
2010-11-01 22:49           ` Mala Iyer
2010-11-01 23:23             ` Andreas Dilger [this message]
     [not found] <029B6C3A-FB77-4C56-84B3-49DDB81220B0@tudelft.nl>
2010-12-20 19:46 ` Andreas Dilger

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=1C6D23BA-35F5-409F-A011-227E51075EB1@dilger.ca \
    --to=adilger.kernel@dilger.ca \
    --cc=linux-ext4@vger.kernel.org \
    --cc=malaiyer@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.