[Yaffs] [Yaffs-archive] Re: Foot print

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Charles Manning
Date:  
To: Rajalingam Rajiv (IFIN DC SMS), Yaffs List
Subject: [Yaffs] [Yaffs-archive] Re: Foot print
On Tuesday 09 December 2003 20:21, Rajalingam Rajiv (IFIN DC SMS) wrote:
> Hello,
>     Could any of you please let me know the exact RAM footprint for
> YAFFS? We plan to use it in one of the embedded systems and trying to
> gather the RAM requirement for the same.

>
> Thanks and regards,
> Rajiv.R


Calculating an exact footprint is no easy task. There are many dependencies.

What OS? I assume Linux.
Assuming the standard block size of 512bytes per page and 16kB per block.

1) Code size. This is dependent on various factors including CPU choice,
optiomisation options etc. As a rough guide, the yaffs.o Linux module for x86
is around 55kBytes. This could be made smaller by stripping the debug text
and ECC code if you don't need that.

2) Run-time data structures. Some of these are fixed size and others are
generated in runtime and change as your file structures change. As a rough
guide though I will give the following:
a) Each yaffs partition needs a device structure of less than 1kB + approx
2-4kB stack with the current implementation.
b) If shortOpCaches are enabled, then 524 bytes per cache entry (5 to 10 is a
good number).
c) About 120 bytes per file. (With short name caching enabled)
d) About 4 bytes per block of NAND (ie. about 128 bytes per MB of NAND).
e) About 4kBytes of RAM per MB of NAND for building the file TNode trees that
are used to locate the data chunks.

Thus for a system using a 64MByte NAND and say 500 files you can budget on
approx:

1)    55kBytes
2a)    5kB
2b)   3kB (5 cache entries).
2c)   60kB
2d)  16kB
2e)   256kB


Total 410kBytes

The last item, the tnodes, is the biggest expense in YAFFS. This can be
reduced significantly by using a larger page size.

There are some opportunities to tune some of these numbers so please feel
free to discusss further if required.

-- CHarles



---------------------------------------------------------------------------------------
This mailing list is hosted by Toby Churchill open software (www.toby-churchill.org).
If mailing list membership is no longer wanted you can remove yourself from the list by
sending an email to with the text "unsubscribe"
(without the quotes) as the subject.