Speed up Firefox by moving cache into RAM in Ubuntu

This post was written by admin on December 9, 2009
Posted Under: Mozilla Firefox

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.

1.Edit /etc/fstab,open terminal from Applications->Accessories menu and type:

sudo gedit /etc/fstab

Add following into this file and close it.

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

2.Edit /etc/sysctl.conf:

sudo gedit /etc/sysctl.conf

add this line and save it:

vm.swappiness=1

3.
Type about:config in firefox address bar and click I'll be careful,I promise!.Right click on blank area and create a new string value called browser.cache.disk.parent_directory,set its value to /tmp

Now,reboot your system and experience the performance.
Original text:HOWTO : Ubuntu 9.04 Desktop on Solid State Disk (SSD)

Related posts:

  1. Speed up web browsing in Firefox/Opera using Local DNS
  2. Create an ISO image from Live-CD in Ubuntu Linux
  3. Ubuntu Tip:Speed up Firefox by compacting SQLite databases
  4. Clean up cache,useless file/kernel to free disk space by Ubuntu-Tweak
  5. How to Cleanup cache,useless packages in Ubuntu

    Tags:

    Reader Comments

    Hi
    I’ve implemented this with Ubuntu 9.10.
    I can see that there’s now a Firefox cache in the tmp folder.
    And I can see how the tmp file is mounted as tmpfs during bootup.
    I wonder why more people aren’t using this method?
    Maybe in future one of the options in Firefox’s preferences might offer a RAM cache option.
    It’s possible to use this method with a RAM-disk in Windows. There’s a youtube video here explaining it.
    Here:-
    http://www.youtube.com/watch?v=6W1cHoU4R-E&feature=PlayList&p=FC21F7E2707A0845&index=0&playnext=1

    [Reply]

    #1 
    Written By Ron on January 2nd, 2010 @ 11:14 am

    Do your session restores still work after implementing this?

    [Reply]

    #2 
    Written By John Peterson on March 26th, 2010 @ 11:13 am

    Trackbacks

    Add a Comment

    required, use real name
    required, will not be published
    optional, your blog address