yashsingh1/xdaforums huggingface dataset:
[Nexus 7 General] harperhendee:
Screenshots with benchmark to illustrate the problem.

Try turning off wifi and seeing if the lag goes away. If that is the case it's due to the storage slowdown. Processes are pulling down data in the background and storing to your memory, which happens to be running abnormally slow. At least that's my theory. Here are some screenshots to support it:

In this capture, I took the screenshot while Doggcatcher was downloading videos in the background. The tablet is nearly unusable in this state and I had to click "wait" multiple times in order to even run the benchmark.

When I turn off the wifi, the tablet performance increases enormously. You can see there is still bad problems with writing to the storage. I think all the lagginess is associated with long timeouts on storage writes. This would be a time when a thread cannot be pre-empted, because you want to make sure data is fully written before letting another process have the foreground. That way you don't have race conditions between one process writing data and another process reading it.

That last bit is speculation on my part, but I make my living working on CPUs, so I've got a bit of knowledge from the very low end of implementation.

--Harper
[Nexus 7 General] chiasoft:
Lol.. for everyone who says their tablet is awesome and doesn't lag, I don't doubt you... but, if you guys can try this and let me know if it's still lagfree, if so, then I'm gonna RMA my unit.

Take 5 * 1.02GB + mkv files, and throw that onto your nexus 7. Try to fill up stoage until about 1.5GB left.

Thats what did it for me, prior to me throwing MKV files onto the Nexus the device flew, no lags whatsoever. Ever since then, even after a complete hard reset, it goes back to a crawl. I'm on Stock+rooted, currents turned off, and FB not installed. The lag comes and goes, every now and then it'll seem like it's stuck. But every so often it'll act "normal". There definitely seems to be an issue in the NAND IO at least for my tablet.

My seq write speeds varies between 0.32MB/sec - 11.78MB/sec

My random write speeds varies between 0.01MB/sec - 0.22MB/sec

Those tests were run with everything in the background turned off/force stopped.

oh.. ignore my signature, that was like.. from a while ago lol.
[Nexus 7 General] Metallice:
Yep... This is what we've all been saying for a while. Sequential write starts at like 11MB/s after a full wipe, goes down slowly as you fill it to about 8.5MB/s at about 4GB free, and then at 3.5GB free it drops down to 0.5MB/s.

This is, of course, definitely the cause of the lag.
[Nexus 7 General] ExploreMN:
I agree as I verified this on mine as well, but to me, this is unacceptable. I mean seriously, you buy a 16GB unit where you only get 13.5GB of usable space which already sucks, then you can't use the last 4-5GB leaving you with 8.5GB to 9.5GB of usable space??? Google needs to fix this **** immediately.
[Nexus 7 General] smacman:
Sounds like either the storage controller doesn't have a functional garbage collection scheme, or the nand flash memory itself is defective..
[Nexus 7 General] Metallice:
Looks like based on http://code.google.com/p/android/issues/detail?id=37258#makechanges that going back to 4.1 from 4.1.1 might fix the issue. Anyone willing to test?
[Nexus 7 General] ExploreMN:
Instead of rolling back, why don't they fix the issue and roll out 4.1.2 so I can confidently go and buy this tablet again? I don't like going backwards.
[Nexus 7 General] yococs:
Right on! Hey Google you listening on this....
[Nexus 7 General] merrywhq:
can't agree more! just regret to sell it on the first sight of this issue and found no solid solution.. will definitely buy a new one if it's fixed
[Nexus 7 General] Jay Aristide:
I regularly fill my 16gb c60 to less than 1gb free, and do not experience these issues, at all. I have fb, Twitter, g+, gmail, and several other apps installed and set to sync every 15 minutes to half hour.

My brother keeps his 8gb c60 at less than 1gb free, and does not experience these issues, at all. He has all the same apps installed that I do, with sync times set to 1 hour.

We both have at least one Gameloft game installed, Order and Chaos Online.

We both run Paranoid Android 2.12 with surfaceflinger patch applied and _motley's 1.1.1 kernel with my tweaks minus zRam
[Nexus 7 General] ExploreMN:
I get what you are saying Jay, but you've done a lot of hacking and tweaking. I read your one post on changes you can make and all the positive responses from others...but honestly, seeing all that made me nervous. I think the frustration comes from the idea that we shouldn't *have* to load a custom ROM and make all sorts of changes just to get a functional unit. I do like to root my devices so I can use some root only apps, but I'm not into the custom ROM stuff as much and usually only do it to upgrade the OS on an old device.

I just want to buy a product and have it work...
[Nexus 7 General] Salty Wagyu:
Most people are claiming they fix this lag by disabling fsync in custom kernels, but that is risky as it can cause data loss. Most people want this fixed by Google without resorting to such methods, as the Nexus 7 is already fast enough in its out-of-the-box state with fsync enabled and should continue to stay that way with storage filled up.

And again, its not Gameloft games causing it. It just seems that way because their games are very big, copying a few ISOs or 1GB mkv/avi files will reach the same effect.

Only one guy called "wax" is confirming that, not seen any other posts on Google that say 4.1 is free from the lag problem. Maybe he's just lucky but I'm finding it a bit odd he needed to make 10 repeated posts to claim this.
[Nexus 7 General] Jay Aristide:
I get what you're saying.. I've been running my devices with fsync off for a couple of years, and I've never experienced data corruption *shrug*

I understand wanting Google to fix it, and that you shouldn't have to do anything special for it to work right. Google has even acknowledged the problem and is working on it.. But, in the meantime...

If turning fsync off fixes the issue, takes less than 5 minutes to apply, and gives you a completely usable tablet, why wouldn't you do that while waiting on Google's official fix?
[Nexus 7 General] ExploreMN:
Can you disable it on the stock ROM, or do you need to load a custom ROM or a different kernel or ??? I'm asking because honestly, half of the stuff you have in our tweaking thread is way over my head.

I might be willing to pick up another N7 if that's the case. I'm finding having my Asus RoG laptop on my lap to do basic things like surf the web is...well, annoying and hot... and I tried using the iPad 2 we have and just can't stand the thing. It's almost as awkward to hold and use as the laptop for this stuff.
[Nexus 7 General] Dukko:
Currently on stock ROM, rooted and using franco's kernel. Disabled fsync did miracles! Also, franco's kernel is simply good.
[Nexus 7 General] czesiu:
I know this question was not really directed at me but:

... because I won't buy this tablet before it's fixed :)
[Nexus 7 General] ncvikingx97:
If it were a hardware problem benchmarks would be affected right? I have lag but benchmarks are the same
[Nexus 7 General] Jay Aristide:
You do need to flash a custom kernel to disable fsync, but nothing else is required. I'd be more than happy to walking you through the process.

Your *best* bet would be to install a ROM that has init.d support (ParanoidAndroid will blow you away), and then flashing the kernel of your choice with it. The whole process takes ten minutes, adds a lot of really nice features your tablet, and could very well solve all of your lag issues.

Send me a PM and I'll respond with some links to stuff you need and my phone number, and we'll have you up and running in no time :)

There really is nothing like the n7 out there, right now. It's worth the slight hassle of getting it setup right, and as an added bonus, it'll be a great learning experience :)
[Nexus 7 General] pro4ever:
hi jay can u send me also links ;)
[Nexus 7 General] merrywhq:
can you also PM me the details? Really appreciate your sharing!
[Nexus 7 General] chiasoft:
Thanks for your response, and way to go for promoting your thread/rom.. lol.. but you didn't get the point of my post apparently. I was more interested in those of us who have Stock or Stock with Root, minus the custom kernel and other system tweaks such as turning off fsync, enabling zRam, overclocking.. etc. (running on either 4.1 or 4.1.1) to post their results.

I understand going with a modified kernel and using alternative IO Schedulers and disabling fsync and such will "fix" the issue. Thats not really a "fix" for most of the people who doesn't want to modify their Nexus 7, which should've worked fine out of box. That and I hate when newb tech bloggers bash on the device because of dumb software glitches, and go all Pro Apple to the media and fanboy's.

Also, I've confirmed that I don't have a defective unit. I have two Nexus 7's; one which I use regularly (the slow one) and another one which is for my daughter to play games on (plenty of free space, and FAST). I decided to test the theory myself, and loaded that one up with files. It too, slowed to a crawl. Now.. both of them were updated to 4.1.1, so my next test is that I will try downgrading to 4.1 and test again on my device.

But, like one of the posts said... I don't think we should be "going backwards" to find a fix.
[Nexus 7 General] BrianDigital:
Well we could go back temporarily to have a functional device while this problem gets sorted out
[Nexus 7 General] gfunkzero:
The other day I encrypted my Nexus 7 now I have lag, most noticable when typing... I have to slow my typing down to wait for the N7 to catch up! good to see I'm not the only one with these problems..
[Nexus 7 General] ExploreMN:
Well, all the retail stores in my area are sold out at the moment...and I won't buy an N7 mail order since I don't want to deal with shipping if there is a problem. So it might be a while before I'm back in the fold.
[Nexus 7 General] stijndebruin:
To lag or not to lag.....

Oooh, the lag :( .

I have my nexus 7 a couple of weeks now, and I Love IT.......But when i filled op my device, at a certain point less ten 1 Gig, I noticed a substantial lag. This anoyed me quite a bit so I started looking.

Wat I found so far:

Juist clearing space does not solve the problem.

Clearing space and factory reset will! Untill the device is full again' then the lag returns.

Fixes like in Jays guide for smoothness (I tried the remount data thingie, and disable fsync) help but not as substantial as a factory reset after clearing some space.

I have been running several ROMs and kernels here is my experience

Stock ROM Stock kernel. No lag, but did not true with full storage.

Cleanrom with Motleys kernel. Lag with full storage

Cm 10 nightlies with cm and trinity kernel. Lag with full storage. ( even after aplieing lagfix for cm wich is no longer nessesary, implemented in nightlies)

Paranoid android with trinity kernel. Lag with full storage.

After switching from one ROM to another the lag was always gone but returned after a while when not clearing space. With every switch I did a factory reset:)

At the moment I'm running Paranoid android 2.14 with Trinity 120 kernel, I applied both the remount storage thingie and disabled fsync, at the moment 5 Gig free space and things are running pretty much as smooth as I experienced so far;)

Still there is no such thing as a perfect world, I still find browsing with dolphin could be smoother. There are minor stutters when I'm loading multiple pages in the background. (Whine) Also when I'm downloading something the speed does not seem to go above 2mb/s and when it comes close to that it tataly drops to zero and goes up from there again till it reaches a speed somewhere above 1,5mb/s and ten it drops again. Annoying! When downloading with these speeds, trough the browser or torrent client, my device is useless.(really slow and laggy)

I've ran several benchmarks, quadrant, and androbench. They both give low read write speeds when I experience lag and better speeds after factory reset, although androbench is somewhat inconsistent for me, with fsync of it flies:) but these are faulty values.

Also noticed when I tried to stream 720 or 1080p vids from the network it can't keep up:( .

When I search Google for nexus 7 read write speed two Google pages come up with plenty of replies from people who experience the same. Hope it is something that will be resolved!

Question: I tried to check my partitions with fdisk' just a hunch, but disk does not seem to be able to find a partition table, anybody?

Tried: fdisk /dev/block/mmcblk0

Then p for print partition table, no go.

Well that's it I guess, sorry for the long read, hope this helps some in solving this issue.

PS. All my games(GTA, horn, mass effect, etc) run like hell, even when tablet is laggy when browsing.
[Nexus 7 General] AlBigGuns:
Chaps, my Nexus 7 suffers greatly from slow down when surfing the web. Sometimes chrome simply refuses to load a page at all, other times it can take around 20 seconds to load a simple page. I've come up with a solution that seems to help me:

Go into the apps settings page, find Currents, delete its cache and data files, force stop and then disable it. I find this (regardless of whether I use Currents or not, or if I have background sync enabled or not) can completely eradicate any lag I get from surfing.

Another thing I find that can help is clearing Chromes cache.

It should be said that I'm using a nexus 7 with nothing installed on it.
[Nexus 7 General] stijndebruin:
Also noticed this, with completely slow system uninstalled maps and currents and much better performance. I noticed these apps kept turning up in task manager after I first used them.
[Nexus 7 General] Dorkington:
How much free space do you have on your device?
[Nexus 7 General] Metallice:
Darn it. I accidentally went under 3GB by a few megs. I was asking a good job letting it hover just above before. Went from 11MB/s sequential write to 2.45...
[Nexus 7 General] xopher.hunter:
Def a mistake lol
[Nexus 7 General] Metallice:
Looks like fsync off.
[Nexus 7 General] moyer_34:
fool the OS on disk space

For folks who understand the inner workings of Android better than I: is it conceivable to create a tool that "fools" the OS into thinking there are 3-5 fewer GB available that actually are on the device? What I'm thinking is if we could partition our SD to exclude the last few GB, we wouldn't have to worry about the worst of the lag problem and an endless process of clean flashes.

I admit that on the surface this is an utterly ridiculous idea and sad commentary given we're not getting all the space we paid for. But could it work and can this be done?
[Nexus 7 General] krazeecracker:
I like this idea lol. I'm sure its doable. So you basically want to create a hidden partition. :thumbup:
[Nexus 7 General] xopher.hunter:
This would be great if possible. Today I forgot to clear my nandroid space and bam! lag city :(

Edit: btw has anyone tried recreating this on the latest JR003R aosp release?
[Nexus 7 General] ExploreMN:
I would imagine the OS is using that space for something and doing something like this wouldn't work unless you could configure the OS to use that partitioned off space. If Jelly Bean were actually on another manufacturer's tablet we could test to see if it's a JB issue or not, but it seems to be since Jay has said that if you install a different kernel and turn off that f-sync, there are no more issues. That leans more on the fact it's an operating system issue. If it were a hardware defect you would think it happens less often, and if it were just plain bad hardware (like at a design level) you couldn't fix it with any real amount of "tweaking," right?

I have JB on my Galaxy Nexus, but I'm scared to fill the space since I need my phone to work. LOL Not even sure if that would be a good test...but at least it's the same version as the N7.
[Nexus 7 General] Metallice:
Not at all. Fsync off "fixing the problem" does not in any way suggest it is an OS problem. It actually makes it seem more like a HW issue.

Fsync off doesn't actually fix the problem. It only seems like it does because it means the OS doesn't have to write everything to disk before proceeding. It can keep the data in memory, pretend like the data has finished writing, and continue writing in the background. The write speeds are still terrible.
[Nexus 7 General] barondebxl:
I don't experience any lag on my nexus 7 using glazedjelly bean ROM, it super fast.

PS: I'm watching the avengers on blu ray DVD, its INSANE!!!!!!
[Nexus 7 General] ExploreMN:
So why are the write speeds fine even on stock until the storage gets full? I mean my N7 that I returned would easily get 8mb writes and others showed getting up to 11-12mb writes...but then all of us on a full storage unit would have the write speed drop to 0.4mb write speeds. That's a pretty massive drop in performance. My Galaxy Nexus has similar write speeds (8-10mb) and doesn't have any lag issues either. So I don't think the write speeds are "terrible" on a clean and freshly reset device.
[Nexus 7 General] Metallice:
I was saying with fsync off and with under 3GB free that write speeds are still terrible.
[Nexus 7 General] hello_world.c:
A "me too" post. I copied a few movies over to the N7 for my son and it started to lag horribly. Free space was around 2G at this point. Removing the files didn't help, even freeing up 7G. A kernel with fsync=N helped a bit but IMO is only masking the deeper problem.

I am back to stock 4.1.1 rooted after a factory reset and it's now smooth like a baby bottom again.

At this point the reason why this is happening is still up in the air but if I would speculate I'd say it has to do with the wear leveling algorithm for the flash drive. Similar to SSDs where they recommend to always keep at least 10% free for the drive to move stuff around. Just much worse, because it happens at around 20% free already for many people.
[Nexus 7 General] TheScarecrow:
I'm watching this thread because I don't wasn't to trigger this horrible lag on my device and hope for some solution to be found. It may help others to know that "Nexus Media Importer", an app on Google Play together with a low cost OTG cable from Amazon allows you to stream your music and videos from an external USB storage device. This does not require root and works very well in my experience, saving loading up your nexus 7 with media files. I speak only as a happy purchaser of this app, I've no connection to the developer.
[Nexus 7 General] sark666:
I'm watching this thread too, hoping for some official word from google. I wonder for those that sent in their tablets to google, did google say if they would follow-up with those customers, or is thanks for your sample tablet, here's a new one, we'll investigate? Probably the latter.

But what I wanted to post was my battery life doesn't seem to be nearly as good as it once was. I haven't done any concrete tests but I'm surprised when I look down and see the how low it is already after seemingly little usage.

I'm wonder if this lag issue can cause more battery usage. Maybe failed writes in the background?
[Nexus 7 General] Metallice:
It was the second one... but I doubt we will ever hear anything from Google. They won't want to acknowledge a massive hardware defect in a large number of their product. They'll fix it with Asus and then pretend there was never an issue to begin with.
[Nexus 7 General] Jay Aristide:
That doesn't sound like a Google attitude.. Remember, this is a company that has "Don't Be Evil" written somewhere on every wall of it's complex.. #JustSaying
[Nexus 7 General] sauceboy25:
I have the same experience - battery seems to drain much faster than expected.
[Nexus 7 General] Metallice:
It makes sense to me that spending more time writing data would consume more battery.
[Nexus 7 General] sauceboy25:
Build Version

Has anyone established whether the newer AOSP builds quietly remedies the problem. I understand most of the custom ROMs use later builds than OTA 4.1.1., which is what I'm at now. It would be a great (additional) incentive to root and flash if we can show that the ROMs based on newer builds has fixed the problem.
[Nexus 7 General] simms22:
I actually just suggested to Metallice that he try the ROM that I'm running, since its from the code dropped into aosp a few days ago. I don't have this issue, with just over 1gb storage space left. he has seen my androbench scores, this can be a good way to see if its software or hardware related.
[Nexus 7 General] Jay Aristide:
Hell, dude, even directly after flashing a new ROM, I immediately go to work installing a different kernel, disabling fsync, remounting /data, modifying the ui, changing the layout, etc etc etc... I couldn't tell ya..

Be something nice to know, though. You should do the legwork. Unlock your bootloader, root, and load up the pure aosp or aokp 3. Fill it up and run some benches. Would be doing the folks here a great service :)
[Nexus 7 General] sark666:
I didn't know there was a something newer than 4.1.1 in asop. So what rom are you running? And to confirm you had this issue before but no longer do with this rom? Ah I guess you never had the issue as you mention about hardware or software related.

I'm getting impatient with google so let me know what your rom is. I'll try and set aside some time to try it.
[Nexus 7 General] KnowledgeBroker:
Valid points. In an iPhone world, you have the alternative of getting a ui that is perfectly.. controlled. No boundaries pushed, nothing cutting edge, predictable, and perfectly.. blah.

Now go(most) android devices..manufactures want to sell new devices, so it takes a while before you get the latest os.. if they upgrade you at all(because they want you to buy new devices). Sometimes, of they upgrade at all, the upgrades are negative in some way. Usually it has to do with the non open source of components, other companies that aren't willing to put in the effort to give you a perfected experience.

Then there's Google devices. Cutting edge, they update as soon as there's something to update. You get the newest, the latest and greatest. You get a quad core for less than $300 when most other companies are telling you it can't be done, certainly not at that price.. look at all the cellphones that are quad core in other countries, but not here.

You want perfection spoon fed to you? Get an iDevice, where the biggest innovation is a slight change in the dimensions.. otherwise it is a hit and miss, either a company like HTC or Samsung that is trying to make continuous sales, or something backed by Google trying to push what is possible..
[Nexus 7 General] simms22:
its still android 4.1.1, just a new revision(r6)

BTW, im running rasbean jelly with the trinity kernel. rasbean jelly is a slightly modified, slightly themed, highly optimized aosp build. you can find it here http://fitsnugly.euroskank.com/?rom=rasbeanjelly&device=grouper

it doesn't come with busybox installed, but comes with stericsons busybox installer app. after the device boots and settles down, open the busybox app and install busybox.
[Nexus 7 General] Dragooon123:
Can anyone tell me if fsync can be disabled in official CM10 nightlies?

---------- Post added at 02:28 PM ---------- Previous post was at 01:53 PM ----------

Disabled fsync after installing Franco's kernel and I'm getting crazy ass random/sequential write (>100MB/s which was <1MB/s), is this normal?
[Nexus 7 General] Metallice:
Going to quote myself for people confused by fsync.

Androbench scores look really good, but the writing is really just as slow but processing in the background. Androbench just thinks the writes have finished which is why you get crazy high scores.