Mounting Chrome cache in memory

2013/01/03 by Paulo Pereira

~/categories/Linux #Linux #Ubuntu #Chrome

As seen in my Ubuntu 12.04 installation post, I use a script to keep the Chrome cache in RAM.

I found this tip somewhere (don’t recall where) and have been using it for some time now.

Mounting Chrome cache in memory will give you the speed of RAM vs. the speed of an hard drive.

Do you have any more tips like this?

Script

vi ~/bin/chrome_tmp_cache.sh
#!/bin/bash
if test -d /tmp/chrome; then
  exit 0
else
  rm -r ~/.cache/google-chrome
  mkdir /tmp/chrome
  ln -s /tmp/chrome ~/.cache/google-chrome
fi
chmod +x bin/chrome_tmp_cache.sh
Name: Chrome Cache
Command: /home/<user>/bin/chrome_tmp_cache.sh
Comment: Move Chrome cache to /tmp

Play Store

Mounting /tmp in RAM

For this script to work, /tmp must be mounted in memory. Just add the following to your /etc/fstab file:

gksu gedit /etc/fstab
tmpfs /tmp tmpfs nodev,nosuid,noatime,mode=1777 0 0