How To Speed Up Firefox By Moving Cache Into Ram On Ubuntu

By default Firefox puts its cache in your home partition. You can speed up Firefox and reduce disk writes by moving this cache into RAM if you have 1GB RAM or more.


To do this you need to edit your fstab and sysctl.conf files. You also need to create a new string in your Firefox settings.


To open your fstab file open a terminal window (press Ctrl+Alt+T) and copy+paste the following line:

sudo gedit /etc/fstab

When the fstab file is open copy+paste the following lines into the fstab file:

tmpfs /tmp tmpfs noexec,defaults,noatime 0 0
tmpfs /var/tmp tmpfs noexec,defaults,noatime 0 0

When done you can save and close the fstab file.

To edit your sysctl.conf file copy+paste the following line in your terminal window:

sudo gedit /etc/sysctl.conf

Now copy+paste the following line:

vm.swappiness=10

When the line is added you can save and close the sysctl.conf file.

Start Firefox and type about:config in the Firefox address bar and click on the button that says: I’ll be careful,I promise!. Right click on blank area and create (just copy+paste the line below) a new string value called:

browser.cache.disk.parent_directory

Click on the OK button and copy+paste the following line into the empty string value field:

/tmp

Click on the OK button to add the new string value. When done close Firefox, reboot your system and experience the performance.

One Response to How To Speed Up Firefox By Moving Cache Into Ram On Ubuntu

Leave a Reply

Your email address will not be published. Required fields are marked *

one × four =

Recently Viewed
Who's Online
3 visitors online now
3 guests, 0 members