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.
“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:
add this inside the textfile
#for the google chrome cache
/bin/ln -s /media/ramdisk/google-chrome ~/.cache/google-chrome
#for the chromium cache
/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
comment: moving chrome browser cache to ramdisk
Roger is open to alternative tips, tweaks or updates on his method so if you’ve got a better way use the comment form below to share.