From patchwork Mon Oct 10 12:07:01 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: UBIFS FAQ: document reasons for loss of space efficiency From: Daniel Drake X-Patchwork-Id: 118724 Message-Id: <20111010120701.C525F9D401E@zog.reactivated.net> To: linux-mtd@lists.infradead.org Date: Mon, 10 Oct 2011 13:07:01 +0100 (BST) OLPC is suffering a bit from the loss of space efficiency of UBIFS, document reasons for this based on an IRC discussion with Artem. Also document the difference in default compression schemes between JFFS2 and UBIFS which bit us at first. Signed-off-by: Daniel Drake --- faq/ubifs.xml | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 58 insertions(+), 0 deletions(-) diff --git a/faq/ubifs.xml b/faq/ubifs.xml index b6b0b14..a39ef46 100644 --- a/faq/ubifs.xml +++ b/faq/ubifs.xml @@ -29,6 +29,7 @@
  • Does UBIFS support NFS?
  • Does UBIFS become slower when it is full?
  • Why df reports too few free space?
  • +
  • Why does my UBIFS volume have significantly lower capacity than my equivalent jffs2 volume?
  • How do I disable compression?
  • How do I use UBIFS with nandsim?
  • How do I extract files from an UBI/UBIFS image?
  • @@ -871,6 +872,63 @@ accurate is free space reporting.

    +

    Why does my UBIFS volume have significantly lower +capacity than my equivalent JFFS2 volume?

    + +

    When migrating a filesystem image from JFFS2 to UBIFS you may notice some +or all of the following:

    + + + +

    There are several reasons for this.

    + +

    Firstly, did you create your volumes with default arguments to +mkfs.jffs2 and mkfs.ubifs? This alone introduces +a significant difference: mkfs.jffs2 effectively defaults to zlib +compression and disables lzo, but mkfs.ubifs defaults to LZO +compression. zlib compresses significantly better, but is noticeably slower to +compress/decompress at runtime. Using zlib compression with +mkfs.ubifs will probably reduce the size of your NAND image file +by 10-15%, put it on-par with an equivalent JFFS2 image, and increase the available capacity, at the price of performance.

    + +

    Secondly, did you choose a good value for vol_size or enable +autoresize in your ubinize configuration? It is possible that your UBI volume +is not utilising the full space of the available flash.

    + +

    Beyond that, it is unfortunately true that UBI/UBIFS has higher space +overhead than its predecessors. OLPC has +measured +this overhead to be approximately 50mb per 1GB of storage (using JFFS2 as a +baseline). While UBIFS cannot be made as good as JFFS2 in this respect, work +could be undertaken to improve space efficiency for current or future +UBI/UBIFS versions. Reasons for overhead and opportunities for improvement +include:

    + + + + +

    How do I disable compression?

    UBIFS compression may be disabled for whole file system during the image