On Mon, 2002-10-14 at 16:57, Michael Sternberg wrote: > > Hello > I'm using flash with JFFS2 on it. > Well, its terribly slow and I'm looking a way to speed it up.
> What options do I have ? > Using RAM drive and copying the whole filesystem on boot to it ? > Using tmpfs filesystem ? > Something else ? A wise combination of tmpfs and cramfs is the best solution IMHO. For those not in the know tmpfs is a 'virtual' file system - the files created on it do not exist on disk. Same idea as a RAM disk, but on the file system layer, not the block device. This provides many nice advantages (like memory consumption that adapts to file usage. The ramfs file system is the exact same idea but a more limited implmentation. I recomend using tmpfs for anything you would think of using ramfs. One thing to be aware of - you need to have 'tmpfs' compiled in the kernel for mounting it (so far no big news...) BUT be aware that even if you *do not* choose to compile it into the kernel it will still be included because it is used internally by the shared memory part of the virtual memory subsystem (aka VM). The trick is that when it is used in that fashion it is marked 'unmountable' (actually some parts of the filesystem are not compiled in when compiled in this fashion) but the name of the filesystem still shows up in /proc/filesystems which could be very confusing. Only if you also have an entry for 'shm' is the filesystem actually compiled for general use. cramfs is a compressed, decompress on the fly read-only file system (don't be confused by the 'ram' in the name). The idea is that you have a compressed image of the file system that you mount using loopback device, and everytime yoyu use a (page of a) file for the first time it decompresses to ram. Thus, space is saved on the storage device (flash) because the fs is compressed and at the same time precious RAM is saved because only pages that are being accessed are decompressed, not the entire file system/block device as would be the case with tmpfs/RAM disk You can use it as a root filesystem using the black magic of the 'initrd' option. Suggested usage - Boot into a timy initrd RAM disk image, from it choose an apropriate cramfs compressed image to loopback mount as root (you can support different software version for your application by choosing different images - cool, no? :-), copy from a specific location all files that needs to be read-write to a tmpfs filesystem and terminate the initrd phase continuing the boot. Served well chilled :-) Gilad. > > Thanks > Michael. > > ================================================================= > To unsubscribe, send mail to [EMAIL PROTECTED] with > the word "unsubscribe" in the message body, e.g., run the command > echo unsubscribe | mail [EMAIL PROTECTED] > -- Gilad Ben-Yossef <[EMAIL PROTECTED]> http://benyossef.com "Geeks rock bands cool name #8192: RAID against the machine" ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]