Nexus S

In an almost overlooked note on the Android Developers Blog, Tim Bray lets us know that starting with the Nexus S and Gingerbread, some Android devices will be moving from the YAFFS file system to the ext4 file system.  This is going to bring a big boost in input and output file operations, and explains some of the amazing speed improvements we're already seeing on the Nexus S.

Two things to mention here -- the increase in speed comes with a cost, and not all current (or new) devices will see this change.  The lifespan of the media will be reduced by using the ext4 file system, but modern solid state memory should still last for quite a few years, so I don't see a serious problem with it.  The other issue is which phones will see this boost.  I've a gut feeling that this is reserved for only new devices with big internal memory space, like the Nexus S, that have a controller that can use it.  I wouldn't count on your current phone to get this change -- at least officially -- but hopefully manufacturers will make sure their new devices meet the needed specs.

Not sure what exactly an ext4 file system is, or want to talk about these changes and what they might mean to Android?  Get in the Gingerbread forums and suss it all out.  Feed your geek. [Android Developer blog via Thunk.org] Thanks Sean!

 
There are 13 comments

icebike says:

While beginning to be mainstream in the Linux world, EXT4 hardly seems the file system I would choose for a mere 16gigs of storage. EXT4 is known for a number of things, but Speed isn't on of them.

There are a lot more resilient and less demanding choices out there.

Plus I would bet dollars to donuts it won't be a standard ext4 such that you could yank your microSD card out and build the file system from your linux machine. Somehow, I suspect removable media will stay on Fat32.

gg101 says:

The other Galaxy S phones use an RFS filesystem, which is slow. There are voodoo kernels out there made by devs which basically convert to the much speedier ext4. Nice to see this is now the default on gingerbread phones.

icebike says:

RFS is just Fat file system, tweaked. Robust Fat file System.

But its my understanding, correct me if I'm wrong, that the "conversion" amounts to a shadowing of the existing RFS, i.e. adding ext4 as a ram disk on top of the existing RFS system, which yields apparent speed, but is really insecure, as data is not written when you think it is written.

In any event, I'm glad to see that google stepped up and forced Samsung to stop that RFS nonsense on the Nexus S.

Here is a document that explains RFS and problems writing to Flash memory in general:
http://www.samsung.com/global/business/semiconductor/products/fusionmemo...

rajendra82 says:

You are not aware of all the development regarding the file system on Galaxy S phones. When initial Quadrant benchmark results on Galaxy S were disappointing considering the processor specs, some developers delved into the details, and found that the bottleneck was the I/O system. This was because the internal sdcard was mounted as the slow RFS. The first solution (by mimocan) was to move the contents of /data partition on to the external sd card on a special ext2 or ext3 partition and create a symlink. The second version of this was by RyanZA and created a block ext2 loopback device file residing on the internal sdcard RFS partition, the actual /data was copied on top of this block device. This lagfix actually gives the highest quadrant score but is not the latest and greatest solution. Since this Supercurio has come up with a voodoo lagfix, which actually replaces RFS partitions with ext4, and mounts them as such at boot time. This is the voodoo lagfix, which is now at version 5, and currently replaces all RFS partitions (/data /dbdata /system and /cache) with ext4. This is coincidentally the same solution that Google uses on Nexus S. There are a few minor differences, but we are basically in almost the same place. By the way Google has not forced Samsung to abandon RFS. Samsung will still use it on their Gingerbread ROMs, to be released months later. If we are still waiting for Samsung by then, we will immediately rip out the RFS and replace it with ext4.

thebizz says:

While I know ext4 is good which is faster ext3 or ext4.

icebike says:

Ext3 is still present in ext4 file systems.

Ext4 is slower because it has more work to do (journaling) above and beyond what ext3 does each time you write to a file.

That being said, ext4 sometimes "seems" to be faster because of some significant rewrites in the ext3 code that go a long way toward making up for the additional overhead, such as early commit (making the OS think the data was written when in fact only the journal was written).

icebike says:

I'm also not convinced the lifespan of media will be reduced by ext4.
After all, XSR (eXtended Sector Remapping) will probably still be utilized underneath ext4, just as it is on all flash memory.

XSR incorporates wear leveling.

bszmyd says:

Some abstraction layer will have to be used if they are talking to RAW NAND without an FTL. In that case most likely UBI and then write the ext4 on top of the block device that UBI gives them. That said, I'm pretty sure they will loose all advantages of EXT4 with this method and would make more sense just to use UBIfs on top of the UBI layer...

If they were using YAFFS before, then they were using RAW NAND without an FTL...so either they changed to something more similar to a microSD/CompactFlash type of storage medium, or we are getting information from someone who is confused.

rajendra82 says:

The NexusS uses iNAND from Sandisk. I believe the iNAND, like the moviNAND used in the Galaxy S line handles the wear leveling internally, so you have to mount a block device file system on top. Google chose the ext4 solution because this is more open than the RFS by Samsung. Google reps themselves have posted this information on xda.

RC46 says:

Am I the only one that fears that Android is moving in a direction that will see the phase out of removable storage?

Why else would the Nexus S lack micro SD card?

MowDownJoe says:

Because they need their dev phone to be able to properly test the newest features of Gingerbread? I mean, two of the big features of Gingerbread are just official support for features that OEMs have already put into phones (internal storage and front-facing cameras). I'm sure most new Gingerbread phones will have both a MicroSD slot (probably left blank or packed in with a cheapo 2GB MicroSD) and internal storage.

Like with all technology, constantly playing catch up for the newest features. Your new device today becomes old school within a year.

rovex says:

DJSteve had been playing with ext4 for the Dell Streak. Its not 100% reliable yet but scores in Quadrant are hitting 3000+. When added to his Froyo ROM, OC kernel and other tweaks the device is lightening fast.