Results 1 to 23 of 23
Like Tree4Likes
  • 3 Post By mmaestro
  • 1 Post By mmaestro
  1. Thread Author  Thread Author    #1  
    mmaestro's Avatar

    Posts
    63 Posts
    Global Posts
    124 Global Posts

    Default PSA: After applying 4.1.2, fill and delete empty space on Nexus 7 to remove lag.

    So this has been covered elsewhere (and in exhaustive detail on ), but for those of you who have been suffering lag on your Nexus 7s, 4.1.2 fixes the problem. It seems likely the issue was caused by missing TRIM commands to clear storage that had been used and then subsequently freed up on some 16GB Nexus 7s that use Samsung NAND (some of the 16GB N7s use Hynix NAND, and so don't suffer from this problem), and TRIM has been implemented in the software in 4.1.2 where the OS seems Samsung NAND.

    However, just updating to 4.1.2 won't fix the lag problem if you're experiencing it. The system needs to see the space filled, and then emptied so it knows that it has to properly clear the space and prepare it for fresh writes. You can do this manually by filling the space with.. whatever. MP3s, video, garbage zip files, then deleting them manually. The XDA thread above has some command line options to do this, as well, but the easiest way I've found is to use to fill the storage and wipe it. The app's actually designed to do a secure delete by filling and wiping storage, but it works for this purpose, too. I just finished performing this on my N7, and while I got a reset when I had only 150MB free, I was able to restart and completely fill and wipe my storage. My tablet wasn't suffering lag after a hard reset a few weeks ago, but I did notice a jump from 83.31 IOPS to 127.46 IOPS after the wipe (in Androbench), which may make a difference. If you've been suffering from lag, this is worth doing after you've received the update.

    TL;DR:
    To remove lag after receiving 4.1.2 fill storage completely and then free that space back up.
  2. #2  
    kC_
    kC_ is offline
    kC_'s Avatar

    Posts
    68 Posts

    Default Re: PSA: After applying 4.1.2, fill and delete empty space on Nexus 7 to remove lag.

    thanks for posting this it is fixed my problem with google chrome
  3. #3  

    Default Re: PSA: After applying 4.1.2, fill and delete empty space on Nexus 7 to remove lag.

    My thanks as well, Google+ is nice and speedy again.
  4. #4  

    Default Re: PSA: After applying 4.1.2, fill and delete empty space on Nexus 7 to remove lag.

    Or just go to Google Currents and disable Background Sync.
    Tip thanks to noel barcellos.
    That's it!
    HD2 LEO and Galaxy Tablet
    Android: MCCM Desire HD v 3.0.2
    http://www.dropbox.com/gallery/72939...llery?h=d6c566
    New Year Resolution: 1024x600 Galaxy Tablet
  5. Thread Author  Thread Author    #5  
    mmaestro's Avatar

    Posts
    63 Posts
    Global Posts
    124 Global Posts

    Default Re: PSA: After applying 4.1.2, fill and delete empty space on Nexus 7 to remove lag.

    Quote Originally Posted by niteowl360 View Post
    Or just go to Google Currents and disable Background Sync.
    So sort of. The lag tends to happen when a lot of writes are occurring. Obviously if something's writing to the storage in the background like Currents, that can provoke the lag. The storage is operating slowly, and the system halts waiting for those writes to complete before it moves on to the next task. But fundamentally, the storage ought to be fast enough to handle background writes and whatever you're doing in the foreground simultaneously. Disabling currents mitigates the symptoms, but doesn't address the underlying problem. Freeing up the storage as I suggest here should fix the underlying problem.
  6. #6  

    Default Re: PSA: After applying 4.1.2, fill and delete empty space on Nexus 7 to remove lag.

    Quote Originally Posted by mmaestro View Post
    So sort of. The lag tends to happen when a lot of writes are occurring. Obviously if something's writing to the storage in the background like Currents, that can provoke the lag. The storage is operating slowly, and the system halts waiting for those writes to complete before it moves on to the next task. But fundamentally, the storage ought to be fast enough to handle background writes and whatever you're doing in the foreground simultaneously. Disabling currents mitigates the symptoms, but doesn't address the underlying problem. Freeing up the storage as I suggest here should fix the underlying problem.
    Yep, I tried the Currents tip awhile ago and it didn't really help but this did.
  7. #7  
    Curtis A's Avatar

    Posts
    42 Posts
    Global Posts
    41 Global Posts

    Default Re: PSA: After applying 4.1.2, fill and delete empty space on Nexus 7 to remove lag.

    Are you saying that I should backup all my data because I will need to delete all storage? Video, pics, songs, books etc.. Or just fill free space to capacity? Thanks.

    Sent from my Nexus 7 using Tapatalk 2
  8. #8  
    junglejunkie's Avatar

    Posts
    474 Posts
    ROM
    4.1.2 Stock Rooted

    Default Re: PSA: After applying 4.1.2, fill and delete empty space on Nexus 7 to remove lag.

    Quote Originally Posted by Curtis A View Post
    Are you saying that I should backup all my data because I will need to delete all storage? Video, pics, songs, books etc.. Or just fill free space to capacity? Thanks.

    Sent from my Nexus 7 using Tapatalk 2
    I am also wondering this. Should I use TB and back up/restore everything, or would a nandroid work?
  9. Thread Author  Thread Author    #9  
    mmaestro's Avatar

    Posts
    63 Posts
    Global Posts
    124 Global Posts

    Default Re: PSA: After applying 4.1.2, fill and delete empty space on Nexus 7 to remove lag.

    Quote Originally Posted by Curtis A View Post
    Are you saying that I should backup all my data because I will need to delete all storage? Video, pics, songs, books etc.. Or just fill free space to capacity? Thanks.
    Just fill the free space, then delete the "junk" data you used to fill that space. Files you want to keep can be kept.

    The problem occurs because of the way NAND storage operates. My recollection of how this works (may be slightly wrong, it's been a while since I read up on this) is that you can't overwrite sectors which have data in them directly, they need to be completely emptied before new data can be stored. Normally when you tell your device to delete something, the data isn't actually removed, the storage just marks those sectors as having been deleted. Then when your device is idle, "garbage collection" takes place, deleting the data that was previously in those sectors and marking them as available to be written to again. There's some wear leveling that takes place, and there's a layer of complexity because blocks of storage have to be emptied at a time, so the system has to wait for an entire block of sectors to be filled and then be deleted, it can't be done piecemeal sector by sector (this process, when automated, is called "TRIM"). The Samsung storage in question here turns out to have not had TRIM enabled, and so as storage was used and then the contents deleted by caching or user behavior, the storage would get slower and slower, because the sectors that theoretically could be written to still had old data on them, and so if the system tried to write to them it first had to clear the block and then write the data, and if the block had a few sectors used that needed to be retained, that needed to be moved to a fresh block, too, making write speeds awful. The 4.1.2 update enabled TRIM, but it's only aware of needing to perform garbage collection on blocks and sectors that have been filled and then deleted after the update has been applied. It can't go back in time and see where garbage collection should be applied on sectors that had data deleted prior to the update. So what you're doing when you fill the space is basically telling the system to perform garbage collection on everything to make sure that all your empty storage is running as fast as it should do for fresh writes.
    Hope that's all clear. I'm a little sleep deprived right now, so apologies if my coherence isn't quite there.
    Thanked by 4:
    natehoy likes this.
  10. #10  

    Default Re: PSA: After applying 4.1.2, fill and delete empty space on Nexus 7 to remove lag.

    Quote Originally Posted by Curtis A View Post
    Are you saying that I should backup all my data because I will need to delete all storage? Video, pics, songs, books etc.. Or just fill free space to capacity? Thanks.
    You just fill up the free space you have, you don't have to uninstall or remove what you have already. Using the app it locked up when I got to around 160 free and I restarted and then deleted the fill files from within the app and everything was speedy again. Just don't do it until after you have the new firmware installed.
    Thanked by 2:
  11. #11  
    junglejunkie's Avatar

    Posts
    474 Posts
    ROM
    4.1.2 Stock Rooted

    Default Re: PSA: After applying 4.1.2, fill and delete empty space on Nexus 7 to remove lag.

    This NEEDS to be on the first page. Seriously, my N7 was PAINFULLY slow and laggy, but after the update and running this 2x it is just as fast as it was on day 1.
    Much Thanks!
  12. #12  
    Curtis A's Avatar

    Posts
    42 Posts
    Global Posts
    41 Global Posts

    Default Re: PSA: After applying 4.1.2, fill and delete empty space on Nexus 7 to remove lag.

    Quote Originally Posted by junglejunkie View Post
    This NEEDS to be on the first page. Seriously, my N7 was PAINFULLY slow and laggy, but after the update and running this 2x it is just as fast as it was on day 1.
    Much Thanks!
    Agree, this makes me want to go buy another N7 for when this one breaks :-)

    Sent from my Nexus 7 using Tapatalk 2
  13. #13  
    natehoy's Avatar

    Posts
    1,360 Posts
    ROM
    Stock

    Default Re: PSA: After applying 4.1.2, fill and delete empty space on Nexus 7 to remove lag.

    Quote Originally Posted by mmaestro View Post
    Just fill the free space, then delete the "junk" data you used to fill that space. Files you want to keep can be kept.

    The problem occurs because of the way NAND storage operates. ...
    Even the Russian judge would give you a ten on that. Nice explanation.


    Sent from my Nexus 7 using Android Central Forums
  14. #14  
    Coco.ar's Avatar

    Posts
    3 Posts
    ROM
    JB 4.1.2

    Default Re: PSA: After applying 4.1.2, fill and delete empty space on Nexus 7 to remove lag.

    Great post. Just testing 4.1.2 (updated today). The performance is better, but I see a lag when is writing (Ie.: downloading and installing apps. from GPlay). Forever Gone crash when the free space is under 100 mb.. I will try with other apps.
    Thank's
  15. #15  

    Default Re: PSA: After applying 4.1.2, fill and delete empty space on Nexus 7 to remove lag.

    Thank you very much for this. I have found a lot of apps crashing because of the lag and I got the update the other night. So I'll give Forever Gone a try. thanks.
  16. Thread Author  Thread Author    #16  
    mmaestro's Avatar

    Posts
    63 Posts
    Global Posts
    124 Global Posts

    Default Re: PSA: After applying 4.1.2, fill and delete empty space on Nexus 7 to remove lag.

    If it's crashing with low space, try either turning on airplane mode (the crash may be due to background writes to the same spots FG is trying to write to) or just get it to remove the temporary files and call it a day. You may still have a few sectors that need garbage collection done, but they'll be minimal, and the system will sort those given time. You'll probably have fixed lag almost completely, anyway.
  17. #17  

    Default Re: PSA: After applying 4.1.2, fill and delete empty space on Nexus 7 to remove lag.

    I didn't have any lag though when I updated. I bought my tablet about last week though

    Sent from my Galaxy Nexus using Android Central Forums
  18. #18  

    Default Re: PSA: After applying 4.1.2, fill and delete empty space on Nexus 7 to remove lag.

    Thanks for the link to this app. I actually did a hard reset a week ago cause of the lag issues. It cleared up, and now I'm on 4.1.2, but I'm going to run this anyway.
  19. #19  

    Default Re: PSA: After applying 4.1.2, fill and delete empty space on Nexus 7 to remove lag.

    Aside from ripping it apart, is there any easy way to determine which manufacturer your Flash was sourced from?
  20. Thread Author  Thread Author    #20  
    mmaestro's Avatar

    Posts
    63 Posts
    Global Posts
    124 Global Posts

    Default Re: PSA: After applying 4.1.2, fill and delete empty space on Nexus 7 to remove lag.

    Quote Originally Posted by theduder View Post
    Aside from ripping it apart, is there any easy way to determine which manufacturer your Flash was sourced from?
    Not that I know of, although some command line/ADB wizards may prove me wrong. If you don't have any lag, I would assume everything's fine, and if you do, run Forever Gone. There's not really any down side to doing so, even if you have different storage.
  21. #21  

    Default Re: PSA: After applying 4.1.2, fill and delete empty space on Nexus 7 to remove lag.

    Quote Originally Posted by mmaestro View Post
    Not that I know of, although some command line/ADB wizards may prove me wrong. If you don't have any lag, I would assume everything's fine, and if you do, run Forever Gone. There's not really any down side to doing so, even if you have different storage.
    Yeah, not sure what's expected in terms of lag. Google+ has always been a little hitchy but my other stuff seems pretty good. Running Forever Gone now...
  22. #22  

    Default Re: PSA: After applying 4.1.2, fill and delete empty space on Nexus 7 to remove lag.

    Would u guys re command running this app on my OneX?

    Sent from my Nexus 7 using Tapatalk 2
  23. #23  
    Curtis A's Avatar

    Posts
    42 Posts
    Global Posts
    41 Global Posts

    Default Re: PSA: After applying 4.1.2, fill and delete empty space on Nexus 7 to remove lag.

    Just to give an example of the "lag" that I was experiencing. My tablet would become progressively slower at times to input until it was completely unresponsive. Most of the time when this happened, a window would open asking if I wanted to close the app or wait. Simply locking and unlocking the screen would eliminate the problem immediately until the next time it happened.

    I use this tablet for many hours a day and have not yet had a hiccup since the update. I have to thank you again for this post. :-D

    Sent from my Nexus 7 using Tapatalk 2

Similar Threads

  1. [PSA][READ ME][FAQ] All about root, and the upcoming 2.3 gingerbread OTA update.
    By igotsanevo4g in forum HTC EVO 4G Rooting, ROMs, and Hacks
    Replies: 43
    Last Post: 06-07-2011, 11:44 AM
  2. [Q] Two problems after DL09 Super Clean 0.4 and Adrynalyn's 1ghz 12/30
    By Mrjayjubear in forum Verizon Fascinate Rooting, ROMs, and Hacks
    Replies: 14
    Last Post: 01-23-2011, 09:58 PM
  3. NO reboot after applying CWMrecovery.tar file via Odin
    By NexusNole in forum Verizon Fascinate Rooting, ROMs, and Hacks
    Replies: 3
    Last Post: 11-13-2010, 12:59 AM
  4. black boot screen after i did verizon update unlagfix and crap
    By zachchen1996 in forum Verizon Fascinate Rooting, ROMs, and Hacks
    Replies: 2
    Last Post: 09-24-2010, 04:04 PM
  5. Replies: 50
    Last Post: 06-29-2010, 01:10 PM

Posting Permissions