Majority of our computers boot from Solid-State-Drives (SSD). This is great for performance, but SSDs have drawbacks due to the inherit way that they work. The main problem with a SSD is their limited number of writes. To help extend the life of the drive we should not write excessively to it. Unfortunately this week, it was discovered that Firefox and Chrome are actually writing excessively to disk, even when you aren’t at your computer. It’s shortening the life your drive.
I heard this story on my favorite podcast, Security Now (episode 580), and wanted briefly share with you so you know how to help save your SSD. I’m not going to go into the details of how a magnetic hard drive works in comparison to a SSD, but instead just focus on the fact that your web browser is adding unnecessary wear and tear.
The Browser Problem
When we use our web browser we typically have a few browser windows open with multiple tabs open in each. If our browser was to crash and we had tens if not hundreds of web pages open, we would be annoyed if we had to open the browser again and try to remember what pages we were on.
Firefox (and Chrome) have a Session Restore feature. The browser constantly saves the current browser state, such as how many browser windows are open, number of tabs, what URLs you are on, and the contents of each of those pages. When the browser crashes, it simply reloads all the content from the session store file as if nothing had happened.
The problem is that Firefox is saving the state every 15 seconds, but unfortunately it’s not saving it in an efficient manner. It seems to be just saving everything each time, whether it has changed or not, and it’s saving the actual contents of the page. If you have a large page with a lot of images, etc, it’s writing all of that over and over again to disk. It’s even saving this information when the computer is idle.
The person who discovered this left Firefox open with a few browser windows and tabs open and found Firefox writing about 10GB of data each day. (Chrome is writing more up to 20GB a day). That is an excessive amount of writes to your SSD.
To be fair, when this feature was implemented into Firefox, most people were on traditional magnetic disk drives so I’m sure the programmers were not really thinking writing everything to disk would be a issue. However, now that most people are using SSD this clearly is a problem.
Change your Firefox settings
The good news is on Firefox you can change this setting, so let’s just change it for now and hope that Firefox will fix this problem.
Borrowing a little from a previous post How to stop videos from autoplaying in Firefox, we can change our Firefox settings using about:config.
about:config is Firefox’s configuration page that is accessed by typing “about:config” and hitting return in a Firefox browser window.
Firefox will give this warning because there are so many settings here that if you don’t know what you’re doing and you start changing things it could break Firefox. However, we’re only going to change one setting here so it’s okay. Click “I’ll be careful, I promise!”.
You will see a list of configuration options. If you are interested, take a look at the options you can customize within Firefox.
We are interested in the sessionstore.interval options, so click in the search bar and type “sessionstore.interval” and you’ll see a the setting set to “15000” milliseconds (15 seconds).
We need to change this value to change the duration of the saves. For me personally, I tend to save my URLs a lot and not too concerned about saving browser state as I’d rather save my SSD. I added two more 0’s to “1500000” which is 25 minutes. Now this may be a long time for some so pick a number that you feel comfortable with. Remember you can always change this number again in the future if you wish.
Once you’ve chosen your number and saved, you can close the window and you are done.
Firefox is still a great browser
Despite the issue, this is a great reason to use Firefox as your primary browser because you actually have control over Firefox and can change this setting. Other browsers like Chrome are writing even more data and as far as I’m aware you can not change this value.
After making these changes, Firefox will save the browser session state less often and it will do less wear and tear on your SSD helping to prolong it’s life.
3 Replies to “Change Firefox session store interval to save your SSD”
I made this mod when Steve Gibson mentioned it. Firefox has now implemented a setting for browser.sessionstore.interval.idle with default of 3600000 (1 hr). I don’t know the details of how it shifts between the two, but I may decrease my non-idle time now. Cheers!
Thank you for this solution! My disk usage monitor was going crazy at 100% before, but not now!
Thanks again for the solution!
This may be a bigger issue for older computers with HDD. My HDD started going to 100% capacity when using Firefox and locking up my 10 year old laptop. Changing the session store interval from 15 seconds to 10 minutes seems to have solved the problem. I don’t care if I have to start over after a browser crash.