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?
- 
 
 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,
- 
 
 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.
 
 
- 
 
 Come again?
 
 You certainly can disable journaling on ext3. ... But then it becomes ext2.  
- 
 This. ^^^
 
 99.999 % of consumers will replace their hardware long before they reach the limit of their ssds somewhere in the distant future.
- 
 
 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.  
- 
 
 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.
- 
 
 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.
- 
 I think that about sums it up.
- 
 
 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).... 
- 
 
 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).
- 
 
 Probably because many of the devices that it was shipping on were not offering "raw" flash; their storage controllers keep getting smarter and smarter.
- 
 And gadget addicts will replace their hardware even sooner than that...
 
 ... this coming from someone who upgrades her phone every six months!  
 
 Though I might keep the NS for a "long" time... it sounds so good for playing music!
- 
 
 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. 
- 
 
 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...  
Why ext4 on flash media?
Discussion in 'Linux Compatibility and Software' started by debguy, Sep 21, 2011.
 Problems? See this thread at archive.org.
 Problems? See this thread at archive.org.