mtd/fs/jffs3 JFFS3design.tex,1.32,1.33

Artem Bityuckiy dedekind at infradead.org
Tue Apr 12 12:45:54 EDT 2005


Update of /home/cvs/mtd/fs/jffs3
In directory phoenix.infradead.org:/tmp/cvs-serv28130

Modified Files:
	JFFS3design.tex 
Log Message:
Add a chapter with digits.


Index: JFFS3design.tex
===================================================================
RCS file: /home/cvs/mtd/fs/jffs3/JFFS3design.tex,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- JFFS3design.tex	30 Mar 2005 13:27:18 -0000	1.32
+++ JFFS3design.tex	12 Apr 2005 16:45:51 -0000	1.33
@@ -30,6 +30,9 @@
 \begin{abstract}
 This document discusses various JFFS3 high-level design aspects.
 Additionally, it defines standard JFFS3 dictionary and terms.
+
+The document assumes the reader is familiar with JFFS2 design and has at
+least read David Woodhouse's JFFS2 paper [\ref{ref_JFFSdwmw2}].
 \end{abstract}
 
 %
@@ -46,6 +49,100 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %
+% JFFS2 problems analysis
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{JFFS2 analysis}
+This section analyzes JFFS2 disadvantages in order to motivate JFFS3
+improvements. 
+
+%
+% Memory consumption
+%
+\subsection{Memory consumption}
+
+%
+% Real-live experiment
+%
+\subsubsection{Real-life experiment}
+The following experiment was done:
+\begin{itemize}
+\item an x86 PC machine with 64 MiB of simulated NAND flash (nandsim module) was
+used;
+
+\item a typical Linux root file system was put on the flash, namely
+\texttt{/bin}, \texttt{/sbin}, \texttt{/etc}, \texttt{/boot} and
+partially \texttt{/usr} from the x86 Fedora Core 2 distribution;
+
+\item the total files number was 4372 - 719 directories and 2995 regular files;
+
+\item all files' nodes were pristine;
+
+\item the summary size of all files was 116 MiB (compression was
+enabled).
+\end{itemize}
+
+The memory consumed by JFFS2 was distributed over its internal objects
+as follows.
+
+\begin{center}
+\begin{tabular}{ll}
+jffs2\_node\_ref    & 658 KiB \\
+jffs2\_node\_frag   & 913 KiB \\
+jffs2\_full\_dnode  & 545 KiB \\
+jffs2\_full\_dirent & 102 KiB \\
+\hline
+total               & 2.2 MiB
+\end{tabular}
+\end{center}
+
+If we run the following command on the same empty 64 MiB JFFS2 file
+system
+\begin{quote}
+\texttt{dd if=/dev/urandom of=/mnt/jffs\_mnt/file bs=512}
+\end{quote}
+we'll get the following result:
+
+\begin{center}
+\begin{tabular}{ll}
+jffs2\_node\_ref    & 1778 KiB \\
+jffs2\_node\_frag   & 3111 KiB \\
+jffs2\_full\_dnode  & 1777 KiB \\
+\hline
+total               & 6.7 MiB
+\end{tabular}
+\end{center}
+
+And the command
+\begin{quote}
+\texttt{dd if=/dev/urandom of=/mnt/jffs\_mnt/file bs=10}
+\end{quote}
+gives:
+
+\begin{center}
+\begin{tabular}{ll}
+jffs2\_node\_ref    & 12706 KiB \\
+jffs2\_node\_frag   & 22200 KiB \\
+jffs2\_full\_dnode  & 12686 KiB \\
+\hline
+total               & 47.6 MiB
+\end{tabular}
+\end{center}
+
+Note, that all inodes were in the inode cache in our experiment,
+which isn't that typical
+for the real-life system though. If no inodes were in the inode cache,
+only 658/1778/12706 KiB would be consumed by \texttt{jffs2\_node\_ref}
+objects. However, opening any
+file or looking up in any directory would require additional RAM.
+
+It is worth noting here, that in JFFS2 memory which is consumed even in
+the case when no files are opened is called \emph{in-core memory}.
+In-core memory mostly consists of \texttt{jffs2\_node\_ref} objects.
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
 % CHECKSUM
 %
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%





More information about the linux-mtd-cvs mailing list