Lately I've had occasion to start learning Linux in greater detail. One thing I stumbled on was a recommendation to use the noatime option in /etc/fstab for most mounts; by not writing the last access time to each file you can reduce wear on SSDs and get a bit of performance boost. I notice on my G1 (running Cyanogen 6) that most mounts show relatime. What do you guys think of using noatime instead? Have you ever tried it? There's no /etc/fstab in my Android so I don't know where I'd go to set up something similar.
You can install a free busybox and use the remount option with mount. I often use noatime and nodiratime, for example mount -o remount,noatime,nodiratime /system. It's also safe and faster on /data. It can also be useful on the other partitions.
Related
I don't know much about yaffs2 so if this is a dumb question, just tell me so. I was just wondering why we use ext2 instead of yaffs2 for apps to sd? Don't know much about yaffs2 at all, but know a little bit about ext2 and as a filesystem it is very much optimized for hardware that have problem with seek times because every things on disk is layed out to avoid long seeks like grouping inodes and dirs close together, and dir blocks close to the dirs. Also the page cache of ext2 is probably not useful ether. All that probably isn't applicable and may even be a hinderance to G1 sdcards anyways. Was just curious. thanks.
knaries2000 said:
I don't know much about yaffs2 so if this is a dumb question, just tell me so. I was just wondering why we use ext2 instead of yaffs2 for apps to sd? Don't know much about yaffs2 at all, but know a little bit about ext2 and as a filesystem it is very much optimized for hardware that have problem with seek times because every things on disk is layed out to avoid long seeks like grouping inodes and dirs close together, and dir blocks close to the dirs. Also the page cache of ext2 is probably not useful ether. All that probably isn't applicable and may even be a hinderance to G1 sdcards anyways. Was just curious. thanks.
Click to expand...
Click to collapse
isn't the page cache stuff only on EXT3? pretty sure there's a big difference .. but as for yaffs2 .. when someone figures out how to put yaffs blocks onto an SD we will all rejoice with tears of joy .. well .. maybe not
ext3 has the journal over ext2, but page cache should be on both... maybe yaffs2 using page caching too, so maybe that point doesn't matter, but the on disk layout and almost all optimization in ext2 is based on hard disk drives.
Yaffs2 Information
It is a journal type FS as well.
What is yaffs?
Yaffs stands for Yet Another Flash Filing System.
It is a journaling filesystem designed to run on NAND flash with special reference to embedded systems.
Click to expand...
Click to collapse
http://www.yaffs.net/howto-incorporate-yaffs
http://www.yaffs.net/yaffs-2-specification-and-development-notes
Maybe this can help someone get started on moving the sdcard over to yaffs2?
jusplainmike said:
Maybe this can help someone get started on moving the sdcard over to yaffs2?
Click to expand...
Click to collapse
And hopefully do it in a way that doesn't break my app... please? j/k
Is there a cogent reason why the SD card cannot be partitioned without a FAT32 filesystem? From all the benchmarks I've ever seen, EXT4 kills FAT32. However, when I tried using an SD card partitioned with only an EXT4 partition, vold (the volume management daemon) wasn't happy at all.
I can manually mount the volume from the shell, but that does no good as far as android recognizing that the partition has been mounted.
I'd be willing to hack up the vold source code if it would be useful, but I just want to know if anyone has any thoughts or experience on the issue.
This question has been asked in the past, but no one has every replied to it. Is there no one with experience in this area?
Thanks
bump........
That's just what is most common and what it looks for. You could try and look at the apps2ext scripts for mounting etc.
What real performance gain could you see by using just ext4 in this scenario, my guess it nothing.
There's possibly no speed difference, though benchmarks with flash do show ext4 to be faster. The bigger point though is why have both an ext and fat partition, when you can have only one?
Also, I don't see why this should be an issue. 'mount' can auto-discover the filesystem type of a partition, so the only reason this shouldn't already "just work" is because vold is forcing it to be FAT. I find this ironic given that the main system partitions are actually YAFFS2.
Will adding an Ext4 partition to our SD cards help with performance, and if so, do you think the benefit would be noticeable? What size partition would you recommend?
what for ? cache ?
or more room for apps ?
in any case, i doubt performance would change, at least not for the better.
Ive already got a kernel running full ext4 and its not that much faster, if at all. Partitioning your external will not increase performance at all, since your rarely reading/writing to it. Maybe a little if all your apps are on it, but even then I doubt it. I have /system/data/and /cache as ext4, and its a little faster than ext3 with a journal, but by default HTC doesn't use a journal for ext3, they use data=ordered. You can see all your filesystem options by typing in terminal emulater
su
mount
Ext2 has shown the best performance so far that I've seen while being perfectly stable.
I wonder what is better link to sd card (for example link2sd) or the native move-to-sd-card function and a custom-made script to link the dalvik-cache? I have tried both and it seems to me link2sd is saving huge space but also it makes the os slower. I suspect the links because with the native move-to-sd-card (asec tmpfs cryptloop) the thing is faster? Can someone confirm this?
Phpdna said:
I wonder what is better link to sd card (for example link2sd) or the native move-to-sd-card function and a custom-made script to link the dalvik-cache? I have tried both and it seems to me link2sd is saving huge space but also it makes the os slower. I suspect the links because with the native move-to-sd-card (asec tmpfs cryptloop) the thing is faster? Can someone confirm this?
Click to expand...
Click to collapse
I would stick with android's default move2sd option for speed.
I personally like Mounts2sd which moves a whole partition to you sd (and allows ext4 without journal and setting readahead amount)
(requires busybox and maybe sqlite3 , It also requires that your kernel supports the ext4 filesystem.)
If you can pull it off, then go with mounts2sd.
How does it work? Does it swap the partitions? I have bad luck with move2sd. I wonder how this asec tmpfs cryptoloop can work.
Hi everyone.
As you know, TRIM support in Android was introduced in version 4.3. But it was there already in the kernel. What Android developers did is just included the fstrim utility and made it run periodically in background.
I was a hard time thinking why my phone is so slow. Then I narrowed the problem down to internal storage slowness. It was causing the whole OS to crawl when writing something to /data partition. Android is a complex system, so it always writes something to /data even if you think it should not. This was causing lags and freezes, sometimes up to 10 seconds of unresponsiveness.
So I started reading about LagFix, Samsung's and Nexus's issues in the past. But those issues were of different nature. If you're using 4.4 ROM, you already have all the needed support in the kernel and in the OS.
My problem was that the /data partition had ext4 block size set to 4096. Everything else like /preinstall and /system had block size of 1024.
I manually ran fstrim -v on these partitions and it successfully trimmed big amounts of bytes. On /data partition it trimmed 0 always. So I started searching and found out that only the block size is different between /system and /data.
I had backed up /data, reformatted it to to 1024 block size, restored and checked fstrim again. Now it successfully trimmed A LOT of bytes. It started working. After several minutes the phone ran much quicker - it was flying actually, no lags at all
So check your /data block size by running 'df' command in terminal. If it is NOT 1024, then you might be affected by fstrim doing nothing! I am not going to tell how important the trimming is for SSDs and EMMCs.
You can also check by running this under root:
fstrim -v /data
If it tells it trimmed 0 bytes, the TRIM is not working either.
I try this on my very old Atrix 2, my /system already 1024 except /data and /cache
When I ran the command, it said that "fstrim operation not supported on transport endpoint" (Mokee 4.4.4 on system 2)
Then I wiped all and installed a fresh Mokee 4.4.4 on system 1, now I can trim my /data but it's still show 2048 when I execute df command and /cache is still not supported
Hello all,
I look after a fleet of about 70 of these phones....Mostly on JB. Over the last 2-3 weeks most seem to be slowing down considerably. I struggle to see why/if this trim issue would affect a lot of phones in such a narrow window of time after over 4 years, but will look into this more.
John
'fstrim -v /data' should tell how much has it trimmed - if it tells 0 bytes - then TRIM is not working by some reason.