Speedup Chrome by Using TMPFS

1. Create folders for your tmpfs in /media/ or wherever you need it. Edit your fstab and add something link this.

tmpfs /media/chrome tmpfs defaults,noatime,mode=1777 0 0

tmpfs /media/chromium tmpfs defaults,noatime,mode=1777 0 0

tmpfs /media/mozilla tmpfs defaults,noatime,mode=1777 0 0

2. Create a symlink for the folders in /media to your ~/.cache/google-chrome folder.

3. Create a startup and shutdown script to backup cache contents on shutdown and restore it during bootup.

STARTUP SCRIPT

hbalagtas@hbalagtas-desktop:/etc/rc6.d$ cat /etc/rc.local

/usr/bin/rsync -avrP --delete /home/herbert/.cache/google-chrome/Cache.old/ /media/chrome/

/usr/bin/rsync -avrP --delete /home/herbert/.cache/chromium/Cache.old/ /media/chromium/

/usr/bin/rsync -avrP --delete /home/herbert/.mozilla.old/ /media/mozilla/

exit 0

SHUTDOWN SCRIPT

hbalagtas@hbalagtas-desktop:~$ cd /etc/rc6.d/

hbalagtas@hbalagtas-desktop:/etc/rc6.d$ cat K01cache

#!/bin/bash

/usr/bin/rsync -avrP --delete /media/chrome/ /home/herbert/.cache/google-chrome/Cache.old/

/usr/bin/rsync -avrP --delete /media/chromium/ /home/herbert/.cache/chromium/Cache.old/

/usr/bin/rsync -avrP --delete /media/mozilla/ /home/herbert/.mozilla.old/

Comments

Popular Posts