JFFS2 mount time
Jarkko Lavinen
jarkko.lavinen at nokia.com
Tue Oct 26 05:29:28 EDT 2004
I tried to see with jffs2dump how much Inodes and Dirents I have on
root filesystem on Arm testbed. Quick and dirty Perl script attached.
This isn't accurate as the calculated total image size misses at least
the final padding on the last erase block.
The size of the plain JFFS2 image is 31.1 MiB. The root fs consists of
all applications and libraries and no user data.
$ jffs2dump -c rootfs.jffs2 | perl jffs2stats.pl
Number of dirents: 6144.
Total dirent node space: 304911 (0.9%)
Average dirent len: 49.6
Total dirent name space: 76671
Average name len: 12.5
Number of Inodes: 21197
Total Inode space: 32254866 (99.1%)
Average Inode size: 1521.7
Padding: 37326 0.1%
Total image size: 32559777
$ ls -l rootfs.jffs2
-rw-r--r-- 1 root root 32597104 Oct 20 15:11 rootfs.jffs2
With sumtool the image size grows to 31.8 MiB
$ jffs2dump -c rootfs-sum.jffs2 | perl jffs2stats.pl
Number of dirents: 6144.
Total dirent node space: 304911 (0.9%)
Average dirent len: 49.6
Total dirent name space: 76671
Average name len: 12.5
Number of Inodes: 21197
Total Inode space: 32254866 (97.2%)
Average Inode size: 1521.7
Number of Inode Summary nodes: 251
Total Inode Sum space: 631524, (1.9%)
Average Sum node size: 2516.0
Padding: 153063 0.5%
Total image size: 33191301
$ ls -l rootfs-sum.jffs2
-rw-r--r-- 1 root root 33423360 Oct 20 15:23 rootfs-sum.jffs2
If dentries were stored just as they are (unstripped and uncompressed)
in the summary, the summary size would grow by 50% to about 3% of the
whole image size.
On Fri, Oct 22, 2004 at 04:44:13PM +0400, ext Artem Bityuckiy wrote:
> I believe that if we have directory references in summaries, this will
> increase the mount speed.
>
> 1. At first, we will store fewer data! We don't need to keep the common
> headers, CRCs and mctimes.
> 2. At the second, we may compress summary (direntries aren't compressed)!
> 3. And the third, on NAND there is difference between reading lots of
> different pages or few pages.
I tried Ferenc's earlier mount time patch in August and the 52s mount
time dropped then to 14s. If I understand right, inodes and dentries
were then mixed in the erase block and the summary was for inodes
only. This shows reading dentries from semirandom places is
expensive.
Ferenc's latest patch put dentries on their own erase block in
consecutive order. Considering only the read efficiency from the
media, reading consecutive, uncompressed, and unstripped dentries from
a summary should cost no more than reading them from dedicated erase
block.
Jarkko Lavinen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jffs2stats.pl
Type: text/x-perl
Size: 3230 bytes
Desc: not available
Url : http://lists.infradead.org/pipermail/linux-mtd/attachments/20041026/5ce2780a/attachment.bin
More information about the linux-mtd
mailing list