Products > Computers

How to Stop Firefox from Devouring Your SSD (literal GB of daily writes to disk)

(1/3) > >>

So apparently excessive disk writes (on the order of multi-gigabytes per day) has been an issue with FF for a very long time.

I only became aware of this issue while optimizing my new Linux workstation where the Gnome System Monitor helpfully shows total disk writes per process. I was shocked at how much activity FF exhibited (>500 MiB disk writes) for only 15min of active use (loading a scant few web pages while configuring my setup).

Confused, but not necessarily alarmed, I attempted a search to see if I was just being paranoid (or whatever the computer equivalent of a hypochondriac is). Turns out that other people have noticed this behavior and have tried to curtail the write activity by editing setting in FF's about:config page:

--- Code: ---browser.sessionstore.interval - 1800000
browser.cache.disk.enable - false
browser.cache.disk_cache_ssl - false
and so on...

--- End code ---

I had no luck with lessening FF's excessive write behavior using any of these options in about:config. On the other hand, these settings did help with Tor Browser, which is based on FF and has similar issues with massive disk writes for what amounts to ephemeral throw away browser sessions.

Que dramatic music: Arch Wiki and Profile-sync-daemon enter the chat.

Turns out the bulk of the disk activity is in the FF profile directory. This directory isn't very large, maybe 100 to 300 MiB, but the massive amount of activity it sees is surprising. Turns out moving this directory to a RAM disk solves the disk write issue and also speeds up FF. A real win-win. Do note that there is the possibility of losing session data (i.e. opened, unsynced tabs) in the event of a crash, power outage, or other disruption. So, like with all "fixes", there are caveats to consider.

So PSD neatly covers FF (and other browsers) for Linux. But what about Windows?

Well, I'm glad you asked, because I believe I have a pretty neat turn-key solution to this problem. And its very low effort too. But first, let's figure out how to profile this on Windows. Unfortunately, Windows Task Manager does not show total disk writes per process; however, Sysinternals Process Explorer does. Nice. That's step one. Next we need to see where writes are being made. Well, Windows Resource Monitor or Sysinternals Process Monitor can do this for us. I chose the later. Let Process Monitor run for a little bit then go to "Tools" -> "File Summary". This will show a list of all file activity since it has been running (so you may want to open and close Process Monitor periodically to speed things up). This lets us know what FF is doing and where its doing it. Finally we need CrystalDiskInfo. This utility lets us see the SSD's TBW metric in gigabytes, and is how we will prove that moving the profile directory into RAM actually does anything useful.

As shown above, I logged over 10 gigs of pointless writes to disk in less than 6 hours on my Win10 laptop! The laptop was docked and set to not go to sleep, since it was plugged into AC power. Firefox was ironically idle during much of this time. According to Windows Resource Monitor, some websites cause FF to exhibit persistent megabytes/second disk activity with zero user input. Wild.

This attachment shows FF profile activity on a RAM disk I made with drive label P. Clever, I know.

Okay, you've sold me! So how can I fix this on Windows? Well, it's pretty easy:

1) Download and install ImDisk Toolkit (

2) Close FF. Go to C:\Users\YOURUSERNAME\AppData\Roaming\Mozilla\Firefox and edit the two .ini files:

    add P:\ after Default=
    (so we should see "Default=P:\SOMEVALUE.default-SOMEVALUE")
    set IsRelative=0
    add P:\ after Default= and Path= (like we did for installs.ini)

  Note: YOURUSERNAME is your account user name.

3) Setup a persistent 500MiB* RAM disk that copies your FF profile into memory and then saves it back to disk upon system shutdown or reboot. Yeah, this is the meat and potatoes bit. (*the disk takes up only as much space as need, so <500MiB in practice)

  Open Start, find the ImDisk subfolder and open RAM DiskConfiguration and input the settings in attachment 3.

  Note that the FF profile directory is located at:


  ImDisk will copy the contents of this directory to the new RAM drive P and sync files at boot/shutdown. Easy, peasy.

  Now open up FF. It will complain and ask you to setup your profile (since we edited the .ini files).
  Select Create Profile. Direct FF to the P drive and select your profile folder. FF should open up with all your saved tabs.
  If you made a mistake selecting the correct profile or directory: close FF, edit the .ini files again as per step 2) and reopen FF.

Note: To check that the profile on the P drive is being used, open up Process Monitor and look for FF activity on the P drive. (To simplify profiling, we can create a filter in Process Monitor to only show FF activity. Click Filter on the top bar then Filter on the drop down selection. Now change Architecture to Process Name and type firefox.exe in the blank box. The filter should show "[Process Name] [is] [firefox.exe] then [include]". Click OK to apply the filter.)

4) Set the new RAM drive to hidden. Go back to Start, ImDisk subfolder, open General Settings and check the box for P. Done.

So there you have it: PSD on Windows is basically ImDisk and a few file edits and redirecting FF to the new directory location. Neat.

in windows i use firemin who kills the excessive memory "leak"   i can use lots of opened windows ...

And yes FF or variants suffers the same ....  :--

AND  sadly i need some specific  added pluggins only available  in FF Waterfox  etc ...

This is not normal. Backup your profile folder and do a fresh install of Firefox and see what happens. I'd wager it's some kind of plugins issue.

This also shows the method for FF Section 9 and onwards
and shows the limited options available to approach doing the same for Chrome.

Note, it also makes sense to do the FF and Chrome changes on a HDD based computer, and it makes the browsers much faster to load when started.

Even the cheapest of consumer SSDs is rated for .3 DWPD, i.e. you can write 300GB on a 1TB client SSD every day and be fine for 5 years. Don't worry about it.


[0] Message Index

[#] Next page

There was an error while thanking
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod