yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy Nexus] KWKSLVR:
A full reimage definitely didn't do a thing. 4.2.2 was always something that was totally fine for me before. I mean, it wasn't all THAT bad. But for the past couple of weeks it's gotten asinine. Stuff like Google Now would take 10 seconds to load. It was taking 5-15 seconds for the keyboard to pop up half the time. Basic functionality was suffering. I went back to CM10 for the time being and all is (mostly) well. I'm planning on seeing what Verizon has coming next from Motorola and I'll either go that route or pick up a HTC One once Verizon finally gets it so all I really need is for my current handset to be usable for another couple months.
[Samsung Galaxy Nexus] chrone:
I can't think anything might help you with. Faulty hardware perhaps.

Sent from my Nexus 4
[Samsung Galaxy Nexus] IFLATLINEI:
My Random write is at 0.16 MB/s but real world performance has been great. No lag, no issues. Have you done the basics? Cleaning cache and deleting unused apps? Also isn't part of the process to unroot and relock the boot loader when flashing back to the original Android? I didn't read up on the specifics because again the performance of my phone has been great.
[Samsung Galaxy Nexus] KWKSLVR:
My random writes seem to range from .07-.17 MB/s. Performance is pretty snappy on 4.1.2, not as snappy as it used to be, but it's still fine. If you want to go back to stock, then technically yeah, you need to lock the bootloader which is as simple as: fastboot oem lock

Flashing the factory rom takes care of "root" per say since the stock rom isn't rooted. If you're flashing system, userdata, radios, bootloader, recovery, boot and wiping cache then you've taken care of everything. The bootloader being locked or unlocked doesn't really make a difference. Personally, I flash everything a couple of times in a row just to take care of any ghosts, but I don't know if that's really legit or just placebo.

The only thing I didn't really do was run fsck. Granted, going back to stock replaces the need to do so. Maybe these nand's just aren't all they're cracked up to be in the longevity department? I've heard of derogation after flashing several hundred times, but I haven't flashed THAT many nightlies in my time with this device.
[Samsung Galaxy Nexus] wasdf:
Hi all, I am having a extremely slow IO speed with my GN, even I have tried wipe data and wipe cache, use different kernel and different rom, LagFix and fstrim script, making 5G of free space .... but it didn't work. Attached screenshot is the IO Speed test of Androbench, comparing with my friend's Sony XS (similar hardware with GN), I found that the test for SQLite is extremely slower than his XS, which is under 10 sec, but mine is about 20sec+ at least.. so I test with RL benchmark, which is a app for speed test of SQLite, it takes about 70 sec and my friend's XS only take 50 sec. The I search on the Internet and found this post, the io speed shoud't be too slow, does anyone know what is the problem? Thanks....
[Samsung Galaxy Nexus] chrone:
You might experience the same issue with KWKDLVR above. Are you using Galaxy Nexus 32GB Verizon one?

Never had the problem like that when using Galaxy Nexus GSM version up to Android 4.2.1. But on newer batch production of Galaxy Nexus GSM version is known to have terrible slow down compared to old batch. Perhaps different emmc chip has different characteristic.

Sent from my Nexus 4
[Samsung Galaxy Nexus] wasdf:
Nope.. Just a normal 16G GSM with chips V3U00M...
[Samsung Galaxy Nexus] chrone:
Aha, that's the newer chip i posted in first post which has significant slow down effect when used over time, just like slow down on nexus 7 which using Kingston memory.

Up to now, I still don't know what is the remedy since i was using the older one.

Sent from my Nexus 4
[Samsung Galaxy Nexus] wasdf:
but didn't you mean fstrim or using kernel with fsync off can solve the problem? I have done both but still pretty slow :( then what is the purpose of using fstrim?

I can't remember if the io speed is slow or fast when it is a bland new phone. If it was with a fast io speed, is it possible to do some trick to "revert" back to the normal io speed? I just don't want to buy a new phone ($$$$$) for this stupid problem, and I dont mind to do anything related like perform a full wipe of system (Sure, I have done this before, but the speed is still slow....)
[Samsung Galaxy Nexus] madphone:
i have donwgraded to android 4.1.2. Random Write performance has only increased from 0,23 to 0,25mb/s. But the overall performance is so much better than before (i was used to run cm nightlys). Finally i can install or update apps and use my phone at the same time. Camer starting and rotating speed is so much better. i hope android 4.3 will be as good as 4.1. but i don't think so. 4.1 was the only good android version for galaxy nexus. nexus 7 and galaxy nexus will definitely be my last nexus devices.
[Samsung Galaxy Nexus] chrone:
The io speed in gnex was slow compared to flagship device like htc one x and samsung galaxy s3 at the time. That was why i switched to nexus 4 when it came out.

Nexus 4 io speed if n4 is twice or four times faster than gnex. Note that random write is always smaller. Gnex rw is around 0.25mbps while n4 rw can be up to 1mbps.

I used fstrim to bring back the sequential write performance in gnex. Never had a slow down at the random write speed.

I still use fstrim too on n4 since the random write and sequential write slow down over time of usage.

Different chip different characteristic. My gnex was using sandisk emmc, while my n4 is using thosiba emmc.

The one from kingston is reported to experience very slow experience with no permanent cure. It always degrades faster when used even after it has being trimmed.

I surveyed all of my colleagues who are using gnex with the old sandisk emmc are still rocking just fine for near one year of usage. They do trim periodically. The batch production is from early august of 2012 and below.

Sent from my Nexus 4
[Samsung Galaxy Nexus] wasdf:
Thanks for your kindly explanation, finally I have fixed the slow storage problem for now lol (chips: V3U00M), just want to make a note here for reference :D

except reading this thread, I found this thread (go for #40) on the Internet

http://code.google.com/p/android/issues/detail?id=41061

As I guess, I think he said "Your phone runs CM" is mean by init.d support, because I am not running CM but still working..

I put that 10discard file (the file mount /data with discard option) into the init.d folder, (Remark: Please note that your init.ld folder may not be /data/local/userinit.d . for my rom, it located in /etc/init.d , just check for your rom)

After it, I think the key point is "Please note that this will not recover your phone from slowness.....", so I backup my Internal Storage to my computer first, and do a nandroid backup with TWRP to a otg USB flash drive so I dont have to clean install everything again later (Remark: there are no backup to otg USB flash drive function with CWM, must use TWRP recovey, but I dont know if there is any update of CWM that support otg later)

After the backup, I power it off and unplug the otg usb flash drive then boot back to Android system to perform factory reset under settings menu, actually this may be able to done with TWRP wipe option, but I decided to factory reset once first under android system, because I dont know what "factory reset" does except from deleting data from memory, is there any other step included like "initialize block" for "format"? As factory reset just take about 2-3 mins, I did that before going to the next step.

Next, I boot in to TWRP again, under the Wipe menu, I have chosen all the wipe option to run once, after wiping, I plug back the otg usb drive and restore backup from it .........

and here is the magic :silly: I ran 5 test again and speed is reasonable this time :good:

Now I have LagFix & fstrim init.d installed, going keeping 25% free space, just formatted /system, /data/, and /cache and mounting those with discard option, with fsync off, let see how long it last for.........
[Samsung Galaxy Nexus] chrone:
awesome news! :)

seems like your emmc chip has the same characteristic as in sandforce controller in ssd where the performance could not be restored back to normal by trimming only. on sandforce case, the ssd needs to be secured erased to restore the performance. while in your case, the emmc needs to be formatted. haha

resource:

http://www.anandtech.com/show/5508/...cherryville-brings-reliability-to-sandforce/7
[Samsung Galaxy Nexus] Jar3112:
Good news then.. I hope someday there will be a faster way to do that..

Sent from my Galaxy Nexus

---------- Post added at 01:25 PM ---------- Previous post was at 12:58 PM ----------

Maybe if someone has CWM he may just use the gn toolkit to backup rom and storage, instead of backing it up on a flash drive am I right?

So, would it be the same if I did it this way (assuming I already have the script in init.d)?

1) Backup rom/sdcard on pc with the toolkit.

2) Boot into CWM and mount /data with discard option, then factory reset and format /sdcard.

3) Restore rom/sdcard with the toolkit

Sent from my Galaxy Nexus
[Samsung Galaxy Nexus] chrone:
Yeap pretty much the same method with return to stock using fastboot except for the backup app settings and data.

I wonder people who failed to bring back performance after factory reset were only factory resetting from custom recovery.

Where it should be going back flashing google factory image reset as guided by efrant as follows:

http://xdaforums.com/showthread.php?t=2010312

[HOW-TO] How to flash a factory image / return to stock / unlock / root #

Sent from my Nexus 4
[Samsung Galaxy Nexus] chrone:
" The new Nexus 7 (2013) with Android 4.3 includes support for fstrim, essentially idle garbage collection, which TRIMs the eMMC when a few conditions are met – the device is idle, screen off, and battery above roughly 70-percent."

Finally Google, you hear us out! Thanks. :)

Nice review from anandtech as always.

http://www.anandtech.com/show/7176/nexus-7-2013-mini-review/4

#fstrim #trim #android #nexus
[Samsung Galaxy Nexus] c0mrade2:
I had the same performance problems, so I installed lagfix and now my gnex is running flawlessy on latest PA+kubo kernel, without any factory reset.

I uninstalled the app and pushed fstrim init.d script, which basically should do the same. To prevent any future slowdown I wanted to push the discard init.d script too, as mentioned before, but the only problem is that my V3U00M memory chip seems to have been created in 02/1998 O.o I was wondering if it's safe to go ahead, without knowing for sure whether my device is affected by the brick bug.

P.s. I sent my gnex to repair in June, because of this issue http://xdaforums.com/showthread.php?t=2306672

Probably they substituted the memory chip
[Samsung Galaxy Nexus] bubzers:
does anyone know if fstrim was added in 4.3 for the Nexus 4 (and other Nexus devices)? i have a bootloader locked and never rooted Nexus 4 and am considering LagFix (my sequential write ~2MB/s), but will forego it if fixed in 4.3 (updated yesterday).
[Samsung Galaxy Nexus] Pecata:
Great question. I would like to know that too if someone can confirm...
[Samsung Galaxy Nexus] chrone:
nice to hear this. :)

this i want to know too. i do hope it will be pushed out to the rest of the nexus devices. *finger crossed*
[Samsung Galaxy Nexus] mattiL:
Did you see the link by [MENTION=4628255]chrone[/MENTION] to Anands site in post #318 (in this thread)?

http://www.anandtech.com/show/7176/n...-mini-review/4

I talks about trim being included for the old Nexus 7 too.
[Samsung Galaxy Nexus] im the doctor:
Fancy kernel and less than 20% of Free memory ... with other kernel i would have 0.26 random write and lag level would be over 9000..

Fancy uses trimm => fantastic performance

Lag fix is useless with Fancy

Inviato dal mio Galaxy Nexus con Tapatalk 2
[Samsung Galaxy Nexus] bubzers:
Well, I guess I just needed to wait overnight... My Nexus 4 (with 4.3 update) now has sequential write speeds ~10 MB/s. This leads me to believe the Google addressed the issue for the Nexus 4, though more confirmations are needed to verify.
[Samsung Galaxy Nexus] chrone:
Could not find any trim binary in /system/bin, perhaps they implemented in other area of the system. Hehe
[Samsung Galaxy Nexus] xaueious:
FSTRIM is built into Android 4.3 now. No need to worry about this anymore.

It's called idle maintenance service. (supposedly runs daily when phone is idle and charging?)

Practically, this may mean that after a dirty install to Android 4.3, charging your device will result in a long TRIM, resulting in the device lagging if you do a short charge only.

Another implication is that this assumes that the user always charges with the device on. Otherwise TRIM will never be run.

Sources:

https://android.googlesource.com/platform/system/vold/+/b87937cdea689594a293979b30b13054e7455dee

https://android.googlesource.com/pl...om/android/server/IdleMaintenanceService.java

https://android.googlesource.com/platform/frameworks/base/+/a7452ee27de35e75b234adcf143c18f85d3f1aad
[Samsung Galaxy Nexus] chrone:
fantastic! i didn't know the binary name is vold. lol. nice finding dude! :highfive:
[Samsung Galaxy Nexus] matteventu:
So is this issue definitely solved?

I haven't understand how fstrim works... Practically, Android "runs" it when you put the device to charge the battery, and when you don't use it for at least 1 hour?

This happen omly once daily or, in the same day, every time that I plug it in the AC power plug and with 1 hour of non-use ?

And if I start using the phone while it is fstrimming?
[Samsung Galaxy Nexus] chrone:
if the log from java maintenance server is right, then whenever your device is idle for more than 1 hour, or if daydream is activated more than 1 hour, and if only the battery is above 20%, then vold will trigger fstrim.

it will automatically stop the trimming if there's an activity, or the screen is turned on, or your battery reach below 20%.

just my two cents. :D
[Samsung Galaxy Nexus] matteventu:
Si that something like "dynamic fsync" of the custom kernel?
[Samsung Galaxy Nexus] chrone:
No, it's a different story. Hehe
[Samsung Galaxy Nexus] matteventu:
But which one is better?
[Samsung Galaxy Nexus] mattiL:
Found this in a logcat:

I/fstrim ( 117): Starting fstrim work...

I/fstrim ( 117): Invoking FITRIM ioctl on /cache

I/fstrim ( 117): Trimmed 438341632 bytes on /cache

I/fstrim ( 117): Invoking FITRIM ioctl on /data

I/ActivityManager( 372): No longer want de.dieterthiess.ipwidget (pid 26408): empty for 1802s

W/ActivityManager( 372): Scheduling restart of crashed service de.dieterthiess.ipwidget/.ConnectionService in 5000ms

I/fstrim ( 117): Trimmed 11410698240 bytes on /data

I/fstrim ( 117): Finished fstrim work.

Seems fstrim works.. :)
[Samsung Galaxy Nexus] aosp:
Google uses fstrim in 4.3 ;) https://android.googlesource.com/platform/system/vold/+/b87937cdea689594a293979b30b13054e7455dee

Sent from my Cooler Faster Smarter Vanir-ize Galaxy Nexus using a AK
[Samsung Galaxy Nexus] madd0g:
vold is volume management daemon : http://www.lehman.cuny.edu/cgi-bin/man-cgi?vold+1

it basically keeps track of volume mounting

---------- Post added at 06:33 PM ---------- Previous post was at 06:31 PM ----------

Start googling a bit, because you're comparing apples and oranges now.
[Samsung Galaxy Nexus] chrone:
I read in aosp git commit one of the above that they include fstrim lib in vold.

Update:

Pretty well explained here by Brian Klug. All Nexus devices are supported. Yay! :)

http://www.anandtech.com/show/7185/android-43-update-brings-trim-to-all-nexus-devices

Sent from my Nexus 4
[Samsung Galaxy Nexus] geemaan:
I din't find the fstrim reference in logcat and I charge my gnex in the dock each night.
[Samsung Galaxy Nexus] krugdenis:
Is there a way to call fstrim manually?
[Samsung Galaxy Nexus] chrone:
Just checked the logcat too but could not find any. Perhaps it's because I rebooted the phone this noon and wiped cache and all. Will post later tomorrow morning.

The built-in fstrim inside vold binary? Am afraid not.

But as always, if you root your phone, you could put the fstrim binary in /system/bin and run it from terminal manually or using script, or using lagfix app, or flash the cwm flashable script on post #1 via custom recovery. :)

Sent from my Nexus 4
[Samsung Galaxy Nexus] mattiL:
I found similiar fstrim messages in a logcat from my Nexus 7 too, so it must be for most devices capable of installing 4.3.
[Samsung Galaxy Nexus] sr1ks:
Think it is possible by running

adb logcat -d | grep -i fstrim

(http://www.anandtech.com/show/7185/android-43-update-brings-trim-to-all-nexus-devices)
[Samsung Galaxy Nexus] andQlimax:
that is to check if it is/was running
[Samsung Galaxy Nexus] chrone:
is your phone running android 4.3?

just got mine today after leaving it charged for more less one and half hour long untouched. it must be reaching the 80% threshold and idle more than 1 hour there.

i used window 7, so from windows command prompt (cmd.exe) with android platform tools installed from its SDK, i typed "adb logcat -d > logcat.txt", opened the logcat.txt, and finally found fstrim. :D

awesome! :)
[Samsung Galaxy Nexus] geemaan:
Of course I have 4.3 :) I also dumped logcat from adb and searched for fstrim but didn't find it. The phone is charging overnight so there's plenty of idle time.
[Samsung Galaxy Nexus] krugdenis:
My GNex is on 4.3 for a week, but I'm too haven't noticed any fstrims in logcat. Charging every night...
[Samsung Galaxy Nexus] andQlimax:
logs does not persist forever, so after some hours you may not find it anymore
[Samsung Galaxy Nexus] MondoMor:
It's called FITRIM in the logs. I found it by just searching for "trim".
[Samsung Galaxy Nexus] geemaan:
I searched for just "trim" too...
[Samsung Galaxy Nexus] geemaan:
Allrighty, instead of charging the phone in the dock, this time I connected the usb cable and this morning, lo and behold:

I/fstrim ( 117): Starting fstrim work...

I/fstrim ( 117): Invoking FITRIM ioctl on /cache

I/fstrim ( 117): Trimmed 434176000 bytes on /cache

I/fstrim ( 117): Invoking FITRIM ioctl on /data

I/fstrim ( 117): Trimmed 4465147904 bytes on /data

I/fstrim ( 117): Finished fstrim work.

I'd say that fstrim is not invoked if a daydream is running. Or at least the clock I have as daydream.
[Samsung Galaxy Nexus] MondoMor:
Well that's odd. The first time I looked through my logcat, I only saw FITRIM. Now today I see exactly what you posted, geeman. :eek:
[Samsung Galaxy Nexus] geemaan:
Tonight I'll set the system clock as daydream. Tomorrow night I'll try without daydream. Both times I'll charge it in the dock.
[Samsung Galaxy Nexus] chrone:
I disabled daydream.

Sent from my Nexus 4
[Samsung Galaxy Nexus] geemaan:
As expected, fstrim was not triggered while daydreaming with the stock clock so I'll disable daydream too. It was a nice night stand clock though.
[Samsung Galaxy Nexus] skyline159:
I can't find fstrim in the logcat of my Nexus 7 too, although my Nexus 4 runs it every charge.
[Samsung Galaxy Nexus] geemaan:
Last night I charged it in the dock without a daydream. Unfortunately, for some reason, logcat did not go back in time far enough so I don't have a confirmation that fstrim ran. I'll try again tonight.
[Samsung Galaxy Nexus] geemaan:
I think that TRIM is not started when the phone is charging in the dock. I got the logcat for the whole night and there's no mention of fstrim...

*LE*

FSTRIM was triggered after more than an hour of charging through the microUSB port.

This means that we, dock users, will have to charge our phones directly for more than an hour if we want TRIM.
[Samsung Galaxy Nexus] prulleman:
not sure what custom roms/kernels will do in this story, but i'm running purity and CM10.2 (both 4.3) for some while now and never seen the fstrim in logcat, always charge in dock (without something on the screen).

I do run lagfix manually sometimes
[Samsung Galaxy Nexus] Jar3112:
Just read the post over yours.

Sent from my Galaxy Nexus
[Samsung Galaxy Nexus] prulleman:
Just confirming...
[Samsung Galaxy Nexus] Nexusaurus:
This feature apply for our Galaxy Nexus too or is just for N4, N7 and N10?
[Samsung Galaxy Nexus] markop90:
It's an Android 4.3 feature, it's not based on device, so yes :)
[Samsung Galaxy Nexus] thegidz:
Actually, while it does work with the Galaxy Nexus, it does depend if your device's flash memory controller supports the commands needed by TRIM. IIRC, there are some Galaxy Nexus variants out there that are using a flash memory controller where it doesn't work.

Sent from my Galaxy Nexus
[Samsung Galaxy Nexus] [P][O][I][N][T]:
So, I've just installed a 4.3 Rom (Supernova 4.0.2). Do you think is necessary to use fstrim?
[Samsung Galaxy Nexus] chrone:
it's not necessary as long as the trim library not excluded in the vold binary in /system/bin of the custom rom. feel free to run trim using the fstrim binary or lagfix app manually though, it won't bite and much easier to control that way.
[Samsung Galaxy Nexus] [P][O][I][N][T]:
Thanks a lot!
[Samsung Galaxy Nexus] ashjas:
can any body tell me what is this new /persist partition ? it appears in my N4 logs but not on my N7 2012..

is it a new partition introduced in new tablets/phones...

and i have a doubt.. what does actually "Trimmed 1062178816 bytes on /data" mean...? does it mean that it released 1062178816 bytes from the falsh controller's lookup and it would consider these many bytes as actually free?
[Samsung Galaxy Nexus] chrone:
Perhaps you could ask efrant regarding the /persist partition at this following thread:

http://xdaforums.com/showthread.php?t=2010338

[REF] "Android for the Nexus 4" 101 & FAQs

And as for the trimmed bytes, I never take it seriously. It's explained in more details at Lagfix app thread and the reason AuxLV disabled to show the trimmed bytes information on his app.

http://xdaforums.com/showthread.php?p=36831936

[APP] LagFix (fstrim) v1.5.1 2013.03.04

Sent from my Nexus 4
[Samsung Galaxy Nexus] geemaan:
Surprise, surprise. I checked this morning for fstrim in logcat after charging during the night in the dock and I found it! I think this new update JWR66Y has fixed this.
[Samsung Galaxy Nexus] chrone:
Glad it works. :)

Sent from my Nexus 4
[Samsung Galaxy Nexus] defconoi:
In addition to fstrim, disabling journaling gave me a 30% io boost

http://xdaforums.com/showthread.php?t=2280496
[Samsung Galaxy Nexus] chrone:
I really wish Google will also implement the Moto X's Flash Friendly File System aka f2fs on next version of Android to improve random write IOPS.

http://www.anandtech.com/show/7235/moto-x-review/9

Sent from my Nexus 4
[Samsung Galaxy Nexus] tomalrocks:
is android 4.3 TRIM function supported on galaxy s3 devices? or do we still need to run lagfx app? i am using verizon s3 with para android 3.99RC rom.
[Samsung Galaxy Nexus] Jar3112:
Does S3 have these problems too? :eek:

Sent from my Galaxy Nexus
[Samsung Galaxy Nexus] chrone:
No need if you're running 4.3 based rom and okay with the built-in trim function terms and condition in vold binary.

I bet almost all emmc is affected by the write performance degradation over time depends on usage.

Sent from my Nexus 4
[Samsung Galaxy Nexus] chrone:
Seems /system is not trimmed by the built-in vold binary in Android 4.3.

After not using lagfix app for two months, my n4 starts to lag perhaps due to constant update of the system apps from Google.

I might be wrong here, but trimming /system breathes new life on my n4. :)

Sent from my Nexus 4
[Samsung Galaxy Nexus] bpyazel:
/system is not written to when updating system apps. The updated version is stored with all other apps on /data and the original is left untouched in /system. This is why you have the ability to "uninstall updates", which just deletes the version in /apps. In fact, no stock app (google play store) will ever write to /system because it's not possible without root or from recovery. It's a read only partition by default.