From 45f2a2bc5b55fe15ae7ecafcb781a9076e78966c Mon Sep 17 00:00:00 2001
From: Daniel Drake df
reports too few free space?
When migrating a filesystem image from JFFS2 to UBIFS you may notice some +or all of the following:
+ +df
reports significantly less available free space
+ than before (while there may be some truth in this, please be
+ aware of the other considerations that must be applied to
+ df
values described elsewhere in this FAQ).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 50MiB per 1GiB 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:
+ +UBIFS compression may be disabled for whole file system during the image -- 2.50.1