Topic: /usr compressed with squashfs

Hello crunchtweakers

Do somebody want to try a tweak found on ubuntu forum?
http://forum.ubuntu-fr.org/viewtopic.ph … 00&p=4

It seems that read a compressed squash file  is faster than read the same file on HDD, so the tweak proposed is to mount /USR compressed and make it readable.
Caution, the /USR is then only readable, to make it RW another tweak is required, on the same forum they also describe operation.
I ll try to translate the procedure in english

First 

copy your current /usr on another place (in case there is a pb...)

install squashfs-tools

Then

sudo -s
cd /usr
mksquashfs . /usr.sq -info

This operation can take time, be patient

Your usr.sq is ready, remove your current /usr and then modify fstab  to create mounting point for usr.sq in new /usr empty

    sudo -s
    cd /
    sudo mkdir /usr

remove your current /usr and then modify fstab
add following lines:

/usr.sq  /usr  squashfs   loop,ro,nodev   0 0
It seems that network manager can have problems, only solution seems to use wicd.....

According to author, you can notice a gain of speed concerning applications opening etc...
But be careful to decompress usr.sq before any upgrade!

a more hardcore solution is to put the usr.sq in ram (if your ram is bigger than the file... and then everything flies!!!)

Do anybody want to try?

Last edited by Jdemnahouby (2010-07-06 12:11:36)