5,600,664 Members 37,429 Now Online
XDA Developers Android and Mobile Development Forum

[REF] Ext4 speed improvement with a safe mount option on /data

Tip us?
 
supercurio
Old
(Last edited by supercurio; 16th December 2010 at 11:59 PM.)
#1  
supercurio's Avatar
Senior Recognized Developer - OP
Thanks Meter 5063
Posts: 3,528
Join Date: May 2010
Location: Chambéry

 
DONATE TO ME
Default [REF] Ext4 speed improvement with a safe mount option on /data

Hey everyone.

As I spend some time on studying Ext4 for the Galaxy S devices, working on Voodoo lagfix, and based on what I saw in mount logs it's possible that the performances could be increased without altering data integrity nor filesystem integrity in case of crash.
On /data, noauto_da_alloc is not used.

This option activates a sort of Ext3 emulation mode, which force sync on write close without sync.

It also comes with a speed penalty for SQLite writes, and is unneccessary when hardware barriers are enabled.
Barriers allow usage of delayed allocations without risk. Delayed allocations are the key to performance for modern filesystems.

as root:

Code:
mount -o remount,noauto_da_alloc /data /data
You can count on me to cook a kernel with this mount option as default

PS: this option is already used in Voodoo kernels for Galaxy S devices / has been chosen after extensive performance and reliability tests.
The Following 10 Users Say Thank You to supercurio For This Useful Post: [ Click to Expand ]
 
supercurio
Old
(Last edited by supercurio; 17th December 2010 at 12:13 AM.)
#2  
supercurio's Avatar
Senior Recognized Developer - OP
Thanks Meter 5063
Posts: 3,528
Join Date: May 2010
Location: Chambéry

 
DONATE TO ME
Okay, kevin_teslacoil run quadrant:

before:
<kevin_teslacoil> 1676 for the full quadrant bench mark


after:
<kevin_teslacoil> interesting
<kevin_teslacoil> 2422 this time
<GuiPer> :eek:
<Ibanez33> wtf?

I'm not a fan of quadrant, but used as a tool, it can give some useful infos
Also, note that this dramatic change in benchmark result won't be as incredible in real life usage.
But still, it's a better choice of configuration, using the filesystem driver like it should be given the hardware parameters.
The Following User Says Thank You to supercurio For This Useful Post: [ Click to Expand ]
 
jaju123
Old
#3  
Senior Member
Thanks Meter 92
Posts: 979
Join Date: Jul 2010
Can this be implemented in Voodoo for SGS?
 
supercurio
Old
#4  
supercurio's Avatar
Senior Recognized Developer - OP
Thanks Meter 5063
Posts: 3,528
Join Date: May 2010
Location: Chambéry

 
DONATE TO ME
Reference, from man mount.

Quote:
auto_da_alloc|noauto_da_alloc
Many broken applications don't use fsync() when noauto_da_alloc replacing existing files
via patterns such as

fd = open("foo.new")/write(fd,..)/close(fd)/ rename("foo.new", "foo")

or worse yet

fd = open("foo", O_TRUNC)/write(fd,..)/close(fd).

If auto_da_alloc is enabled, ext4 will detect the replace-via-rename and replace-via-trun‐
cate patterns and force that any delayed allocation blocks are allocated such that at the
next journal commit, in the default data=ordered mode, the data blocks of the new file are
forced to disk before the rename() operation is commited. This provides roughly the same
level of guarantees as ext3, and avoids the "zero-length" problem that can happen when a
system crashes before the delayed allocation blocks are forced to disk.
The Following User Says Thank You to supercurio For This Useful Post: [ Click to Expand ]
 
Tynen
Old
#5  
Tynen's Avatar
Senior Member
Thanks Meter 16
Posts: 396
Join Date: Aug 2009
Location: Kirkland, WA
I'm trying this now.
Phone: ATT Galaxy S 3
ROM: CM10 Nightly Builds

Phone: GSM Galaxy Nexus
ROM: JB JRN84D


Tablet: Nook Color
ROM: CyanogenMod 7.1
Get Dropbox

 
supercurio
Old
#6  
supercurio's Avatar
Senior Recognized Developer - OP
Thanks Meter 5063
Posts: 3,528
Join Date: May 2010
Location: Chambéry

 
DONATE TO ME
Quote:
Originally Posted by jaju123 View Post
Can this be implemented in Voodoo for SGS?
It's already implemented in Voodoo
 
jaju123
Old
#7  
Senior Member
Thanks Meter 92
Posts: 979
Join Date: Jul 2010
Okay thanks
 
k0mpresd
Old
#8  
Senior Member
Thanks Meter 25
Posts: 263
Join Date: Mar 2009
Still at it I see?
 
Anderdroid
Old
#9  
Anderdroid's Avatar
Senior Member
Thanks Meter 105
Posts: 1,198
Join Date: Dec 2009
Location: Palo Alto

 
DONATE TO ME
We lose this whenever we reboot I'm assuming?

Quadrant scores:
Before: 1672
After: 2334

Cook this into some good 1.2GHz OC/UV

We already know the Hummingbird can potentially hit 1.6
AppLovin Android Developer
Developer of quake3droid



Follow me on Twitter !
http://twitter.com/LeakedDave
The Following User Says Thank You to Anderdroid For This Useful Post: [ Click to Expand ]
 
xan
Old
#10  
xan's Avatar
Recognized Developer
Thanks Meter 454
Posts: 1,399
Join Date: May 2006
Location: Crack-ow

 
DONATE TO ME
Its late, nevermid
Feeling like translating something? here you go
Voltage Control Lite/Extreme 4.9.8 *Siyah support + Profiles + Widget + CPU history*: -> Take control of your OC/UV for Galaxy S OC kernels. Android Market / YAAM
ExTweaks / ExTweaks Plus 0.20 *Universal Tweaks Interface frontend for Siyah kernel*

14apr: [Froyo]Insane OC/UV kernel K13E
What is your OC result?

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes