Boost Speed and Space Significantly in Android With SquashFS and AUFS or Ubifs!

231 views
Skip to first unread message

defcon

unread,
Jun 9, 2009, 8:23:22 AM6/9/09
to android-platform
I think it would be a good idea to compress /system/bin and /system/
lib at least with squashfs, I have done this on a couple ubuntu and
gentoo systems and it actually increased performance and space
significantly!

Reasons (short version): decompressing data is faster than reading it
from the hard drive, in most current computers, especially when you
have multiple programs reading from the disk, causing thrashing, and/
or when the data on the disk is fragmented. You can read more details
about what was done and the results on http://forums.gentoo.org/viewtopic-p-4732709.html#4732709

Squashfs is intended for general read-only file system use and in
constrained block device/memory system, it can also be combined with a
union mount system like unionfs and aufs for read/write access.

We will be able to improve android boot time, app launch time, and
increase space, what more could we ask for? Maybe a little bit more
ram? Whats up with compcache too?

So now we just need to compile squashfs-tools for android and
experiment, im pretty damn excited to try this!

Also ubifs has lzo compression, not sure how that would work either,
it seems ubifs is favored over jffs2 and yaffs2

Well right now it looks squashfs+lzma wont be in the kernel until
2.6.30 found this via:
http://www.squashfs-lzma.org/

So I think we are left with UbiFS with lza compression but I have no
idea on how to add it to the kernel, and test this out, im really
interested in seeing some results and doing some benchmarks, if
someone more knowledgeable than me can help out that would be awesome

defcon

found a nice pdf comparing the filesystems:
http://free-electrons.com/doc/flash-filesystems.pdf
Benchmarks Of Yaffs2, JFFS2, SquashFS, & UBIFS:
http://free-electrons.com/pub/conferences/2008/elce/flash-filesystems.pdf
Seems like people are already using ubifs on android:
http://groups.google.com/group/android-porting/browse_thread/thread/a67cbe36603d429a/646a017892783e2b?#646a017892783e2b

Reference:
http://forums.gentoo.org/viewtopic-p-4732709.html#4732709
http://jt0.org/news/squashing_usr_and_the_2629_kernel

mike quinn

unread,
Jun 9, 2009, 10:16:12 AM6/9/09
to android-...@googlegroups.com
Does it make a difference that Android on phones is not being read from a hard disk?

Andreas Kostyrka

unread,
Jun 9, 2009, 2:01:35 PM6/9/09
to android-...@googlegroups.com
And has a rather a CPU that has a totally different performance profile
compared to typical PC CPUs?

Jeffrey Carlyle

unread,
Jun 10, 2009, 12:51:58 PM6/10/09
to android-...@googlegroups.com
On Tue, Jun 9, 2009 at 7:23 AM, defcon<defc...@gmail.com> wrote:
> I think it would be a good idea to compress /system/bin and /system/
> lib at least with squashfs, I have done this on a couple ubuntu and
> gentoo systems and it actually increased performance and space
> significantly!
>
> [...]

Have you checked to see how much you can compress the Android
binaries? Most of them are compiled using the thumb instruction set
which should be a lot denser (and presumably less compressible) than
the 32-bit ARM instruction set.

--
// Jeffrey Carlyle - http://www.jeffc.org/

Disconnect

unread,
Jun 11, 2009, 8:41:24 AM6/11/09
to android-...@googlegroups.com
Converting /system/framework to cramfs saved almost 30%. I suspect
squashfs would be similar. (Note that according to the google devs,
the 'secret carrier requirements' include in-place changes/patches, so
nothing that can't be changed file-by-file on the device will ever be
accepted. Sucks. More likely they'll start dropping apps/features from
the g1 build to make it fit - eg offer something like latitude or even
maps through market instead of in each build so that it takes up your
space instead of 'theirs' on /system/)
Reply all
Reply to author
Forward
0 new messages