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

Artem Bityuckiy dedekind at infradead.org
Wed Apr 13 09:14:34 EDT 2005


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

Modified Files:
	JFFS3design.tex 
Log Message:
Reformat. Don't use upsetting "JFFS2 problems" phrase.


Index: JFFS3design.tex
===================================================================
RCS file: /home/cvs/mtd/fs/jffs3/JFFS3design.tex,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- JFFS3design.tex	12 Apr 2005 16:45:51 -0000	1.33
+++ JFFS3design.tex	13 Apr 2005 13:14:31 -0000	1.34
@@ -49,7 +49,7 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %
-% JFFS2 problems analysis
+% JFFS2 analysis
 %
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \section{JFFS2 analysis}
@@ -60,27 +60,20 @@
 % Memory consumption
 %
 \subsection{Memory consumption}
+Let's make experiments using an x86 PC host with 64MiB simulated
+NAND flash (nandsim module). In all experiments below the whole
+flash comprises single partition where JFFS2 filesystem is put.
 
-%
-% 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;
+\begin{flushleft}\textbf{Experiment 1}\end{flushleft}
 
-\item a typical Linux root file system was put on the flash, namely
+Fulfill the JFFS2 file system with a typical Linux root FS, 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;
+partially \texttt{/usr} from the x86 Fedora Core 2 distribution.
 
-\item all files' nodes were pristine;
-
-\item the summary size of all files was 116 MiB (compression was
-enabled).
-\end{itemize}
+We observed the following.
+The total files number was 4372 - 719 directories and 2995 regular
+files (all files' nodes were made pristine). The summary size of all files was 116 MiB.
+The summary size of all files was 116 MiB (compression was enabled).
 
 The memory consumed by JFFS2 was distributed over its internal objects
 as follows.
@@ -96,12 +89,13 @@
 \end{tabular}
 \end{center}
 
-If we run the following command on the same empty 64 MiB JFFS2 file
+\begin{flushleft}\textbf{Experiment 2}\end{flushleft}
+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:
+gave the following results:
 
 \begin{center}
 \begin{tabular}{ll}
@@ -113,11 +107,13 @@
 \end{tabular}
 \end{center}
 
-And the command
+\begin{flushleft}\textbf{Experiment 3}\end{flushleft}
+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=10}
 \end{quote}
-gives:
+gave:
 
 \begin{center}
 \begin{tabular}{ll}
@@ -129,10 +125,10 @@
 \end{tabular}
 \end{center}
 
-Note, that all inodes were in the inode cache in our experiment,
+Note, that all inodes were in the inode cache in our experiments,
 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}
+only 658/1778/12706 KiB would be consumed by the \texttt{jffs2\_node\_ref}
 objects. However, opening any
 file or looking up in any directory would require additional RAM.
 
@@ -140,6 +136,45 @@
 the case when no files are opened is called \emph{in-core memory}.
 In-core memory mostly consists of \texttt{jffs2\_node\_ref} objects.
 
+Assuming the amount consumed memory grows linearly with the flash size
+(which I believe is true) we'd get the following numbers for 1GB flash
+in the same experiments:
+
+\begin{flushleft}\textbf{Experiment 1a (imaginary)}\end{flushleft}
+\begin{center}
+\begin{tabular}{ll}
+jffs2\_node\_ref    & 10.3 MiB \\
+jffs2\_node\_frag   & 14.3 MiB \\
+jffs2\_full\_dnode  & 8.5 MiB \\
+jffs2\_full\_dirent & 1.6 MiB \\
+\hline
+total               & 34.7 MiB
+\end{tabular}
+\end{center}
+
+\begin{flushleft}\textbf{Experiment 2a (imaginary)}\end{flushleft}
+\begin{center}
+\begin{tabular}{ll}
+jffs2\_node\_ref    & 27.8 KiB \\
+jffs2\_node\_frag   & 48.6 KiB \\
+jffs2\_full\_dnode  & 27.8 KiB \\
+\hline
+total               & 104.2 MiB
+\end{tabular}
+\end{center}
+
+\begin{flushleft}\textbf{Experiment 3a (imaginary)}\end{flushleft}
+\begin{center}
+\begin{tabular}{ll}
+jffs2\_node\_ref    & 198.5 KiB \\
+jffs2\_node\_frag   & 346.9 KiB \\
+jffs2\_full\_dnode  & 198.2 KiB \\
+\hline
+total               & 743.6 MiB
+\end{tabular}
+\end{center}
+
+Needless to note that this is unacceptable for embedded systems.
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %





More information about the linux-mtd-cvs mailing list