The Notebook Review forums were hosted by TechTarget, who shut down them down on January 31, 2022. This static read-only archive was pulled by NBR forum users between January 20 and January 31, 2022, in an effort to make sure that the valuable technical information that had been posted on the forums is preserved. For current discussions, many NBR forum users moved over to NotebookTalk.net after the shutdown.
Problems? See this thread at archive.org.

    Why ext4 on flash media?

    Discussion in 'Linux Compatibility and Software' started by debguy, Sep 21, 2011.

  1. debguy

    debguy rip dmr

    Reputations:
    607
    Messages:
    893
    Likes Received:
    4
    Trophy Points:
    31
    Hi,

    before ext4 was popular it was said that one should use ext2 instead of ext3 on flash media due to the additional write accesses that come with ext3's journal.

    But nowadays all the android smartphones and most other devices which use a Linux kernel on flash storage come with ext4. Why is that so? I must say that I don't really know how ext4 works.
    What makes ext4 cause significantly less write accesses than ext3 and yet keeps it more robust than ext2?

    Or is it just that nobody cares for write accesses and the reduced lifetime anymore? It certainly is not because commonly used flash media have become more robust. SLC is nearly extinct and replaced with MLC RAID, and the ongoing reduction of chip scales even increases the oxidation problem which is responsible for the limited write cycles on flash media.

    Can somebody please shed some light on this?
     
  2. hf2046

    hf2046 Notebook Guru

    Reputations:
    18
    Messages:
    55
    Likes Received:
    0
    Trophy Points:
    15
    You can use ext4 without journalling enabled. That could be the case with the Android smartphones. Or, as you mentioned, flash memory has improved and people seem to rarely keep their phones for very long anyway,
     
  3. cri-cri

    cri-cri Notebook Consultant

    Reputations:
    43
    Messages:
    111
    Likes Received:
    0
    Trophy Points:
    30
    Yep, you can disable journaling on ext4 (but not on ext3). Though the above mentioned devices have journaling enabled as far as I know.
    This.

     
  4. ThinkRob

    ThinkRob Notebook Deity

    Reputations:
    1,006
    Messages:
    1,343
    Likes Received:
    2
    Trophy Points:
    56
    Come again?

    You certainly can disable journaling on ext3. ... But then it becomes ext2. :D
     
  5. v1k1ng1001

    v1k1ng1001 Notebook Deity

    Reputations:
    239
    Messages:
    738
    Likes Received:
    0
    Trophy Points:
    30
    This. ^^^

    99.999 % of consumers will replace their hardware long before they reach the limit of their ssds somewhere in the distant future.
     
  6. debguy

    debguy rip dmr

    Reputations:
    607
    Messages:
    893
    Likes Received:
    4
    Trophy Points:
    31
    But then there's no point in using ext4 over ext2, right? (Except for the faster fsck - does that fast ext4-fsck even work without journaling?)

    The reliability of flash memory has rather degraded than improved compared to 3 years ago because the more robust SLC are almost extinct and the decreased chip sizes also affect the semiconductor layers which are the reason for the limited write cycles.

    That's what I think too. :mad:
     
  7. Sxooter

    Sxooter Notebook Virtuoso

    Reputations:
    747
    Messages:
    3,784
    Likes Received:
    8
    Trophy Points:
    106
    However the single most important factor for the lifetime of a flash drive still is its size. a 64G flash drive will last much longer than a 2G flash drive if they're both written the same number of blocks because they get spread around so much. Back when flash drives / cards were measured in megabytes the difference in longevity between SLC and MLC made a real difference. Now you're looking at dozens to hundreds of years of regular use for a modern flash drive to wear out.

    If you really want to wear out an SSD fast, MLC or SLC, turn off the caches and do a lot of transactional db load. You can wear out a 64G SSD in less than 2 years of heavy load. But that's the extreme. for people putting an 8G flash card in their camera, they'll never notice the difference between SLC and MLC for lifespan, and are far more likely to be bitten by a firmware bug than the thing wearing out.
     
  8. hf2046

    hf2046 Notebook Guru

    Reputations:
    18
    Messages:
    55
    Likes Received:
    0
    Trophy Points:
    15
    Personally, I think journaling is a fairly important feature to have. As an example, I have a notebook with an SSD. A lot of users think journaling is a waste of resources since you can perform an orderly shutdown during a power outage. But that's a fairly shortsighted perspective. Suspend to RAM (on my machine) doesn't exactly work 100% of the time, sometimes requiring a hard reboot. What happens then? The same goes for a smartphone - you don't want a customer to lose important data due to some freak accident. The benefits of journaling far outweigh the risks of corrupted data and (in my view, negligible) impact on performance and device life.
     
  9. v1k1ng1001

    v1k1ng1001 Notebook Deity

    Reputations:
    239
    Messages:
    738
    Likes Received:
    0
    Trophy Points:
    30
    I think that about sums it up.
     
  10. TuxDude

    TuxDude Notebook Deity

    Reputations:
    255
    Messages:
    921
    Likes Received:
    2
    Trophy Points:
    31
    Yes for these high capacity cards - the wear and tear of the blocks is evened out... But at least still for the embedded systems using low capacity NAND and NOR flashes - they never use ext3 or ext4.... They use jffs2 or now recently ubifs if at all they plan to have a filesystem on it.... These NAND and NOR flashes are mostly accessed in raw format (when used for storing the bootloader and firmware images)....
     
  11. debguy

    debguy rip dmr

    Reputations:
    607
    Messages:
    893
    Likes Received:
    4
    Trophy Points:
    31
    So the bottom line is, ext4 is not more "gentle" towards flash memory than ext3 but partly due to the increased capacities, partly due to simply not caring for the lifetime ext4 is used nevertheless?

    I know that Android switched from yaffs2 to ext4 during the version change from 2.2 to 2.3. Does anybody know why they did that (at that moment).
     
  12. ThinkRob

    ThinkRob Notebook Deity

    Reputations:
    1,006
    Messages:
    1,343
    Likes Received:
    2
    Trophy Points:
    56
    Probably because many of the devices that it was shipping on were not offering "raw" flash; their storage controllers keep getting smarter and smarter.
     
  13. synaesthetic

    synaesthetic Notebook Evangelist

    Reputations:
    54
    Messages:
    372
    Likes Received:
    0
    Trophy Points:
    30
    And gadget addicts will replace their hardware even sooner than that...

    ... this coming from someone who upgrades her phone every six months! :D

    Though I might keep the NS for a "long" time... it sounds so good for playing music!
     
  14. debguy

    debguy rip dmr

    Reputations:
    607
    Messages:
    893
    Likes Received:
    4
    Trophy Points:
    31
    And some people only change phones when the old one dies. I've had 5 phones in the last 10 years but my current N900 is the 1st one that is not 2nd hand. And up to now I don't see a single phone on the market that could hold a candle to it.
     
  15. TuxDude

    TuxDude Notebook Deity

    Reputations:
    255
    Messages:
    921
    Likes Received:
    2
    Trophy Points:
    31
    Normally they make sure your device lasts 4 to 5 years for an average user... At least in the company I work in we used an iSSD (which is similar to flash drives more or less) in one of our products and it doesn't have any other dedicated hard drive. We estimate the wear-and-tear over a period by calculating the average number of bytes of data that would be written per day and then equating it with the maximum rated write cycles...

    Usually the firmware in these iSSD and flash controllers are getting pretty smart as well like ThinkRob mentioned. In that product I was talking about - we were initially able to get only a 2 year life for the iSSD with an older firmware because of a bug - when we told them about the bug - we were able to get a 5 year life... :)