Move Google Chrome Cache to a ram disk and speed up page loading

1,543 views
Skip to first unread message

Che Hyderabadi

unread,
Nov 7, 2010, 8:53:15 AM11/7/10
to Ubuntu-User-Community
Move Google Chrome Cache to a ram disk and speed up page loading
----------------------------------------------------------------------------------------------------------
Got ample RAM installed? Want to speed up web page loading in Google
Chrome? By moving your web cache to a RAM disk you can do just that.

photo © 2008 William Hook | more info(via: Wylio)

"It is possible to store a web cache on a RAM disk and this can
improve the speed of loading pages. Due to the volatility of RAM
disks, using a RAM disk has privacy advantages." ~ Wikipedia

Roger Navelsaker sent us over the following tutorial for moving Google
Chrome’s cache to a RAM disk. This not only speeds up page loading
but, as he notes being an SSD user, helps saves on write cycles too.

Move Google Chrome Cache to RAM Disc
"As we all know, Google Chrome and Chromium does not give use a option
on where to put the cache on disk. But clever use of bash script and
symbolic links does the trick." he began before outlining the steps
needed to achieve the desired effect.

Open a fresh Terminal window and enter the following: -

sudo gedit /etc/fstab

Add the following line to the bottom of the text file that opens but
BE CAREFUL – do not touch, edit or enter ANYTHING else:

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

Once entered save and exit.

Head back to the terminal window, this time enter the following: -

sudo mkdir /media/ramdisk

Now lets create the script that will do the ‘magic’ for us.

Still in the Terminal enter:

gedit ~/.chromecache

add this inside the textfile

#!/bin/sh
#for the google chrome cache
/bin/rm ~/.cache/google-chrome
/bin/mkdir /media/ramdisk/google-chrome
/bin/ln -s /media/ramdisk/google-chrome ~/.cache/google-chrome
#for the chromium cache
/bin/rm ~/.cache/chromium
/bin/mkdir /media/ramdisk/chromium
/bin/ln -s /media/ramdisk/chromium ~/.cache/chromium

Save and exit.

Make the script executable by issuing:

sudo chmod +x ~/.chromecache

Now go to ‘System > Preferences > Start-up Applications’ and add a mew
entry using the following field data: -

Name: Chrome Cache
command: ~/.chromecache
comment: moving chrome browser cache to ramdisk

Source: http://www.omgubuntu.co.uk/2010/11/move-google-chrome-cache-to-ramdisk/
Reply all
Reply to author
Forward
0 new messages