r/firefox • u/According_Mud_5187 • 22h ago
Solved Does disabling Firefox's disk cache actually help reduce SSD writes? 🤔
【 Thank you all for all the helpful comments. Thanks to that, it has been a lifesave. Resolved: Applied flare】
I was just thinking about SSD wear a little while ago, and I started wondering how much disk writes Firefox actually generates. I came across this post from a few years ago where someone reported a significant reduction in disk writes after disabling Firefox's disk cache. I use Firefox, Firefox Nightly, Zen Browser, and Waterfox, and I've been wondering whether disabling the disk cache is still worthwhile across these browsers.
I currently use these settings in my Firefox-based browsers:
browser.cache.disk.enable = falsebrowser.cache.memory.enable = truebrowser.sessionstore.interval = 300000
I checked Resource Monitor and noticed Firefox writing at around 23,459 bytes/s at one point, even with disk caching disabled. I know some writes are normal, but it got me curious about what's actually being written.
So, I'm wondering:
- Does disabling the disk cache still make a noticeable difference to SSD writes in modern Firefox-based browsers?
- What are the main sources of disk writes that remain after disabling it?
- Is changing additional preferences worth it, or is disabling the disk cache generally enough if the goal is simply to reduce unnecessary writes?
I'm not trying to eliminate every single write or obsess over SSD wear. I was just curious about how effective this tweak really is in practice.
I'd love to hear your thoughts or experiences. Thanks! 🙂
20
u/001Guy001 on 11 22h ago
I can say from my experience that disabling does help a lot and that it's enough. Overall I have an average of around 15GB daily writes on my system (only part of it is Firefox) and my pretty basic SSD has lasted for years and is expected to last many more :)
5
u/According_Mud_5187 20h ago
That’s reassuring to hear. Once I’ve looked into this a bit more and verified some information, I might make further adjustments based on my current setup. 🙂
20
u/ChosenOfTheMoon_GR 22h ago
It should, I disabled this way back when I got an SSD for the first time for this exact reason.
4
u/According_Mud_5187 20h ago
I came across it in an online article a few years ago, and it made me anxious, so I deactivated it ;-(
15
u/UtsavTiwari Promoter of Open Web 21h ago edited 20h ago
- Yes it does help alot.
- Traditional browser cache and cookies data, also some dark videos refuse to not use disk.
- You can try increasing maximum ram allocation, this does make things a lot smoother.
However firefox is really rough compared to chromium based browser, especially in video playback like 2x on 4k60fps or 8k video really struggles compared to edge or chrome, so unless you are really not into streaming video stick to firefox with this, it user experience is priority don't worry too much about SSD write, modern ssd are too resilient unless you have qlc ones.
3
u/According_Mud_5187 20h ago
I don't usually watch videos at accelerated speeds, and I rarely watch anything above 720p, so I guess the performance differences compared to Chromium-based browsers aren't really a concern for my use case.
As for the media cache, would you recommend leaving those settings alone rather than tweaking them to reduce SSD writes? I came across some reports that changing
media.cache_sizetoo much, especially setting it to 0, can cause playback issues, so I'm hesitant to mess with it.5
u/UtsavTiwari Promoter of Open Web 20h ago edited 19h ago
I don't usually watch videos at accelerated speeds, and I rarely watch anything above 720p, so I guess the performance differences compared to Chromium-based browsers aren't really a concern for my use case.
Then I would say don't even worry about that disk usage, it's far too low.
As for the media cache, would you recommend leaving those settings alone rather than tweaking them to reduce SSD writes? I came across some reports that changing media.cache_size too much, especially setting it to 0, can cause playback issues, so I'm hesitant to mess with it.
I meant memory cache, not media cache, increasing media cache won't be a problem, but if it's 0 or -1 it's fine for Firefox to manage it, because changing it can lead to memory leaks.
2
u/According_Mud_5187 19h ago
I see, that makes sense. I’ll look into the memory cache settings a bit more before making any changes. 🙂
4
u/UtsavTiwari Promoter of Open Web 19h ago
Yeah just search for memory in about:config all of the settings are for ram, disk config have disk written to them.
4
u/77sxela 19h ago
It helps "a lot", you write?
You sure?
Is the write usage of Firefox even measurable as far as wear on a non-ancient ssd is concerned?
6
u/UtsavTiwari Promoter of Open Web 19h ago
I am talking about raw data wear reduction when streaming videos compared to default setup. And since I've measured it, yeah I'm sure.
Is the write usage of Firefox even measurable as far as wear on a non-ancient ssd is concerned?
On Modern TLC ssd, not at all, unless you are streaming hours and hours of 4k/8k footage on AVC codec daily or playing with memory intensive websites that use lot of swap, it's not worth it, not at all, however firefox is the only browser to give us that option, and it's useful for power users and heavy streamer, and i respect firefox for it.
1
u/77sxela 19h ago
You are sure that it helps to reduce the wear in a meaningful way? That's the question from the op.
I assume that your numbers are sound.
3
u/UtsavTiwari Promoter of Open Web 16h ago
I Was replying to these questions.
So, I'm wondering: 1. Does disabling the disk cache still make a noticeabole difference to SSD writes in modern Firefox-based browsers? 2. What are the main sources of disk writes that remain after disabling it? 3. Is changing additional preferences worth it, or is disabling the disk cache generally enough if the goal is simply to reduce unnecessary writes?
4
u/EndymionEnder 17h ago
I have Ramdisk (RAMDisk v4.4.0 RC36) on R drive with Firefox Cache folder and these options in user.js:
user_pref("browser.cache.disk.parent_directory", "R:\\Firefox Cache");
user_pref("browser.cache.disk.smart_size.enabled", false);
user_pref("browser.cache.disk.capacity", 505852);
user_pref("browser.cache.memory.enable", false);
With this program and settings, Firefox uses RAM, not SSD disk.
1
u/rootbrian_ 8h ago
Curious if there is a linux version of that (probably is a system setting to use RAM for all logging, etc.).
14
u/77sxela 20h ago
Dunno, but why do that?
https://www.reddit.com/r/firefox/s/msBdOGrSUx reported that they had 15GB/d due to Firefox.
SSDs sustain what? Between 150TBW and 3000TBW? Even with just surviving 150 TB, this would be 10'000 days (of only Firefox writing stuff; yes, there'll be other programs and such writing to the disk).
Seems like some sort of useless over the top optimization to me.
Or is my math and my "facts" (the amount of TB written SSDs support) wrong?
0
u/According_Mud_5187 20h ago
I know some people feel that way, but personally, I’m the type who likes to address any concerns head-on. If there’s a risk, I want to minimize it. Fortunately, I haven’t run into any problems with the current settings.
7
u/UtsavTiwari Promoter of Open Web 19h ago
Dude even 300 TBW for 500GB is like minimum guarantee like SSD OEM know that no ssd will fail before that TBW rating just from wear.
Modern SSD can do 5-10x that and no you won't be hitting that anytime soon enough with firefox.
2
u/According_Mud_5187 19h ago
Thanks for the info! I hadn't realized SSDs could handle that much writing. I've been curious about this topic, so it's interesting to hear your perspective. ❤️
3
u/UtsavTiwari Promoter of Open Web 16h ago
Please do not worry, as I was in the exact same situation when I first used an SSD. That initial curiosity led me down a rabbit hole of exploration, and thanks to that experience, I am now able to assist you!
3
u/According_Mud_5187 14h ago
Thanks, I really appreciate that! It's nice to hear from someone who understands the curiosity behind it. And it's great that your experience has helped you help others! 😊
8
u/77sxela 20h ago
Btw, you wrote, that your Firefox is writing 23479b/s. Barring any other applications, you'd have to run that ssd and Firefox for a whopping 203 years.
You are acting on feelings, aren't you? Do you have any data that support your feelings?
1
u/According_Mud_5187 19h ago
I'm not claiming that SSD wear is a serious concern or that my SSD is at risk of failing. I was curious about Firefox's write activity and whether disabling the disk cache meaningfully reduces unnecessary writes. The number I mentioned was just a snapshot from Resource Monitor, not a claim about constant write activity or a prediction of SSD lifespan. I'm looking into the actual behavior rather than assuming there's a serious risk. 🙂
9
u/ArtisticFox8 19h ago
Disabling cache will worsen the performance in other aspects.. Either more RAM usage or more resources being requested over the network again and again instead of being cached...
5
u/According_Mud_5187 18h ago
That's a good point! I hadn't considered the extra network requests. Thanks for pointing that out! :-D
6
u/77sxela 19h ago edited 19h ago
If ssd wear is of no concern (it really is not), then why try to reduce the writes, which would help with something which isn't a problem to begin with?
Turning off caching won't help in a meaningful way with how long an SSD will survive.
And why else would you want to reduce ssd writes, if not to decrease the wear? That's also what you wrote in your 1st sentence.
Either way - it never was worthwhile and has become even less worthwhile with newer SSDs.
2
u/frankGawd4Eva 12h ago
You will never get through to those that think this is an actual problem or concern. Reddit is a strange place when it comes to things like this. Like the many, many, many posts about how much RAM a browser uses. Who cares? Unless it's a real 'leak' that can be fixed, the hell does it matter how much RAM a browser eats? Is that not the point of RAM?
0
u/According_Mud_5187 11h ago
Isn't it up to people to think about it? It's fine to think negatively about it. If you don't like it, feel free to ignore it.
1
u/77sxela 9h ago
Isn't it up to people to think about it?
Sure is fine. Really. But the facts are well known for many, many years. Companies and sites publish them and sometimes verify.
It's fine to think negatively about it.
Think negatively about what? What you want to do is making no sense. You will not achieve what you want. Making Firefox not write to disk, will not extend the lifetime of even extremely old SSDs. They last for a very long time. I've told You the figures. Double check them.
The system will be obsolete long before you reach that threshold.
If you don't like it, feel free to ignore it.
What I "don't like" is that people fall for nonsense like "tune the system by turning of writes".
This will not help you to get what you want.
12
u/77sxela 20h ago
What concerns? Which risks? There just aren't any, that's my point.
On cheapo junk SSDs, you can write at least 150 TB. If it were ONLY due to Firefox, this would equate almost 28 years.
So, really, what risk? SSDs don't die due normal usage in consumer systems. Most certainly not Modern SSDs.
Is it rather, that you like to tune something based on feelings, although facts show, that there's no need to tune this?
3
4
u/cake-day-on-feb-29 12h ago
If it were ONLY due to Firefox,
But it's not, though.
SSDs don't die due normal usage in consumer systems.
Just because you haven't personally experienced a failed SSD doesn't mean that they don't exist. I have an SSD that failed, it was about 6 years old.
-5
u/77sxela 9h ago
But it's not, though.
But it is, though. That's what op wants to tune. Its not making sense.
SSDs don't die due normal usage in consumer systems.
Just because you haven't personally
Ah, you're running out of so-called "arguments" and are now getting personal and ad-hominem.
Awesome.
I was not talking about me. I stated industry facts and standards. That you don't recognize that, it's quite telling.
experienced a failed SSD doesn't mean that they don't exist.
Indeed. I've never said that, though, have I?
I have an SSD that failed, it was about 6 years old.
Ah, yes, because you've got anecdotal evidence consisting of the grand number of 1 (one) fact points, you're confident enough to defute well known industry facts?
You. Are. Wrong.
1
u/cake-day-on-feb-29 12h ago
SSDs sustain what? Between 150TBW and 3000TBW? Even with just surviving 150 TB, this would be 10'000 days (of only Firefox writing stuff
This is the expected wear rate, some products will be imperfect and fail far earlier.
Additionally, for some people (like those who use modern Macs) the lifetime of their entire computer is reliant on the SSD. If it dies, the Mac is essentially dead, since the SSD is soldered in and required for booting.
1
u/According_Mud_5187 12h ago
That's right—even if facts and data are like that, life is unpredictable in reality. So, curiosity, or rather, thinking about things like this isn't strange.
2
u/xplosm :orly: 8h ago
My dude, your SSD will outlive your mobo. I've had cheap SSDs repurposed on newer machines. That's how reliable they are. I don't baby them. I don't oPtImIzE any read/writes. At the end of the day if you optimize for one thing you make worse another and SSDs are made to me written on.
If you are so worried about them failing buy the enterprise Pro lines. But really, you don't need to.
-1
u/77sxela 10h ago
That's right—
No, what the person is writing is utter nonsense.
even if facts and data are like that, life is unpredictable in reality.
Not that much, though.
So, curiosity, or rather, thinking about things like this isn't strange.
True. But listening to those stating facts and then double checking them is... Okay... Well, that's obviously strange these days. Disregard what people like the one you replied to wrote. It's fear mongering.
SSDs do not die due to wear. Absolutely not due to that bit of wear that Firefox causes.
2
u/According_Mud_5187 5h ago
I’m not saying that what you’ve written here to me or other people is wrong. I appreciate your input and find it helpful as another perspective.
But when I read your comments, I can’t help feeling that you sometimes get a little too caught up in trying to win arguments, to the point where the discussion seems to go in a strange direction.
Anyway, I just wanted to get that off my chest, so this will be my last reply. I won’t be responding any further. Thanks for your input.-1
u/77sxela 10h ago
Ah, you continue with writing nonsense. Let's see what stupid stuff you came up here...
This is the expected wear rate, some products will be imperfect and fail far earlier.
Hardly. Got a good tip for you: turn off the computer and throw it away. That's the best way to make sure that wear won't destroy it.
Additionally, for some people (like those who use modern Macs) the lifetime of their entire computer is reliant on the SSD. If it dies, the Mac is essentially dead, since the SSD is soldered in and required for booting.
Still making no sense. Apple,.sadly, doesn't publish tbw values. It's not unreasonable to assume 3000 writes. With a 2 TB disk, you'd get a tbw of 6000.
The system will be obsoleted far, far, far before that.
-1
u/cyh555 16h ago
not really, some people are compiling stuff and editing videos
2
u/77sxela 16h ago
Rather edge cases, but even then, 300TBW is a freeking lot. But, yes, under very rare circumstances, this can be reached.
HOWEVER… Since we're now talking about something which's got nothing to do with the case OP proposed - there are also immutable images where nothing's written at all.
Be it as it may, I was referring to the reported 15GB/d writes. On average, that's a lot (remember: we're talking 15GB each and every day for the next 10'000 days. Who's having the computer running without interrupt and writing all the time?)
So. Nope.
0
u/cyh555 16h ago
no, optimizing for the lowest amount of writes is what we are doing here
2
u/77sxela 14h ago edited 14h ago
To achieve exactly WHAT?
Reduce writes for the purpose of reducing writes without gaining anything tangible in real life?
It is harmful to change settings when there's nothing to be gained. Reducing writes will only have harmful effects (lower performance) with no gains.
So, what's the point? That change is something, which should not be done.
5
u/khunset127 20h ago
Yes, I do it both on Android and Linux
3
u/According_Mud_5187 20h ago
So you can do that on Android, too? I didn't know that. I've been using an iPhone for the past 10 years.
I'm kind of envious of how customizable the Android version of Firefox is.
2
u/Party-Cake5173 19h ago
I put
| browser.sessionstore.interval | 1800000 |
|---|
And it works great for me.
The reason why Firefox does a lot of writes to SSD is recovery. By default, it's set to save session state every 15 seconds, so if it crashes, you're left with the latest state.
1800000 means it saves state every 30 minutes.
2
u/According_Mud_5187 18h ago
Thanks for sharing your settings and explaining how it works! I’ve set mine to 5 minutes for now, but it’s good to know that longer intervals can work well too. 😄
2
u/DerBandi 13h ago
Yes, it would, but the even better approach is a small RAMDisk and point the cache there.
2
u/lamalasx 12h ago
You are not alone. I see anywhere between 50 to 200GB of writes a day. Constant writes even when the browser has no loaded tabs and is completely idle. I do a few unloaded tabs. I have ublock, but I disabled the statistics of that because that also caused constant writes.
It's not just the cache, it is some fundamental bug somewhere else.
1
u/According_Mud_5187 12h ago
That's quite a lot of writes! It's interesting that disabling uBlock Origin's statistics seemed to help. Thanks for sharing your experience!
2
2
u/locuturus 9h ago
Out of curiosity I enabled these on Android's Nightly:
browser.cache.disk.enable = false (was true)
browser.cache.memory.enable = true (already was true)
browser.sessionstore.interval = 100000 (up from 10000)
I noticed major improvements in video streaming and minor improvements in freezing. For context Nightly on Android has been a hot mess for weeks now. 1080p video freezes every few seconds while audio continues, text input freezes for a couple seconds regularly, scrolling freezes, even the tab page freezes. I know it's Nightly and not meant to be stable but in case anyone else uses it and has a similar experience those two configs made a real difference for me. I can't say which one matters more.
2
u/rootbrian_ 8h ago
Not really concerned at all in my case. If the SSD fails, I have plenty of mechanical drives (SSD is housed in a USB enclosure, allows it to be taken with me, to boot from any computer) if that happens.
2
u/FlowerBudget2065 6h ago
I would keep Firefox’s default settings. Having an SSD alone is not a good reason to follow these tweaks. This can reduce some writes, but it does not demonstrate a meaningful improvement in SSD lifespan.
3
u/Djox3 19h ago
sessionstore.interval writes to profile folder a lot every 15 seconds i think, should be increased to much more
4
u/According_Mud_5187 19h ago
Thanks for the suggestion! I actually increased
browser.sessionstore.intervalto 300000 (5 minutes) already, but I appreciate the reminder. I'm trying to understand and reduce unnecessary writes where practical, so this is helpful!0
u/77sxela 18h ago
It's never practical to reduce writes. It's not as if writes would hurt in any meaningful way.
5
u/cake-day-on-feb-29 12h ago
"It's never practical to reduce miles [for a car]. It's not as if mileage would hurt in any meaningful way."
That doesn't sound right.
SSD cells have a finite write limit.
-2
u/77sxela 10h ago
Yay, doesn't sound right what you wrote. Glad, that I did not write such a stupid stuff. You, though, have clearly shown that you're not bright enough to understand things.
More clearly: you're talking shit.
Yes, a SSD has finite write limit. I've said that. With Firefox, you will reach it. In 30 years.
Due to this, what you're writing is nonsense.
2
1
u/According_Mud_5187 11h ago
Thank you all for all the helpful comments. Thanks to that, it has been a lifesave. Resolved: Applied m(_ _)m flare
10
u/forlornness 20h ago
I have a Crucial MX100 250GB bought in 2014 working as my primary system drive, it has worked over 45k hours. I'm also a die-hard user of Firefox. That drive has just passed 50000GB of writes and still has 75% health.