Poor performance writing on /data

Search This thread

monossidoz

Member
Jul 20, 2009
27
6
Hi all
My Galaxy Nexus with CM10 a week ago has started to lag a little bit, and the situation was getting worse day by day...
wipe didn't solve anything

so I tried to run some benchmark in order to understand if it's an hardware problem

with androbench I noticed that the write values are ridiculous

what can I do before bring it back to the manufacter?
 

Attachments

  • Screenshot_2012-12-04-15-05-33.jpg
    Screenshot_2012-12-04-15-05-33.jpg
    38.1 KB · Views: 2,911
  • Like
Reactions: efx456 and luuly

mariosraptor

Senior Member
Nov 21, 2006
2,330
682
Corfu
Mine has similar results with androbench and is 2 weeks old. I have not deleted any big files also. The gotbrick app says that my emmc chip is unknown.

Sent from my Galaxy Nexus using xda premium
 

mariosraptor

Senior Member
Nov 21, 2006
2,330
682
Corfu

mariosraptor

Senior Member
Nov 21, 2006
2,330
682
Corfu
I just finished the forever gone solution. Tbh it is now worst than before.
Androbench took ages to finish and half the results.
So, to summirize. We should not try any solutions like this or via adb or any other that will make the device perform more slowly.
We bought a phone and expect it to work. Google should step up and fix every possible bug out there and ofcourse not introduce new ones.

Sent from my Galaxy Nexus using xda premium
 

ph4zrd

Senior Member
Nov 30, 2012
72
88
Dresden, Saxony
Nope. The app did not suggest that

The app isn't made for fixing this problem. It is made for overwriting free space on the sdcard.
So of course this doesn't fix it. The mount option does and is absolutely essential.
By simply using Forever Gone you only tried how bad this can get ;)

I will reflash the stock omage again.

This might temporarily help (a wipe of the system, cache and userdata partitions does), at least a little bit.
But it doesn't fix the problem. The phone will slow down again.


Step-by-step guide

1.
Make sure you have a eMMC chip of type V3U00M using this or this app as I mentioned above.
Otherwise it might be possible that the following commands HARD BRICK your phone.
You can also use the following command: cat /sys/class/block/mmcblk0/device/name

2.
Make sure your phone is rooted.

3.
Install and run this app.
This temporarily solves the problem, the phone will eventually begin to slow down again.

Type the following commands in a Terminal or preferably an adb shell:
Code:
[strike]su
mount -o remount,discard /data
dd if=/dev/zero of=/data/tmp.bin
rm /data/tmp.bin[/strike]
It WILL take a long time (up to 3 hours maybe) and your phone might soft-reboot like mine did. Therefore using adb would be better... Some users also reported a speedup when this is done in recovery mode (CWM/TWRP) via adb.
The dd command seems to fail, issuing a message similar to "no space left on device". This is normal as we don't give the command a particular file size so it fills the partition until no space is left on it. (That's what we want to do)
This temporarily solves the problem. After you reboot the remount option is lost and the phone will begin to slow down again.
Btw, you can also use the Forever Gone app instead of the dd/rm commands. So if you don't want to use the command line, apply Step 4 first (using Script Manager), reboot and then run Forever Gone.


4.
To prevent this, add the following code to a script and put it in the init.d folder (if your rom supports it) or use an app like Script Manager to run it on every boot. (Make sure it is started with root privileges!)
Code:
#!/system/bin/sh 
mount -o remount,discard /data
mount -o remount,discard /cache

5.
Profit.

The only phones affected seem to be Galaxy Nexus GSM (i9250) models with the the V3U00M chip for which it is apparently essential to get TRIM/erase/discard commands or whatever for every single block deleted.
The only reported production dates of bad chips are 08/2012, 09/2012 and 10/2012 until now. Maybe chips produced earlier and/or later are also affected.
You can get the production date of you eMMC chip using the following command: cat /sys/class/block/mmcblk0/device/date

Additional information

Google Code Bugreport (already posted above)

Galaxy Nexus Storage Performance Over Time & TRIM
[Q] Why is my Nexus so sluggish?
My Galaxy Nexus is being very laggy...
[Q] Very slow and laggy Nexus
Other guide, some FAQ + patched kernel (for a specific ROM)

LagFix Tool

some eMMC chip types used at the beginning of 2012 (not affected, type VYL00M for GSM Nexus)
Benchmark of this chip on low-mem conditions

Maybe someone can make a flashable zip or something like that for automating this.
If enough people report this problem I might also do it.


I am not responsible for killing little kittens or your girlfriend getting pregnant by that.
Cheers!
 
Last edited:

mariosraptor

Senior Member
Nov 21, 2006
2,330
682
Corfu
5.
Profit.

The only phones affected seem to be Galaxy Nexus GSM (i9250) models produced after September 2012.
For the V3U00M chip it seems to be essential to get TRIM/erase/discard commands or whatever for every single block deleted.

according though to this my phone is not affected. it has been produced 2012-07(july). should i still proceed?
 

tiny4579

Inactive Recognized Developer
Jan 15, 2011
9,327
5,060
So I guess my sem32g on my toro should be OK. I get random lag and was wondering if that was it. Over 14 GB used but still about 12 GB free.

Sent from my Galaxy Nexus using Tapatalk 2
 

ph4zrd

Senior Member
Nov 30, 2012
72
88
Dresden, Saxony
So I guess my sem32g on my toro should be OK. I get random lag and was wondering if that was it. Over 14 GB used but still about 12 GB free.

Nearly all users which reported this problem until now had maguro phones with V3U00M chips, which does not necessarily mean that toro models didn't get problematic eMMC firmware.
You may try the discard mount option anyway.

---------- Post added at 09:31 PM ---------- Previous post was at 09:26 PM ----------

it's ok. ;)
i found my production date from here http://xdaforums.com/showthread.php?t=1519606
i9250 made by samsung. bought it 2 saturdays ago

The production date of your eMMC chip may be of interest.
Can you post the output of the following command:
cat /sys/class/block/mmcblk0/device/date
 

tiny4579

Inactive Recognized Developer
Jan 15, 2011
9,327
5,060
Nearly all users which reported this problem until now had maguro phones with V3U00M chips, which does not necessarily mean that toro models didn't get problematic eMMC firmware.
You may try the discard mount option anyway..

I'm somewhat scared to brick the device but the emmc check app says that I font have the brick bug. I also have the 11/2011 date.

Sent from my Galaxy Nexus using Tapatalk 2
 

monossidoz

Member
Jul 20, 2009
27
6
Ok the problem seems partially solved, thank you very much!

The benchmark result is not great, but the phone it's finally usable.

Look at the attachment, Random write is still bad (I think) :(

But I repeat the phone it's going well.

My chip date ->

Code:
shell@android:/ # cat /sys/class/block/mmcblk0/device/date
08/2012
 

Attachments

  • Screenshot_2012-12-05-00-35-20.jpg
    Screenshot_2012-12-05-00-35-20.jpg
    37.7 KB · Views: 474

mariosraptor

Senior Member
Nov 21, 2006
2,330
682
Corfu
my production is as the friends above from the output of the command 08/2012

edit: the script does not seem to work.
when in smanager i select su, boot and then run i get this:

tem/bin/sh '/01discard'
unknown option --0mount: invalid option -0
unknown option --0mount: invalid option -0
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 31
    Nope. The app did not suggest that

    The app isn't made for fixing this problem. It is made for overwriting free space on the sdcard.
    So of course this doesn't fix it. The mount option does and is absolutely essential.
    By simply using Forever Gone you only tried how bad this can get ;)

    I will reflash the stock omage again.

    This might temporarily help (a wipe of the system, cache and userdata partitions does), at least a little bit.
    But it doesn't fix the problem. The phone will slow down again.


    Step-by-step guide

    1.
    Make sure you have a eMMC chip of type V3U00M using this or this app as I mentioned above.
    Otherwise it might be possible that the following commands HARD BRICK your phone.
    You can also use the following command: cat /sys/class/block/mmcblk0/device/name

    2.
    Make sure your phone is rooted.

    3.
    Install and run this app.
    This temporarily solves the problem, the phone will eventually begin to slow down again.

    Type the following commands in a Terminal or preferably an adb shell:
    Code:
    [strike]su
    mount -o remount,discard /data
    dd if=/dev/zero of=/data/tmp.bin
    rm /data/tmp.bin[/strike]
    It WILL take a long time (up to 3 hours maybe) and your phone might soft-reboot like mine did. Therefore using adb would be better... Some users also reported a speedup when this is done in recovery mode (CWM/TWRP) via adb.
    The dd command seems to fail, issuing a message similar to "no space left on device". This is normal as we don't give the command a particular file size so it fills the partition until no space is left on it. (That's what we want to do)
    This temporarily solves the problem. After you reboot the remount option is lost and the phone will begin to slow down again.
    Btw, you can also use the Forever Gone app instead of the dd/rm commands. So if you don't want to use the command line, apply Step 4 first (using Script Manager), reboot and then run Forever Gone.


    4.
    To prevent this, add the following code to a script and put it in the init.d folder (if your rom supports it) or use an app like Script Manager to run it on every boot. (Make sure it is started with root privileges!)
    Code:
    #!/system/bin/sh 
    mount -o remount,discard /data
    mount -o remount,discard /cache

    5.
    Profit.

    The only phones affected seem to be Galaxy Nexus GSM (i9250) models with the the V3U00M chip for which it is apparently essential to get TRIM/erase/discard commands or whatever for every single block deleted.
    The only reported production dates of bad chips are 08/2012, 09/2012 and 10/2012 until now. Maybe chips produced earlier and/or later are also affected.
    You can get the production date of you eMMC chip using the following command: cat /sys/class/block/mmcblk0/device/date

    Additional information

    Google Code Bugreport (already posted above)

    Galaxy Nexus Storage Performance Over Time & TRIM
    [Q] Why is my Nexus so sluggish?
    My Galaxy Nexus is being very laggy...
    [Q] Very slow and laggy Nexus
    Other guide, some FAQ + patched kernel (for a specific ROM)

    LagFix Tool

    some eMMC chip types used at the beginning of 2012 (not affected, type VYL00M for GSM Nexus)
    Benchmark of this chip on low-mem conditions

    Maybe someone can make a flashable zip or something like that for automating this.
    If enough people report this problem I might also do it.


    I am not responsible for killing little kittens or your girlfriend getting pregnant by that.
    Cheers!
    2
    Hi all
    My Galaxy Nexus with CM10 a week ago has started to lag a little bit, and the situation was getting worse day by day...
    wipe didn't solve anything

    so I tried to run some benchmark in order to understand if it's an hardware problem

    with androbench I noticed that the write values are ridiculous

    what can I do before bring it back to the manufacter?
    2
    Thanks @Jar3112 and special @mrgnex for helping me!!! My nexus is now working faster than ever!!!!

    Ok let's explain better so maybe someone can try on its own:

    - First of all my Nexus was already rooted and unlocked
    - I made a full apps backup with Titanium backup so all my apps were safe
    - Backuped all the SMS with SMS Backup&restore (just if you need to keep them)
    - I copied the whole internal storage to my pc ( Music, photos, WhatsApp folder, etc.. and most important TitaniumBackup folder!)
    - I flashed the "special recovery donwloaded from HERE
    - Rebooted into recovery , gone to advanced -> f2fs/ext4 switch. select f2fs on the top then tick all the three boxes and swipe to format. (HERE YOU LOSE ALL YOUR DATA AND INTERNAL STORAGE AND YOUR PHONE WILL NO BOOT ANYMORE!)
    - I downloaded latest Cyanognemod nightly for Maguro
    - I dowloadded the Dirty V Kernel (which supports f2fs otherwise it will not boot) from HERE I choose the SmittyV-Ak2
    - I downloaded the tool to convert the ROM for f2fs partition from HERE
    - Converted the rom using the "boot.img" provided with the tool
    - I rebooted the recovery after formating the partitions (Reboot, Recovery)
    - Then into advanced, ADB sideload
    - Connected the phone to the PC
    - went to prompt (windows of course)
    - adb sideload [NameOfTheRomYouWantToFlash] (I mean the name of the ".zip" file containing the ROM and converted with the tool
    - Wait for trasnfering and flashing ...
    - Then adb sideload [NameOfThekernalZipFile]
    - I rebooted the phone and everythign was running!!!
    - I copied the Gapps and SuperSu 1.99 on the internal storage
    - Rebooted into recovery
    - So I made a data wipe (not necessary but i preferred to do it before flashing the Gapps, not mandatory)
    - Flased Gapps and SuperSu from recovery
    - Rebooted
    - Added my google account, my WIFi password and waited until everything was restored from the Google account
    - Copied all my backuped folders into my phone
    - Restored all the application with Titanium Backup (just the ones I really need to have with the data) DO NOT RESTORE SYSTEM DATA!!
    - Restored SMS
    - Rebooted
    - Works perfectly!!!!!
    2
    The gotbrick app says that my emmc chip is unknown.

    Is it a chip of type V3U00M?

    You may try to remount /data and /cache (probably also /system) with the discard option and use dd/rm or Forever Gone to erase the empty blocks as suggested beginning at comment #25.
    http://code.google.com/p/android/issues/detail?id=39154#c25
    2
    R: Poor performance writing on /data

    Some time ago I did have problems using the /discard script, now I found out what the issue was and I want to share.

    In order for the trick to work you need to have DATA=ORDERED as a mount option for /data and cache.
    If through the "mount" command you don't see this (you may see DATA=WRITEBACK instead) then setting the script won't work, even if the "discard" option is active.
    So, if this is your case, you have 2 possibilities:
    1) You may flash a ROM with this option (CM has it by default) or not sure about that flash a kernel that gives you the same, ONLY THEN putting the script in init.d folder will do the job.
    2) You may, as an alternative method, try the "Lagfix" app, available on the market, or flash the .zip in my previous post.
    This is not as resolutive as having DATA=ORDERED and DISCARD as mount options.

    Hope this helps if someone has my same issues.

    Sent from my Galaxy Nexus