Live data from Hacker News

Heavy SSD Writes from Firefox

servethehome.com

311–320 of 361 posts

Re: Heavy SSD Writes from Firefox

#311
post #160

Earlier quoted context omitted.

Email/code review/IM/terminal doesn't justify 12GB of writes per day (and attendant hit to drive endurance/battery life). Those are lightweight activities. Emacs can do all those things and it doesn't write to disk unless you tell it to. Heck, even bloated beyond belief Outlook + Visual Studio + Skype + PowerShell wouldn't create anywhere near that kind of background activity.

What does "justify" mean here? My web browser does them in a lot more useful fashion to me than Emacs would - in other words, it is worth 12GB of writes per day for me to get these into my web browser instead of into Emacs. Am I wrong for thinking that this is a good tradeoff?

Did you actually decide to make this tradeoff? Did Firefox at some point explain it was going to do 12GB of writes per day and you clicked the button that said yes?

Re: Heavy SSD Writes from Firefox

#312
post #126

Hi, I’m one of the Firefox developers who was in charge of Session Restore, so I’m one of the culprits of this heavy SSD I/O. To make a long story short: we are aware of the problem, but fixing it for real requires completely re-architecturing Session Restore. That’s something we haven’t done yet, as Session Restore is rather safety-critical for many users, so this would need to be done very carefully, and with plent…

How can I disable it completely?

http://kb.mozillazine.org/Browser.sessionstore.enabled

Re: Heavy SSD Writes from Firefox

#313
post #86

Earlier quoted context omitted.

Maybe I am not understanding this right, but is this saying that Firefox will continually keep writing to the disk while idle? Does anyone know more about this? Why would this be needed to restore session/tabs? This is very much the feature working as intended: Firefox captures webpage state every 15 seconds, so a crash, power outage, accidentally closing the browser etc will not result in data loss for the user. For…

I understand that pages can change their state without user interaction, but shouldn't the browser only write to disk when that actually happens? The browser has to be able to detect when these changes happen right? I understand that it's probably not an issue for most users/SSDs. However, if I open just a static HTML file and leave it idle, I don't think the browser should be continually writing to disk. If it is, t…

> but shouldn't the browser only write to disk when that actually happens

The problem is that it's happening continuously. Any page with analytics or ad engines (I'd guess easily 95% of the top visited web) is continually logging how long you've been on the page, scroll position, idle time, etc. And then setting a cookie to remember the session info/last time it was updated.

It would be interesting to see what installing an ad blocker would do to these numbers.

Re: Heavy SSD Writes from Firefox

#314
post #174

Earlier quoted context omitted.

Why not leave the existing code (SR1) as is and rebuild Session Restore 2 (SR2); keep using SR1 until it has nothing to restore and then use SR2 moving forward.

That sounds pretty hard to pull off. What's the expected benefit?

That's a pretty standard M.O. for server-side software development. But in the case of desktop software such as Firefox I see no gain.

Re: Heavy SSD Writes from Firefox

#315
post #263

Earlier quoted context omitted.

because not losing data is infinitely better than saving your ssd life a couple years. we've had ssds for a long time now. still waiting for one to die on me. meanwhile I'm on my 27th dead spinning disk.

Some people are unjustifiably worried about SSD endurance. The reality is that even with fairly heavy use, most of them will far outlive the computers they're in. And their owners for that matter! I purchased my current SSD in March 2015 - it's a Samsung 850 EVO 512GB. It's done 7332 Power_On_Hours, and 36486573259 Total_LBAs_Written, which works out as just under 17 TB written, or about 31.6 GB/day. That kind of sou…

this is an incorrect assumption http://techreport.com/review/27909/the-ssd-endurance-experim...

Most of the SSD failed before a petabyte... and started encountering lots of errors before that (forget about the Samsung Pro series which is the only one that survived till its multi-petabyte end).

Re: Heavy SSD Writes from Firefox

#316
post #12

Earlier quoted context omitted.

If you can get a petabyte of r/w out of an SSD then 12 GB/day (of writes only) will exhaust the device in 228 years (1 PB * 1000 TB/PB * 1000 GB/TB / 12 GB/Day / 365 Days/Year). If there is also an associated 12 GB/day of reads then half that estimate (unlikely to be equal due to the nature of the cache). Either way -- not a significant degradation. Edit: Degradation or not -- i'd personally rather have my drive reso…

Times of samsung 830 using 27nm SLC are over, its Drives that reach >1PB or write endurance are no longer on the consumer market. You can buy them (SLC), but you wont after seeing the price. You can do nice tests that will last for hundreds of TBs .. until you pause for 24 hours and realize all the data is gone.

It was the 840 Pro that went 2.4 terabytes during a drive test that ended in 2015[0]. That was a 21nm tech. I think the endurance is better than you think.

[0]http://techreport.com/review/27909/the-ssd-endurance-experim...

Re: Heavy SSD Writes from Firefox

#317
post #102

Earlier quoted context omitted.

No, "people" are not complaining about that; it's a fine attempt at a straw man, though. What the article complains about through implication is that Firefox is unnecessarily writing too much data to disk.

Why would it be unnecessary? The amount of data follows rather logically from the amount of website state it's capturing, and the interval seems totally like personal preference to me. Would you rather lose 60 seconds of work or 15? Uh, I'll take less data loss.

[deleted]

Re: Heavy SSD Writes from Firefox

#318
post #253
post #171

Earlier quoted context omitted.

Unless there is a bug, Session Restore is not written if Firefox is idle. Of course, many applications are not idle even if you're not using them, and with the current architecture, just one tab using, say, DOM Storage, or updating a session cookie or a hidden form field, is enough to force a rewrite.

As an heavy user of session restore and tons of open tabs, I would be OK ignoring updates to tabs that have not been active for a while. For example, let's say I have 10 tabs open but I have been using only the latest tab during the last 5 minutes. In this scenario I don't care about the cookies (eg due to ongoing ajax) nor the state of the other 9 tabs. If the browser crashes I'm OK with those 9 tabs being restored…

don't generalize your personal use case

Re: Heavy SSD Writes from Firefox

#319
post #272

Earlier quoted context omitted.

Session store contains open tabs, windows, history for each tab, form fields, referrers (so we can re-request the page correctly), titles (so we can restore tabs without re-fetching every page), favicons, charsets, some timestamps, extension data, some kinds of site storage, scroll positions, and a few other things. The goal of session restore is to restore your session -- your open tabs should come back, the same pa…

Storing a lot of static images as JSON base64 encoded, every 15 seconds is certainly not something that users should be blamed ("some users have 300MB JSON files"), just the poor programming. It would be interesting if somebody would actually analyze what takes the most of the mentioned 300 MB. I see a lot of base64 encoded stuff, if they are "favicons," come-on. There are so many caches in Firefox already, JSON file…

Nobody is blaming the user for the 300Mb. It's just a factor we need to take in consideration.

But yeah, storing favicon in Session Restore would be pretty bad. I didn't remember that it was the case, though.

Re: Heavy SSD Writes from Firefox

#320
post #263

Earlier quoted context omitted.

because not losing data is infinitely better than saving your ssd life a couple years. we've had ssds for a long time now. still waiting for one to die on me. meanwhile I'm on my 27th dead spinning disk.

I am one of those people who sets browser to dump all cookies, cache and and history upon closing, so I'm not really sure what data would be lost.

that is the beauty of it. You can disable. Be glad you have firefox and not only IE or chrome (where you can't disable all the things)

But for 99% of the users, they want it.

Heck, anecdote for anecdote: the very first thing i do on new machines is to open up firefox, go to settings, set the browser to startup with my previous session's tabs.

Post reply on HN