ramfs or ramdisk

Mo, Vincent vincent.mo at EADS-NAdefense.com
Thu Sep 6 12:15:41 EDT 2007


>From "Embedded Linux System Design and Development":


RAMDISK:
Implemented as a block device in RAM, need to create a file system on
top of it.

Needs to be preallocated in RAM before use.

2 copies of program pages are maintained: in ramdisk and in the kernel
page cache when any program is executed out of ramdisk.

Slower because any data access needs to go through the file system and
block device driver.



RAMFS:
Is a file system implemented directly in RAM.

No preallocation necessary.  Dynamic growth based on requirement.

Whenever a program is executed from a RAMFS, only one copy that is in
the kernel cache is used.  No duplication.

Is relatively faster as actual file data and metadata are in kernel
cache and no file system and block device driver overheads are involved.

  

 

 
 
 
 

Vincent Mo
Software Engineer
EADS NA Defense

>-----Original Message-----
>From: linux-arm-bounces at lists.arm.linux.org.uk [mailto:linux-arm-
>bounces at lists.arm.linux.org.uk] On Behalf Of Michael Langford
>Sent: Wednesday, September 05, 2007 8:06 AM
>To: Saravanan Chanemouganandam; linux-arm at lists.arm.linux.org.uk
>Cc: linux-mtd at lists.infradead.org
>Subject: RE: ramfs or ramdisk
>
>-----Original Message-----
>Subject: ramfs or ramdisk
>
>I would like to know which rootfs files system is best for the embedded
>systems, ramfs rootfs or ramdisk rootfs ?Can anyone point me interms of
>memory advantage.
>
>Thanks
>Sara
>
>---------------------------
>
>Timesys has a website(https://linuxlink.timesys.com/docs/initramfs) and
>podcast talking about the differences at their website. I believe the
>pertinent discussions of the different filesystems and the boot time
>tradeoffs are in the following episodes:
>
>http://www.timesys.com/podcasts/mp3/Episode_011_LinuxLink_Radio.mp3
>http://www.timesys.com/podcasts/mp3/Episode_012_LinuxLink_Radio.mp3
>
>     --Michael
>
>PS: I have no affiliation with them, just listen to their podcast.
>
>
>-------------------------------------------------------------------
>List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
>FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
>Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php



More information about the linux-mtd mailing list