Speed up Firefox by mounting the profile in tmpfs (RAM) [Linux only]

tmpfs is a virtual, RAM-backed filesystem. It’s lightning-fast, but since it’s RAM-backed, any file written to tmpfs uses precious memory while it’s there, and the entire contents of the virtual partition are lost on shutdown or crash. The good news is that these detriments can be minimized, making tmpfs a viable choice for your profile directory. This document gives some tips on how to mount your Firefox profile in a tmpfs partition while minimizing the downsides of tmpfs.

Step 1. Reduce the size of your profile directory.

 

tmpfs is RAM-backed, so we want to conserve memory by trimming the fat from the profile. I recommend making the following config changes (enter ‘about:config’ in the Firefox address bar):