yashsingh1/xdaforums huggingface dataset:
[Galaxy S I9000 General] appagom:
Moving or not.. things don't happen instantly and you must rewrite inodes and then move data or visa versa and at some point something points to the wrong blocks or doesn't have a delete flag etc. How can this not be true unless maybe large chunks of data are written simultaneously in a manner impervious to power outage? In the end I agree the overhead isn't worth it for a phone.. but I'm not at all convinced that it's "just" overhead.

BTW IMO the nand has evrery right to block on an fsync and even should(but that's just opinion not necessarily specs). There should be a way to garauntee critical data gets written without interruption.. to the physical device. But rfs and the database should not be abusing that. We do want write caching at some layer obviously. Trying the new froyo I actually am wondering if it is being abused less as things seem much better to me. Quandrant score says nothing about that though as I understand.
[Galaxy S I9000 General] Chad_Petree:
so ext 2 is the way to go, good to know ! ;)
[Galaxy S I9000 General] RyanZA:
This is a pretty old thread, and more info has been found since!

1) The reason that the fsync is bad is a bit more complicated than it first appeared. The MoviNAND has a physical block size of somewhere between 1MB and 4MB (should be easy enough to test exactly, but I haven't yet). Because of how NAND works, when even a single bit is flipped, the entire block must be erased and rewritten. So if you flip a bit and then call fsync, the MoviNANd will write a full 1-4MB of data to NAND - what it's meant to do.

But this is pretty terrible: A normal database app can do 100 small transactions (one per message or similar) in a very short period of time. If each of these transactions is about 1KB - then on a normal spinning disk you would have changed 100KB of data. On a small NAND drive (a 512MB, say, with a physical block size of 4KB), then you have written 400KB of data. Not too bad. On the SGS's huge MoviNAND, you have now written 100MB of data! This is pretty crazy, and it's the whole issue behind the 'lag'.

This get's a whole lot worse with journaling. With full journaling (stock EXT3/4, RFS) then for each file alteration, it will write a small journal entry to a different location. This is another full erase+write cycle, literally doubling the amount of data written.

2) EXT3/4 is technically safer, but the chances of encountering this safety difference is extremely low. Why? MoviNAND's write cycle is an all-or-nothing thing. The entire block will be rewritten - or no change will be made, regardless of power cuts. This means that the regular saving point for journals - restoring errors created in metadata - simply does not apply. There can be no write errors in the metadata, only inconsistencies.

For example, on a spinning disk, the power can cut out half way in a metadata write, leaving unreadable garbage. When this happens (and it can happy very easily) the only way you are going to be able to work out what's happened is with journaling. This whole issue get's nearly avoided because of how writes to NAND happen! :)

However, journals are still useful for data journaling, even if they aren't useful for metadata journaling - the chances of this are very low though. If a file is being resized, but power is cut off between the time the metadata is written and the data is written, the file can become corrupt. Chances of this are very low though, and require full (RFS style) metadata to avoid. Files on Linux are usually rewritten rather than resized, anyway.

Basically, this all comes down to less fsyncs=better (but riskier) and journals=fairly bad. It also shows why MoviNAND is slow - the phyiscal block size is enormous because of the 8GB/16GB size compared to other phones which have 512MB NAND. So bigger is not always better when dealing with non-optimized filesystems. ;)

And EXT2 comes out as pretty much the best choice.
[Galaxy S I9000 General] mmorselli:
RyanZA, your posts is allways full of usefull informations, but you have any idea why Galaxy TAB, with 16Gb of MoviNAND and RFS filesystem doesn't lags at all ?
[Galaxy S I9000 General] TheNikkoMan:
^ This, and also how come changing the filesystem used make the lag fix less noticeable/disappear, if the block size is what's causing the lag?

You're great btw :D
[Galaxy S I9000 General] RyanZA:
Well I don't have a Tab, and I'm not really sure how similar the NAND is. That said, OCLF (loopback EXT2) does make the Tab faster too - so it might not be all that different.

As far as filesystems go, RFS is a pretty poor filesystem to start with. It works off the FAT32 method, with additional filesystem features grafted (poorly? well.. that they did it at all is kind of amazing considering FAT32 and the kind of hacks it must require) so RFS is already off to a bad start just because it uses FAT32's design flaws. Then add in the full data journaling that RFS does, the 'lock reads when we write' strategy, and you're in for pretty poor speed.

Running EXT4 with full journals is also slow though - not as bad as RFS since it does not lock up, but write speeds are very bad. The EXT4 people are using on the SGS is mostly turning off nearly all journaling, at which point it becomes EXT2 with higher CPU overhead - and therefore performs similarly.

Proper solutions would be (1) velcroing the battery into the device so it can't fall out while in use, and then turning off all fsync in general, and modifying a filesystem to use enormous blocks to match the hardware. This isn't really practical.

Or (2) redesigning the MMC controller on the MoviNAND to have battery backup, and a large buffer for optimizing writes to use the full block. Obviously we can't do this, but I assume this is what Samsung is working towards if you check out the tech announcements they have for their in R&D NAND drives.

Or there might be other, simpler and better solutions that someone will work out because of some important missing details. Who knows. :D

At any rate, simply using EXT2 makes the device FLY, so it is probably enough as is. At least I haven't had any reason to complain about phone speed since swapping to EXT2. ;)
[Galaxy S I9000 General] appagom:
Ok.. thanks for the thorough reply. Sounds like I'm not adding anything that wasn't known (which is good to hear). I'm still using your lag fix because as you said.. it flys (even if it breaks haptic on korean phones ).
[Galaxy S I9000 General] momashi:
I would totally agree that they would do very well to hire RyanZA. Thank god for people like him, Team Whiskey, JAC and the army of dedicated developers/hackers who develop mods for these phones with a budget that is mainly constituted of passion, dedication and our eternal gratitude. Their work has freed our phones' phenomenal hardware from the shackles of Samsung's self-imposed software/driver mediocrity while Samsung itself with it ginormous resources can't even get it together release a minor update for Android (Froyo) in a timely fashion much less address the core design flaws behind the lag issues... so, thank you again, RyanZA and I enjoyed reading this tutorial very much.
[Galaxy S I9000 General] mammenj:
Ryan, this was great post and all the discussion around it was informative.

I encounter lag only when i start the application, very seldom when actually using the app. Sometimes when the app starts, its totally a blank screen for almost 2-3 secs or more.

This makes me to conclude, the cause of lag is Dalvik VM. If I understand android architecture, each application creates a VM. Creation of VM is expensive in terms of CPU and memory, therefore I think Dalvik is more of a culprit than the filesystem. Another reason I believe, Dalvik is the culprit because of other linux mobile system like Nokia does not have this lag. One more reason to believe that Dalvik is the culprit for lag is because every other Android phone has some lag.

What you guys think?

Ryan, what is your opinion on the dalvik vm?
[Galaxy S I9000 General] xxgg:
8/16GB of which 2GB is for system data.

Is this where ROM is installed to ?

My i9000m which I have sent for repair could not mount the internal sdcard and fail to boot into OS.

But I could boot into OS with external sdcard plugged in. (can't mount external sdcard either). Once booted into OS I can see left over space from 2GB, so I can isntall apps and such.

So does this mean nandflash isn't really dead? partition gone wrong?

There could be a software fix that we could have performed?

Would this be the theory?

or am I totally off the topic here? (i think i am)

Same say, their phone was only software flashed, yet they had shown same signs of failure of internal sdcard not being able to mount and such.

Maybe it is just a bad batch of hardware`/
[Galaxy S I9000 General] dmulligan:
Interesting new theory. How do you account for the fact that the lag gets worse over time? Is there some key file that grows bigger than one block?
[Galaxy S I9000 General] peachpuff:
Yes why is that, with voodoo/ulf i noticed this, its fast the beginning and then starts slowing down once you load the phone up with apps. Its almost like the fragmentation issue that inexpensive ssd's have, they're quick when empty but slow down when full.
[Galaxy S I9000 General] Auzy:
Lots of things could account for that... Not even related to the HDD>
[Galaxy S I9000 General] mammenj:
one possibility is memory leaks or lousy memory management by android
[Galaxy S I9000 General] Auzy:
Or even that he is starting more and more services over time, or using specific apps which suck
[Galaxy S I9000 General] mammenj:
user can start any number of services, if android knows how to manage the resources efficiently, its not users fault.
[Galaxy S I9000 General] talktoanil:
its the lousy code of apps....developers fault.
[Galaxy S I9000 General] Auzy:
Why? It should kill every app that uses a significant amount of CPU?

It's partially the users fault too, and the developers fault. Or do you also think it's Microsoft's fault that they chose not to kill every program in windows the moment RAM is exceeded?

There really isn't enough information to talk about the reality of the RFS lag. Apparently we still don't have proper profiling tools.
[Galaxy S I9000 General] Enspade:
But whether you are using ext2 or ext4 the main point is most of the customers use windows OSs, which does not support ext2 or ext4. Compatibility also should be considered right? Users should be able to plugin and get data.
[Galaxy S I9000 General] appagom:
First at the last comment.. NO. This is for internal data accessed by the applications, not for you to transfer pictures from your phone.

Now sorry to keep pinging this old thread or if the question is dumb (and searches mostly turn up this and the ultimate lag fix thread)

You don't talk here about quadrant and I don't want to start the flames.. but .. what quadrant measures is clearly related to the lag fix and it's certainly weighting I/O heavily. It's mostly been agreed that quadrant is doing fsync writes, right?

The question is... why does the epic get about the same stock quadrant score as the I9000? If it's doing fsync and OneNand is crazy faster than MoviNand, hence the reason everyone says epic doesn't need lag fixes, then why isn't this showing up in the quadrant score in a big way? Arguments about "false" 0 write-time scores on loopback are one thing (and highly misguided IMO) but how do you get a false slow score on a device incapable of being slow? Is the rest of the device just so bad to bring down the score?
[Galaxy S I9000 General] diehard2222:
thanks for explanation ryanz. good work. i personally use voodoo.
[Galaxy S I9000 General] borchgrevink:
Thanks for the update.

Two questions:

1) So you say this is partly hardware issues and cannot be completly solved?

2) The new Nexus S uses iNAND. Does this solve the issue (like it is on the presumably lag free Epic)?
[Galaxy S I9000 General] fulcrum1971:
Ryanza, this is specifically for you. Tried your lag fix and the voodoo. Voodoo is no where close to what u have come out with. But the lag is back. Better than voodoo but worse than stock eclair. On stock Indian froyo with oclf. Any suggestions?
[Galaxy S I9000 General] :
so the verdict: ext4 is not safer than ext2. Both are needed to check bad block in case of abnormal shutdown, and both risk a data corruption. But ext2 fit more in case of smartphone (more perf + longer bat.)

Question:

1) Am I right?

2) Why there were not any smartphone that used ext2 out of the box?

3) How about long term usage? Is ext2 will slowdown the phone bylong usage (defragmentation??) I hear that some lagfix slowdown the phone by long time usage. Why?

Thanks
[Galaxy S I9000 General] Auzy:
Actually, nobody really seems to know.. I haven't personally seen any evidence either has been sufficiently tested.. There are some people on both the EXT2 and EXT4 warpath who post PC benchmarks, or who constantly mention journalling as the reason it's slower, but nobody seems to have proven a damned thing. And Quadrant is probably totally inaccurate for testing because we don't know if it weighs reading/writing at the correct ratio's.

My recommendation would be to try both, and see how they feel like, because there seems to be WAY too many people here treating theories as facts.

Wait until someone tests both filesystems (in depth), writes the procedure they used on both, and allows people to scrutanise their method before believing the evidence. That may have happened already, but I haven't seen it :/
[Galaxy S I9000 General] cba1986:
Until now anybody gave any irrefutabledata about ext2 vs ext4.

I personally use ext4 on Damian RC4. And it's flies.

Until i see any data i will prefer ext4 any day of the week.
[Galaxy S I9000 General] Logseman:
Curiously, Damian himself prefers ext2 :P
[Galaxy S I9000 General] haloimplant:
I was going to ask a similar question to #1 and 2, except related to SGS2.

Obviously we don't know exactly what hardware it's using, but from the description of the root cause of this problem with the SGS, huge slow fsync, it's possible that RFS could still be used with better performance on improved hardware.

Of course the bad news of this being fundamentally a hardware issue is that we're unlikely to see stock SGS performance improve much, with stock firmwares anyways. ie Gingerbread release isn't going to bring magic.

But the reason I ask is that we hear rumours that SGS2 is still using RFS (or was this confirmed on demo units?) and I'm wondering if that isn't the death knell for stock performance (so people can stop going RFS OH NOEZ) because it's possible that this fsync issue has been improved or resolved. Perhaps this is truly better with iNAND as mentioned and the SGS2 will use that?
[Galaxy S I9000 General] Tk-Glitch:
Gingerbread will most likely be the last update for Galaxy S anyway so we'll be "forced" to use a custom rom at some point. RFS is crap on our NAND memory, but EXT4 or EXT2 or YAFFS2 works great, so is it that important ?

I personnaly never really used a stock rom. I rooted the phone and installed a custom rom 1 hour after getting the device. Touchwiz launcher was a pretty painful/slow experience and ugly pokemon colors everywhere is something I can't stand.

Using custom roms since day one (minus one hour) I never experienced any lag problem( and my SGS is the most responsive android device I ever used. It's even smoother on CM7..

Samsung stock rom = won't happen on my device (at least for anything other than flashing a custom rom on a "clean" base).
[Captivate Themes and Apps] mfriedman79:
Anyone replaced the horrible TW Mail app with the stock FroYo one yet? Is it even possible?
[Captivate Themes and Apps] theMaginator:
No but I did replace it with the one from the Galaxy Tab. I prefer that one over the standard Captivate TW email.apk.
[Captivate Themes and Apps] Gunz52:
I have the Captivate with Froyo installed. When I reply to an email, it sends a message, but none of the content is kept and the addressee gets an empty message. The see nothing from me, but do see the original email message. Anyone else see this problem? How do I get the one for the Galaxy Tab to see if it corrects the problem?
[Captivate Themes and Apps] mfriedman79:
Yep same problem. Have to go back to touchdown for now for email because it's a little annoying having to send new emails to any replies just to have text actually show up.

Gonna have to look for the Tab email app and try that.

theMaginator did you find the apk in a thread or pull it out yourself? Can you provide a link to any instructions you used or link the apk yourself for the Tab email app?

Thanks
[Captivate Themes and Apps] TheJunx:
Glad to know I'm not the only one.
[Captivate Themes and Apps] theMaginator:
Yes there is a thread on the development side. Ill post a link shortly.
[Captivate Themes and Apps] jneilliii:
You guys can follow the instructions here to get this working as expected.
[Captivate Themes and Apps] Johnzai:
Reply Work Around

If the directions to patch this are a little intimidating, which they are to me, I tried a simple test and it seems to work.

When you hit the button to reply, there is a "delete" circle and hash next to the original message. Hit that, deleting the original senders text, then type your reply as you normally would. This has worked on every email I have replied to this evening.

This isn't a pretty fix, but it is easy for the time being.

Regards.
[Captivate Themes and Apps] jaseone:
FYI the instructions to replace the Email app linked to above don't explicitly mention that you need to be rooted to be able to do it. It isn't really all that difficult to do though, you just need to download the Android SDK and then the rest is just copy and pasting into the command prompt.
[Captivate Themes and Apps] mfriedman79:
Hmm system didn't show any mail app after I tried that, but after jumping through some of the links provided in the link you gave I was able to find one that appears to work. Will have to see how it goes.

Thanks.

As for the GalaxyTab app, while it is definitely the best looking Android App i have tried so far, it had some issues with exchange support for me, so had to try something else.
[Captivate Themes and Apps] BUS DR1V3R:
Whenever I try this line

cp /sdcard/Email.apk > /system/app/Email.apk

I get this

cp: not found

How do I get around this?
[Captivate Themes and Apps] mfriedman79:
Make sure you have busybox installed. may have to try 'busybox cp' instead of just cp.

Also for me it didn't recognize the > command so I had to remove that, but it also could be why it didn't work for me. The other instructions showed the command as 'cat /sdcard/Email.apk > /system/app/Email.apk' which could also be the difference on why it didn't work.

Sadly I got another stock app working, but it has not GAL search. wondering if its the 2.1 app by mistake.

EDIT: I am mistaken. No button like stock to search GAL, but it does appear to auto search it when entering a name.

Oh well. the search continues.
[Captivate Themes and Apps] changeyez:
replacing with new Email.apk not working

When i try to follow the steps in the link posted, I get this....

C:\android-sdk-windows\tools>adb pull /system/app/Email.odex

remote object '/system/app/Email.odex' does not exist

Any help would be greatly appreciated! Thanks!
[Captivate Themes and Apps] mfriedman79:
Hmm you can always go through shell and verify the file is there.

adb shell

su

cd /system/app

ls | grep Email

That should show both the apk and odex files if they exist.

You can also try backing up via copying from adb as well, or just rename the files as I did for easy restoration.

adb shell

su

cd /system/app

mv Email.apk Email.old

mv Email.odex Email.odex.old

or

adb shell

su

cp /system/app/Email.odex /sdcard/Email.odex

cp /system/app/Email.apk /sdcard/Email.apk

Then just move the new Email.apk to /system/app
[Captivate Themes and Apps] changeyez:
mfriedman79 - perfect. thanks!
[Captivate Themes and Apps] stesyl:
Where is the Stock FroYo Mail App?
[Captivate Themes and Apps] jneilliii:
Sorry about that guys, switched the command from cat to cp but forgot to take out the > sign. This has been fixed in the instructions.
[Captivate Themes and Apps] Sebring5:
There is a simplier way to do all this with root explorer. Delete email.apk and email.odex then move the new email.apk of your choice to system/apps and open to install.
[Captivate Themes and Apps] avgjoegeek:
Where can I find the default mail app for 2.1?
[Touch Pro2, Tilt 2 Accessories] makak8889:
Hi

i was just wondering will a touch pro2 t7373's housing fit tilt2,cz i hv tilt 2 bt i like the silver colour of the touch pro2,so wanted to change bt was just wondering will it fit or nt, cz their r 2 differences in bothe the phones,tilt2 has a ptt button whr as tp2 doenst n tp2 has a front camera whr as tilt2 doesnt

so pls help me out
[HD2 Android Q&A, Help & Troubleshooting and Genera] bunbunbunjo:
I have a stupid question about android scrolling speed,

every time i touch the screen, i can feel that the screen response slower than my finger...

for example i put my finger on an icon and move(finger keep on screen), when i stop i found that the icon is not under my finger, different from wm and iphone...

is that all android like this or i did something wrong?? or else how to fix it?

Sorry for my bad english :o
[HD2 Android Q&A, Help & Troubleshooting and Genera] krat0s123:
the simple and straight answer is, YES.. now, for a little more detailed response.. some phone are having scroll lag issues with some android build/kernel.. so it really depends on what android build/kernel you have..
[HD2 Android Q&A, Help & Troubleshooting and Genera] JanssoN:
Just try Hastarin 4.1. Never had this issue with this kernel. :D
[Vibrant Q&A, Help & Troubleshooting] oka1:
I have Frankin Twiz 3 I found an odd glitch not sure how this happened. I have Launcher pro loaded and in my lower quick tabs I loaded my phone icon and when I go to launch it it comes up as my time widget.....weird anyone else run into anything like this ?
[Epic 4G General] spitefulrain:
I have heard good things about juice defender, but i have a basic question. It says it turns of data during times, or when certain apps are running, etc...

Now, is the data only internet connection? Or will it interfere with my ability to get texts as well, because that would be a deal break for me.
[Epic 4G General] DevinXtreme:
Data is only the internet. The only things that you'll be missing out on are e-mails, which will still come through based on your schedule set up and when you have your screen on.
[Epic 4G General] LordLugard:
Heard so much about this app, tried it and took me only a few hours to remove it. When screen is off, it kills data, so basically apps like K-9 Mail that push my IMAP-idle email accounts and poll other accounts are basically impotent.

Plus the interface is confusing with a myriad of settings and no real hold on what settings stick or what not to set. I understand the concept of the app but it's not for me. With stock rom and mediahub-DRM-whatever-process killed off manually, i get by a work day with 50% left over on the train/bus-ride home, more than enough to do stuff before i get home.
[Epic 4G General] guruleenyc:
I dave been using juicedefender for 3 weeks and it has maximized my batt an overall of 1.4x. The interface is confusing for those that don't spend time and learn it....its granular.
[Epic 4G General] ravizzle:
U can set it to fcetch data on certain time intervals and u can get emails like that

Sent from my Epic 4G
[Epic 4G General] shinma6980:
I'm totally happy with it - I'm getting a rating of around 1.7x to 1.9x I know I can easily go a full day on one charge. The default setting of enabling data every 15 minutes is enough for me - I don't expect to get emails that are time sensitive to the point where a maximum of 15 minute delay would be detrimental. And I play with my phone a lot so I'm usually waking it up to respond to texts and it reenables data then anyway.

edit: I'm not using any battery tweaks or DRM disabling stuff. I'm stock except for rooting.