EXT4, SquashFS, JFFS2 & More: File System Comparison

A quick comparison of EXT4, UBIFS, TMPFS, JFFS2, and SquashFS to highlight strengths, weaknesses, and best use cases.
EXT4, SquashFS, JFFS2 & More: File System Comparison

Table of Contents

Been studying file systems over the past two weeks—just taking some notes.

ext4

Features: Supports large capacity (single file up to 16 TiB, total up to 1 EiB), journaling, high stability.
Use cases: Yocto root file systems, Android’s /system partition, general-purpose storage.
Pros: Highly reliable, suitable for applications requiring large data storage and fast access.
Cons: Less optimized for special storage media like flash compared to dedicated file systems.

SquashFS

Features: High compression ratio, read-only, fast mounting.
Use cases: Yocto firmware images, read-only root file systems (like /usr), container images.
Pros: Saves space, ideal for scenarios requiring minimal storage footprint.
Cons: Read-only nature limits use in applications needing dynamic content modification.

UBIFS

Features: Optimized for NAND flash (bad block management, compression), dynamic partition resizing, journaling.
Use cases: Read/write flash storage on ARM embedded devices (IoT devices, industrial control systems).
Pros: Flash-specific design offers good wear leveling and reliability.
Cons: May not suit non-flash media compared to more general-purpose file systems.

JFFS2

Features: Directly operates flash blocks, power-loss protection, supports NOR/NAND flash.
Use cases: Small flash partitions (bootloader, kernel), read/write partitions on low-power devices.
Pros: Simple and efficient, ideal for small embedded systems.
Cons: Performance may degrade as flash size increases.

tmpfs

Features: RAM-based ultra-fast read/write, dynamically resizable.
Use cases: Temporary caches (/tmp), process shared memory, runtime temp data storage.
Pros: Extremely fast due to RAM storage.
Cons: Non-persistent—data lost on power-off.

FAT32/vfat

Features: Cross-platform compatible (Windows/Android/Linux), supports UEFI boot.
Use cases: Android external storage (SD card/USB), Yocto UEFI boot partitions.
Pros: Widely compatible, ideal for external storage.
Cons: Max file size limit (4GB), lacks advanced features like permission controls.

F2FS

Features: Flash lifespan optimization (TRIM, garbage collection), high-performance random writes.
Use cases: Android user data partition (/data), frequent R/W scenarios on flash devices.
Pros: Flash-specific design improves write efficiency and flash lifespan.
Cons: Primarily optimized for flash, may not suit other storage types.

Comparison

Note: Due to fixed-width formatting, best viewed on desktop.

Features/File Systemext4SquashFSUBIFSJFFS2tmpfsFAT32/vfatF2FS
TypeGeneral File SystemRead-only compressionNAND Flash DebicatedNOR/NAND FlashIn-memory file systemCross-platform compatibilityFlash memory dedicated
Read and Write SupportSupport reading and writingRead-onlySupport reading and writingSupport reading and writingMemory-basedSupport reading and writingSupport reading and writing
Compression Supportnonehighoptionalnonenonenonenone
Applicable StorageHard disk, SSD, etc.Universal StorageNAND FlashNOR/NAND FlashRAMSD card, USB flash drive, etc.SSD, eMMC, etc.
Service TargetLarge capacity, high stabilityReduce space usageImproving Flash ReliabilitySmall embedded systemsExtremely fast reading and writingCross-platform compatibilityOptimizing Flash Life
Typical UsesRoot file system, system partitionFirmware, container imagesIoT, Industrial Control SystemsBootloader, kernelTemporary CacheSD card, UEFI bootUser data partition

Special Notes:

Embedded systems usually choose to use SquashFS (read-only) or UBIFS (read-write) as rootfs.

Note: Due to the limitation of equal width, the reading experience of the table may be better on a computer.

CharacteristicSquashFSUBIFS
TypeRead-only compressionLog-based, supports writing
Read and Write SupportRead-onlySupport reading and writing
CompressionHigh compression rate, can reduce space usageNo compression
Storage TypeUniversal StorageFlash memory (NAND)
Applicable scenariosFirmware, read-only systemEmbedded Flash Storage

Note that rootfs is not a specific file system type, but refers to the root file system that is first mounted during Linux system boot. It can be implemented using any of the file system types mentioned above.

  • SquashFS used as a read-only root file system;
  • UBIFS used as a writable partition;
  • rootfs manages these partitions in a unified manner;

In practice, a combination is often used—for example, configuring rootfs as SquashFS, and the data partition as UBIFS.

End-of-DiskMFR-blog

Disclaimer:

  1. This channel does not make any representations or warranties regarding the availability, accuracy, timeliness, effectiveness, or completeness of any information posted. It hereby disclaims any liability or consequences arising from the use of the information.
  2. This channel is non-commercial and non-profit. The re-posted content does not signify endorsement of its views or responsibility for its authenticity. It does not intend to constitute any other guidance. This channel is not liable for any inaccuracies or errors in the re-posted or published information, directly or indirectly.
  3. Some data, materials, text, images, etc., used in this channel are sourced from the internet, and all reposts are duly credited to their sources. If you discover any work that infringes on your intellectual property rights or personal legal interests, please contact us, and we will promptly modify or remove it.
DiskMFR Field Sales Manager - Leo

It’s Leo Zhi. He was born on August 1987. Major in Electronic Engineering & Business English, He is an Enthusiastic professional, a responsible person, and computer hardware & software literate. Proficient in NAND flash products for more than 10 years, critical thinking skills, outstanding leadership, excellent Teamwork, and interpersonal skills.  Understanding customer technical queries and issues, providing initial analysis and solutions. If you have any queries, Please feel free to let me know, Thanks

Please let us know what you require, and you will get our reply within 24 hours.









    Our team will answer your inquiries within 24 hours.
    Your information will be kept strictly confidential.

    • Our team will answer your inquiries within 24 hours.
    • Your information will be kept strictly confidential.

    Let's Have A Chat

    Learn How We Served 100+ Global Device Brands with our Products & Get Free Sample!!!

    Email Popup Background 2