Sunday, 6 May 2012

Difference between JFFS2 and Sqashfs

I was trying to read about the differences between Jffs2 and Sqashfs filesystems. I could not find differences in bullets so i created this for my reference.




Squashfs is a highly compressed read-only filesystem for Linux. Squashfs compresses both files, inodes and directories, and supports block sizes up to 1Mbytes for greater compression. It is implemented as a kernel module under VFS.



Journalling Flash File System version 2 or JFFS2 is a log-structured file system for use with flash memory devices. It is the successor to JFFS. JFFS2 has been included in the Linux kernel since the 2.4.10 (2001-09-23) release. Most prominently JFFS2 is used in OpenWrt.
At least three file systems have been developed as JFFS2 replacements; LogFS, UBIFS, and YAFFS.


Squashfs:

  • Data, inodes and directories are compressed.
  • Squashfs stores full uid/gids (32 bits), and file creation time.
  • Files up to 2^64 bytes are supported. Filesystems can be up to 2^64 bytes.
  • Inode and directory data are highly compacted, and packed on byte boundaries. Each compressed inode is on average 8 bytes in length (the exact length varies on file type, i.e. regular file, directory, symbolic link, and block/char device inodes have different sizes).
  • Squashfs can use block sizes up to 1Mbytes (the default size is 128K). Using 128K blocks achieves greater compression ratios than the normal 4K block size.
  • File duplicates are detected and removed.
  • Both big and little endian architectures are supported. The mksquashfs program can generate filesystems for different endian architectures for cases where the host byte ordering is different to the target. This is useful for embedded systems.
  • SquashFS supports variable block size 0.5KB to 64KB
  • SquashFS supports compression of both the metadata and block fragments 
  • SquashFS  comes as a set of kernel patches and the driver module
  • SquashFS is a read-only file system

JFFS2 (Journaling Flash file system) :
  • Designed specifically for use with both NOR and NAND flash devices. 
  • Compression. Three algorithms are available: zlib, rubin, and rtime.
  • Better performance. JFFS treated the disk as a purely circular log. 
  • It has mechanisms for plugging in different compression algorithms, including not using any compression at all.
  •  JFFS2 is integrated into the kernel.
  • JFFS2 is a read/write file system


Source :





No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...