[MOD][ANY][Mitsuyoshi EXT4 Mod][flo]

Search This thread

jubei_mitsuyoshi

Senior Member
Mar 23, 2013
50
92
This is the flo version of my mod for the old nexus 7 here http://xdaforums.com/show....php?t=2280496

Repeating the intro to save you guys going there

Background..

With any linux system i build first thing i do is remove the journal from all my EXT4 partitions, to make a long story short ( i wont bore you with details of just how journal writes totally slow disk i/o , google it ) this gave me on average a 25% increase in system speed ( obviously due to the increased i/o rate )

I usually did it with

Code:
mke2fs.ext4 -O ^has_journal ...device...
before installing the distro, now i thought hey maybe this would work on android?

Now mke2fs is not well supported on arm but tune2fs is! in fact its included in TWRP 2.5 so


Code:
run_program("/sbin/tune2fs", "-O", "^has_journal", "/dev/block/platform/msm_sdcc.1/by-name/system");
( for the system partition) should work right , and in fact yes it does !!!, tried it from TWRP command line and hey presto %^$%^$^%$ FAST system

This is the code for a recovery script version

Code:
ui_print("jubei.....remove journals from all ext4 partitions");
ui_print("/dev/block/platform/msm_sdcc.1/by-name/boot       /boot       emmc");
ui_print("/dev/block/platform/msm_sdcc.1/by-name/recovery   /recovery   emmc");
ui_print("/dev/block/platform/msm_sdcc.1/by-name/misc       /misc       emmc");
ui_print("/dev/block/platform/msm_sdcc.1/by-name/system     /system     ext4");
ui_print("/dev/block/platform/msm_sdcc.1/by-name/userdata   /data       ext4");
ui_print("/dev/block/platform/msm_sdcc.1/by-name/cache      /cache      ext4");
ui_print("/dev/block/platform/msm_sdcc.1/by-name/sbl1       /sbl1       emmc");
ui_print("/dev/block/platform/msm_sdcc.1/by-name/sbl2       /sbl2       emmc");
ui_print("/dev/block/platform/msm_sdcc.1/by-name/sbl3       /sbl3       emmc");
ui_print("/dev/block/platform/msm_sdcc.1/by-name/tz         /tz         emmc");
ui_print("/dev/block/platform/msm_sdcc.1/by-name/rpm        /rpm        emmc");
ui_print("/dev/block/platform/msm_sdcc.1/by-name/aboot      /aboot      emmc");
ui_print("/dev/block/platform/msm_sdcc.1/by-name/sbl2b      /sbl2b      emmc");
ui_print("/dev/block/platform/msm_sdcc.1/by-name/sbl3b      /sbl3b      emmc");
ui_print("/dev/block/platform/msm_sdcc.1/by-name/tzb        /tzb        emmc");
ui_print("/dev/block/platform/msm_sdcc.1/by-name/rpmb       /rpmb       emmc");
ui_print("/dev/block/platform/msm_sdcc.1/by-name/abootb     /abootb     emmc");
ui_print("");
ui_print("");
ifelse(is_mounted("/system") == "/system", unmount("/system"));
ifelse(is_mounted("/cache") == "/cache", unmount("/cache"));
ifelse(is_mounted("/data") == "/data", unmount("/data"));
ui_print("converting partitions to ext4 minus journal");
ui_print(" ");
ui_print("e2fsck system partition");
ui_print(" ");
run_program("/sbin/e2fsck", "-p", "/dev/block/platform/msm_sdcc.1/by-name/system");
ui_print("e2fsck data partition");
ui_print(" ");
run_program("/sbin/e2fsck", "-p", "/dev/block/platform/msm_sdcc.1/by-name/userdata");
ui_print("e2fsck cache partition");
ui_print(" ");
run_program("/sbin/e2fsck", "-p", "/dev/block/platform/msm_sdcc.1/by-name/cache");
ui_print("now lets rub out those nasty journals");
ui_print(" ");
run_program("/sbin/tune2fs", "-O", "^has_journal", "/dev/block/platform/msm_sdcc.1/by-name/userdata");
run_program("/sbin/tune2fs", "-O", "^has_journal", "/dev/block/platform/msm_sdcc.1/by-name/system");
run_program("/sbin/tune2fs", "-O", "^has_journal", "/dev/block/platform/msm_sdcc.1/by-name/cache");
ui_print("and re-fsck to clean any set bits");
ui_print(" ");
ui_print("e2fsck system partition");
ui_print(" ");
run_program("/sbin/e2fsck", "-p", "/dev/block/platform/msm_sdcc.1/by-name/system");
ui_print("e2fsck cache partition");
ui_print(" ");
run_program("/sbin/e2fsck", "-p", "/dev/block/platform/msm_sdcc.1/by-name/userdata");
ui_print("e2fsck cache partition");
ui_print(" ");
run_program("/sbin/e2fsck", "-p", "/dev/block/platform/msm_sdcc.1/by-name/cache");
ui_print("end of jubei mod ");

And i include a zip for those who like to test

there are 2 scripts, one to remove the journal from your ext4 partitions, and one to re-instate the journal, this should allow people to test their setup with each without any wiping or reformatting

Instructions.......
( tested with TWRP 2.5+ only )
Flash the bugger
DO NOT WIPE ANYTHING, after flashing, doing so will only reformat the wiped partition with a journal

There will be one update that includes a test routine to ensure journals have been erased
I am now able to extend the mod to any device that uses twrp 2.5+ and ext4, plese ask for a particular device on this thread
Thank you
Edit Please note non flo versions are not tested by me.
Edit mako version added after request
Edit hammerhead version added after request
 

Attachments

  • jubei_add_journal_flo.zip
    139.8 KB · Views: 320
  • jubei_remove_journal_flo.zip
    139.8 KB · Views: 454
  • jubei_remove_journal_mako.zip
    139.9 KB · Views: 53
  • jubei_remove_journal_hammerhead.zip
    139.9 KB · Views: 87
Last edited:

habylab

Senior Member
Dec 3, 2010
6,228
1,200
Is this safe though?

Sent from my Nexus 7 (2014) using Tapatalk. My mobile is a CM11 run Galaxy S3.
 

frost_nz

Senior Member
May 14, 2012
506
238
Christchurch
I remember the great results on got from this on my grouper :D when I flashed this on flo it seemed to run the script fine but the recovery automatically rebooted when it had finished. Is this to be expected? Device booted fine and running great so far. Thanks!

Sent from my Nexus 7 using XDA Premium 4 mobile app
 

Lazy79

Senior Member
Dec 13, 2008
1,187
245
44
Munich
politics2day.eu
ok will do a mako and nexus s for tonight sometime :)

Removing journal works good here. Actually I'm always doing the same (using manjaro here).i wonder if you even have the time to make a patch for removing the journal for the LG G2 (d802). Just a question ☺ I never thought about removing it on my phones, too.. Really nice idea and patch! ☺ than you very much!
 

jubei_mitsuyoshi

Senior Member
Mar 23, 2013
50
92
I remember the great results on got from this on my grouper :D when I flashed this on flo it seemed to run the script fine but the recovery automatically rebooted when it had finished. Is this to be expected? Device booted fine and running great so far. Thanks!

Sent from my Nexus 7 using XDA Premium 4 mobile app

no have not had twrp just go straight into reboot, it normally stops then allows the normal options, a bit strange :) of anyone else gets it will look into it, if it happens to you again please mention it here,
Thanks
 

jubei_mitsuyoshi

Senior Member
Mar 23, 2013
50
92
mako done, but obviously canot test thoroughly, if anyone has any issues please bring em up here and i will look into them.
hammerhead and nexus s coming :)
 
  • Like
Reactions: jordirpz

datallboy

Senior Member
Feb 7, 2013
511
94
Ran benchmark in antutu and it decreased storage io by about 200, and database io by about 80.

Is this suppose to happen?

Sent from my Nexus 7 using xda app-developers app
 

jubei_mitsuyoshi

Senior Member
Mar 23, 2013
50
92
Ran benchmark in antutu and it decreased storage io by about 200, and database io by about 80.

Is this suppose to happen?

Sent from my Nexus 7 using xda app-developers app

nope :) most of the testing from the previous thread seemed positive, although i believe the benchmarker was different.
I have done zero benchmarking on the n7 2013.
Try running the same test several times i think you will find quite a large margin of innacuracy.
Removing the journal on a battery backed solid system seems common sense to me, thats why i do it.
I believe you would find most benefit flashing after gapps since then the system will have never initialised a journal in the first place.
And the following code in your init.d should bring out the i/o benefits

Ps hammerhead is up


Code:
	busybox mount -o remount,noatime,nobh /system
	busybox mount -o remount,noatime /data
	busybox mount -o remount,noatime,nobh /cache
 
Last edited:

kcxda78

Senior Member
Nov 16, 2010
82
9
Samsung Galaxy S21 Ultra
nope :) most of the testing from the previous thread seemed positive, although i believe the benchmarker was different.
I have done zero benchmarking on the n7 2013.
Try running the same test several times i think you will find quite a large margin of innacuracy.
Removing the journal on a battery backed solid system seems common sense to me, thats why i do it.
I believe you would find most benefit flashing after gapps since then the system will have never initialised a journal in the first place.
And the following code in your init.d should bring out the i/o benefits

Ps hammerhead is up


Code:
	busybox mount -o remount,noatime,nobh /system
	busybox mount -o remount,noatime /data
	busybox mount -o remount,noatime,nobh /cache

So what does this code do? Should i add it into my init.d on mako?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 11
    This is the flo version of my mod for the old nexus 7 here http://xdaforums.com/show....php?t=2280496

    Repeating the intro to save you guys going there

    Background..

    With any linux system i build first thing i do is remove the journal from all my EXT4 partitions, to make a long story short ( i wont bore you with details of just how journal writes totally slow disk i/o , google it ) this gave me on average a 25% increase in system speed ( obviously due to the increased i/o rate )

    I usually did it with

    Code:
    mke2fs.ext4 -O ^has_journal ...device...
    before installing the distro, now i thought hey maybe this would work on android?

    Now mke2fs is not well supported on arm but tune2fs is! in fact its included in TWRP 2.5 so


    Code:
    run_program("/sbin/tune2fs", "-O", "^has_journal", "/dev/block/platform/msm_sdcc.1/by-name/system");
    ( for the system partition) should work right , and in fact yes it does !!!, tried it from TWRP command line and hey presto %^$%^$^%$ FAST system

    This is the code for a recovery script version

    Code:
    ui_print("jubei.....remove journals from all ext4 partitions");
    ui_print("/dev/block/platform/msm_sdcc.1/by-name/boot       /boot       emmc");
    ui_print("/dev/block/platform/msm_sdcc.1/by-name/recovery   /recovery   emmc");
    ui_print("/dev/block/platform/msm_sdcc.1/by-name/misc       /misc       emmc");
    ui_print("/dev/block/platform/msm_sdcc.1/by-name/system     /system     ext4");
    ui_print("/dev/block/platform/msm_sdcc.1/by-name/userdata   /data       ext4");
    ui_print("/dev/block/platform/msm_sdcc.1/by-name/cache      /cache      ext4");
    ui_print("/dev/block/platform/msm_sdcc.1/by-name/sbl1       /sbl1       emmc");
    ui_print("/dev/block/platform/msm_sdcc.1/by-name/sbl2       /sbl2       emmc");
    ui_print("/dev/block/platform/msm_sdcc.1/by-name/sbl3       /sbl3       emmc");
    ui_print("/dev/block/platform/msm_sdcc.1/by-name/tz         /tz         emmc");
    ui_print("/dev/block/platform/msm_sdcc.1/by-name/rpm        /rpm        emmc");
    ui_print("/dev/block/platform/msm_sdcc.1/by-name/aboot      /aboot      emmc");
    ui_print("/dev/block/platform/msm_sdcc.1/by-name/sbl2b      /sbl2b      emmc");
    ui_print("/dev/block/platform/msm_sdcc.1/by-name/sbl3b      /sbl3b      emmc");
    ui_print("/dev/block/platform/msm_sdcc.1/by-name/tzb        /tzb        emmc");
    ui_print("/dev/block/platform/msm_sdcc.1/by-name/rpmb       /rpmb       emmc");
    ui_print("/dev/block/platform/msm_sdcc.1/by-name/abootb     /abootb     emmc");
    ui_print("");
    ui_print("");
    ifelse(is_mounted("/system") == "/system", unmount("/system"));
    ifelse(is_mounted("/cache") == "/cache", unmount("/cache"));
    ifelse(is_mounted("/data") == "/data", unmount("/data"));
    ui_print("converting partitions to ext4 minus journal");
    ui_print(" ");
    ui_print("e2fsck system partition");
    ui_print(" ");
    run_program("/sbin/e2fsck", "-p", "/dev/block/platform/msm_sdcc.1/by-name/system");
    ui_print("e2fsck data partition");
    ui_print(" ");
    run_program("/sbin/e2fsck", "-p", "/dev/block/platform/msm_sdcc.1/by-name/userdata");
    ui_print("e2fsck cache partition");
    ui_print(" ");
    run_program("/sbin/e2fsck", "-p", "/dev/block/platform/msm_sdcc.1/by-name/cache");
    ui_print("now lets rub out those nasty journals");
    ui_print(" ");
    run_program("/sbin/tune2fs", "-O", "^has_journal", "/dev/block/platform/msm_sdcc.1/by-name/userdata");
    run_program("/sbin/tune2fs", "-O", "^has_journal", "/dev/block/platform/msm_sdcc.1/by-name/system");
    run_program("/sbin/tune2fs", "-O", "^has_journal", "/dev/block/platform/msm_sdcc.1/by-name/cache");
    ui_print("and re-fsck to clean any set bits");
    ui_print(" ");
    ui_print("e2fsck system partition");
    ui_print(" ");
    run_program("/sbin/e2fsck", "-p", "/dev/block/platform/msm_sdcc.1/by-name/system");
    ui_print("e2fsck cache partition");
    ui_print(" ");
    run_program("/sbin/e2fsck", "-p", "/dev/block/platform/msm_sdcc.1/by-name/userdata");
    ui_print("e2fsck cache partition");
    ui_print(" ");
    run_program("/sbin/e2fsck", "-p", "/dev/block/platform/msm_sdcc.1/by-name/cache");
    ui_print("end of jubei mod ");

    And i include a zip for those who like to test

    there are 2 scripts, one to remove the journal from your ext4 partitions, and one to re-instate the journal, this should allow people to test their setup with each without any wiping or reformatting

    Instructions.......
    ( tested with TWRP 2.5+ only )
    Flash the bugger
    DO NOT WIPE ANYTHING, after flashing, doing so will only reformat the wiped partition with a journal

    There will be one update that includes a test routine to ensure journals have been erased
    I am now able to extend the mod to any device that uses twrp 2.5+ and ext4, plese ask for a particular device on this thread
    Thank you
    Edit Please note non flo versions are not tested by me.
    Edit mako version added after request
    Edit hammerhead version added after request
    2
    ok will do a mako and nexus s for tonight sometime :)
    1
    I imagine this will still work on CWM? Or is there a reason it won't?

    Sent from my Nexus 5 with the KlearKat tapatalk app! ;)

    to be honest no idea. im developing on twrp exclusively, as long as CWM has tune2fs and is EDIFY complient should be good to go
    1
    Nice speed up on flo.
    How bout if i run this on mako....?

    Sent from my Nexus 7 using xda app-developers app

    not sure will have to check but doubt it :)

    As said in the post though, can do a version for any device that uses ext4 and twrp , do you need a mako version ?
    1
    mako done, but obviously canot test thoroughly, if anyone has any issues please bring em up here and i will look into them.
    hammerhead and nexus s coming :)