Channels ▼


YAFFS2: Yet Another Flash File System

Flash File System Evaluations

The web is full of JFFS2 vs. YAFFS2 vs. UBIFS benchmarks, but since they tend to be very subjective, I decided to measure what is important for my particular application, i.e. mount time, writing performance and file system scan. I tested all three on ARM9-based AT91SAM926 processor with 64MB NAND flash and 128MB SDRAM, running Linux 2.6.32 kernel with the latest YAFFS2 patch. Not surprisingly, both YAFFS2 and UBIFS performed significantly better than JFFS2. What was more surprising is the fact that both YAFFS2 and UBIFS performance was very similar. Mount time was measured using:

    time mount -t jffs2 /dev/mtdblock0 /tmp/test/  
    time mount -t yaffs /dev/mtdblock0 /tmp/test
    time mount -t ubifs ubi0:test /tmp/test 

Write time using:

    time tar xf /test/rootfs.arm.tar 

That created a 81MB file system with 1865 files and read time using:

    time du -shc /tmp/test/ 

That scans the above file system. Table 1 summarizes the results.

File system Mount time Write time Read time
JFFS2 6.01s 3m 1.12s 11.82s
YAFFS2 0.18s 1m 15.88s 1.10s
UBIFS 0.17s 1m 16.74s 1.33s
Table 1

As you can see, for some operations YAFFS2 is slightly faster than UBIFS, and for some it is the other way around. All in all, the difference does not look significant, at least for my sort of application, so I had a hard time choosing the right one for my FemtoLinux Project . Eventually, I decided to go with YAFFS2, as despite its "external patch" status it seems to be more reliable and easy to use than UBIFS and certainly has better track record in commercial products. Probably the only YAFFS2 disadvantage is the lack of compression support, however for most embedded applications it is probably not an issue.

YAFFS2 is distributed free of charge under the GPL license, however a different license is also available from Aleph One, which is a commercial company that develops and supports YAFFS. When YAFFS2 is used with the Linux kernel it is distributed under GPL, however for other situations different licenses terms are available.

Related Reading

More Insights

Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.