Conclusion

JFFS2 memory consumption is generally depending on the followings: the size of the used space, the number of the files and the size of the opened files. The dependences are linear.

The permanent memory consumption is about 0.7% - 1.1% of used space, which is the sum of the size of files (jffs2_raw_inode_ref) + 24 bytes per files (jffs2_ino_cache). The dirty space (files which has already been deleted but not yet garbage collected) is also the part of the used space. The consumption dynamically increases if the used space grows.

If you open a file by the read or write operation, that requires additional memory. The size of it is about 1.5% - 2.0% of the size of the file. It comes from jffs2_full_dnode, jffs2_tmp_dnode_info and jffs2_full_dnode data structures. (jffs2_raw_node_ref has already been counted above, jffs2_raw_inode has always only one instance).

Using these formulas you can calculate how many RAM your system needs. Don't forget: increasing the sizes (especially if you use large files) the system will not only require much more memory but also will be slower and slower.

Havasi Ferenc 2005-12-22