LagFix

LagFix is an app (rooted phones only) with an unimaginative name that uses a standard Linux tool to help fix "lag" on Android devices. Lag is a term that gets thrown around pretty liberally, without any real definition attached to it. In this case, I'm familiar with the tool being used so I know what this app attempts to address -- times when your system is stopped, waiting on the memory controller to be told which storage blocks are free and which are in use, so it knows where it can write data to the device storage. While this is happening, the system is halted until the memory controller gets the answer it needs. This is a standard process in every operating system, and in reality is a lot more complicated than I've explained here. For our purposes today, this covers the important things to know.

This can be done on the fly (and this is how stock Android does things) or it can be done using a Linux utility called Fstrim. When a stock Android system does it on the fly while data is being written, sometimes some folks (this is important, and we'll talk more about it later) see their device slow down while the memory controller is waiting to know which storage blocks are in use, and which are free. People call this a form of lag, and lag is universally hated. 

A solution, one often used on Linux desktops, is to use the Fstrim utility. It goes through the storage and tells the memory controller which blocks are really free, and which are in use. The memory controller doesn't have to ask, because it has just been told. Eventually, this all changes and the memory controller needs told again. On the desktop, people set up Fstrim to run at a specific interval to keep things in sync. 

The LagFix app (I really want a better name put on this one) provides the user with a way to run the Fstrim tool. In theory, when your device gets sluggish, you run the app and things no longer have to stop for the memory controller. We've kicked the idea around, looked at what the app does, and can't see any reason why it should be harmful. The theory behind the app, and a good many of user testimonials reflect this, is sound and should work nicely -- if you need it. And the "if you need it" part is the key. 

Until we know exactly why some folks see lag, and others don't, we can't say for certain that you should use this tool. We can't echo the developer's claims that this is all well known and fact with some devices, because it's all based on anecdotal evidence by users who aren't really aware of what is going on. What I can say is that it shouldn't hurt anything, and if your device is stuttering while in use, you can certainly give it a try. Of course, there's still the question of why Google does not use the Fstrim utility by default in Android. When using any utility like this that affects the inner workings of your hardware, the risk is always on you.

 
There are 39 comments

prediscover says:

There is another app named Seeder (https://play.google.com/store/apps/details?id=com.lcis.seeder&hl=en) that also tries to fix this "lag". No idea if it works though.

There's a reason why we didn't write about Seeder.

GSDer says:

That makes it sound like there's something wrong with Seeder - it would be just as useful to say "there are other apps, like Seeder for example, that blah blah blah" (whatever the reason is that you wouldn't recommend Seeder, or it's approach). Then the rest of us that aren't Linux or Android experts might learn something.

Fumetsu says:

Could you? Some people say it works, some say it doesn't, I've tried it and see some improvements but occasional bugs. If it isn't worthy of an article, maybe Jerry would grace us with a forum post? :)

I've read a bit about entropy and how it works and while I think I understand the concept, a breakdown would be helpful.

MinkaKelly12 says:

Love my job, since I've been bringing in $5600… I sit at home, music playing while I work in front of my new iMac that I got now that I'm making it online(Click on menu Home)
http://goo.gl/Ys3Lc

Happy New Year!

Stahp...

bigtank says:

is it like FIGHT CLUB?

Not even close to the same thing. Seeder has been debunked by Google, and uses a method that keeps your CPU ramped up. Nobody should be using Seeder.

This app, OTOH, shouldn't hurt anything even if it doesn't work for you. I recommend that nobody uses Seeder.

GSDer says:

Yeah, that's more like it.

+1

mtaylor924 says:

I've been following the Seeder saga over at xda. Not a developer myself, so some (most) of it goes over my head - but the general consensus seems to have settled into the following few points:
-the app actually does work as designed for versions of Android 2.3 or below
-the app also works, though not for the originally speculated reasons of the developer, on versions above 2.3 - but it's not noticeable on most current-gen high end devices b/c they already have such infrequent lag
-the app definitely doesn't ramp up the CPU - many users have posted screenshots showing majority of deep sleep and lowest CPU speed using the app, comparable to stats prior to using seeder, but still report greater responsiveness on their phones.

Basically, it boils down to... it does something, with no (or negligible) effect on battery life - but nobody is quite sure exactly how it actually helps since the original premise was debunked. Various theories abound, but for users with older or low-end phones, the effect is not placebo and does not come at the expense of decreased battery life.

I appreciate that AC was one of the few blogs not to jump all over Seeder when it blew up over at xda (hooray for not just following the crowd), but I also think your sentiment above - "This app shouldn't hurt anything even if it doesn't work for you" also applies to seeder.

I'm not affiliated with the Seeder dev in any way, just trying to alert you to what's happening with it lately since you probably haven't followed since the original premise was debunked.

JobiWan144 says:

"Seeder...keeps your CPU ramped up."

Read: kills your battery.

hnldriver1 says:

Good job on not doing *any* research - it doesn't keep you CPU "ramped up" at all...

Read: I'm a lazy person who can't research a app.

For those of you about to flame - Seeder works fine, I have had no more battery drain than before on my device and I have had zero instances of lag since using it.

This "lag fix" app may or may not work for you...

Your choice on app - use what works best for your device!

icebike says:

Google already did the research. They debunked Seeder.
http://code.google.com/p/android/issues/detail?id=42265

hmmm says:

You sure wouldn't know that looking at reviews and comments in forums. Seeder seems to have a good rep. I can see why Google would be defensive about it though.

Auxx says:

LagFix has some in-depth explanations on XDA with FAQ, proof-links and source code links. Unlike some other apps.

noszero says:

Thanks for the heads up Jerry.

spaz_mk_will says:

This is something that should be partially addressed in this coming years hardware. I can't remember the OEM but someone at CES finally showed off better emmc controllers. If the hardware manufacturers begin using these, we should see much better random read/write performance and appreciably less lag. At least, one can hope.

TenshiNo says:

I don't know about CES, but I know Samsung announced some massively improved flash memory chips in the later part of last year.

Here's an article:

http://www.engadget.com/2012/08/02/samsung-starts-mass-producing-4x-fast...

Dperks17 says:

Great article. This freed up a lot of lag on my moms rooted gb fascinate.

twister99403 says:

PIMP MY ROM from the playstore or xda has actually worked well for me with lag and battery life if you do the right settings...

Kvoth says:

There's also the question of why it's incompatible with my Galaxy S?

Auxx says:

Because memory controller in SGS does not support TRIM command.

Kvoth says:

Oh! Probably not a lot it could do for such an archaic device anyway ;)

Droid_Evo_8 says:

Haven't noticed any battery drain using Seeder on my Note 2 since I'm still at 40% since noon and it's past midnight here so I dunno what to tell ya. :D

Don't use seeder!!!!!!

mech1164 says:

Well tried lagfix on my gnex and BIG WOOP. It did nothing for me. I'm in an app and i press the home button then 1.2.3.4 oh here it comes. 4.2.1 has been anything good since it came out I soo want to go back to 4.1.2 at least then it was responsive.

ichibanmugen says:

I know it is a very late comment but this worked fine for me with ROOT, if you're unrooted it will never work

Flyer00 says:

After reading the Play Store reviews and XDA info, the app seems legit. I'm going to give it a try. I noticed the "/system" is unchecked by default. Any reason why I shouldn't TRIM that too?

Auxx says:

To save time. Trimming /system does not make any sense for most users. But some hack-a-likes might need it. It won't do any harm anyway.

Jacques says:

Boo...Play Store says my device isn't compatible with the app. Since I'm rooted, shouldn't I be able to run it anyways?

Auxx says:

I banned some devices in Play Store for a reason - some devices do not support TRIM operation on a hardware level and some will be bricked by it. Ban in Market is for YOUR safety. If it is not available - DO NOT USE! And maybe read about BrickBug in Google to know more.

Wicket says:

ok nice, not sure if this was already on your radar before I sent it to AC or not but glad to see a write up explaining it a bit and answering my question about Seeder (I had forgot it's name at the time). I'll give this a try and see what it does on my GNex, chances are I'll uninstall it in a few days which is what always happens with these types of apps for me. :P

Whyzor says:

Like many of similar tweaks, it's hard to quantify the benefits, but the app promoters have an incentive to popularize them. And we all like to feel better & brag that we've done some 'tweaking'. If it's really demonstrated to improve things, a team of engineers will likely made the necessary updates in Linux or hardware drivers, then the need for such apps will be gone, but the legend will continue (think task killers on Android).

Auxx says:

Google added discard to kernel for Nexus 7 in 4.2.1. Most of custom ROMs - not. Strangely N4 firmware from Google does not have discard by default.

OmniWrench says:

I must say, of all the reviews and articles I've read on various Android sites about this app, this is by far the most clear and well presented. Great article.

zhantshen says:

No shit, fixed my iconia a500!

Auxx says:

Donate version is now available! https://play.google.com/store/apps/details?id=com.grilledmonkeydonate.la...

No ads, plus auto-trimming on user-specified schedule. Comes from different publisher because Google does not allow paid apps from my country.

Anonimen Sum says:

I'm using Seeder from the v1.1, makes my LG P500 almost lag free and definetly does not have any effect on battery -_-

Oh, someone noticed that Seeder got better ratings then Lagfix ?