Speed up Firefox by moving cache into RAM in Ubuntu
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:
- Speed up web browsing in Firefox/Opera using Local DNS
- Create an ISO image from Live-CD in Ubuntu Linux
- Ubuntu Tip:Speed up Firefox by compacting SQLite databases
- Clean up cache,useless file/kernel to free disk space by Ubuntu-Tweak
- How to Cleanup cache,useless packages in Ubuntu

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]
Do your session restores still work after implementing this?
[Reply]