Live data from Hacker News

Heavy SSD Writes from Firefox

servethehome.com

291–300 of 361 posts

Re: Heavy SSD Writes from Firefox

#291
post #137

Earlier quoted context omitted.

How about this: 29 out of 30 times, save only a diff to the previous data. 1 out of 30 times, save the complete data in compressed form. (I'm guessing there must already be functionality to diff a bunch of JSON somewhere in the millions of lines of code). Though I'm sure this doesn't make usually make a dent in a SSD's lifetime. But there are still people running Firefox on low end Android phones with meager flash, a…

You also need to handle all corner cases where one of the intermediary diffs gets corrupted (you can't generally assume in a program like Firefox that data you write out is going to be readable in the future because lol common hardware). Or where the diffs are larger than a fresh snapshot. And you absolutely can't get it wrong. It's something that sounds easy until you actually try to get it coded up and shipping. I…

As Microsoft have discovered in their binary patches through Windows update. If you've ever run sfc /scannow and then dism /online /cleanup-image /scanhealth then you are almost certainly seeing corrupted binary patches.

Re: Heavy SSD Writes from Firefox

#292
post #102

Earlier quoted context omitted.

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.

The problem isn't that data is being written (that's desirable, in fact). The problem imo is that data is being written unnecessarily. Firstly it shouldn't be backing up every "N" seconds. It should be backing up after every change , and for performance reasons coalescing changes in time interval bins (eg 1-5 second blocks). Secondly, it should only be writing the information that changes. Sure websites contain a lot…

If the data hasn't changed during the last interval, then it doesn't rewrite the file. The article mentions loading a couple of dozen pages that are probably all pinging a dozen ad servers every 15 seconds, updating their cookies and localstorage with the results, etc. It all adds up. If you really want to solve the problem, use an ad blocker, or push the pages you visit to remove the bloat.

Re: Heavy SSD Writes from Firefox

#294
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…

>The reality is that even with fairly heavy use, most of them will far outlive the computers they're in.

I'm not sure what the lifetime of a computer is. In my family, we are still occasionally running machines from circa 1995. They work fine. When should I stop using my MacBook? The only reason I'd stop is if it died in a way that can't be cheaply fixed.

Re: Heavy SSD Writes from Firefox

#295
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…

The warranty on your EVO is just 150 TBW. The older generations typically had better endurance, the newer generations are more dense (cheaper to produce) but less durable.

If you keep with 17 TB per one and half year your SSD should be OK for your for at least next 11 years.

Re: Heavy SSD Writes from Firefox

#296
post #295

Earlier quoted context omitted.

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…

The warranty on your EVO is just 150 TBW. The older generations typically had better endurance, the newer generations are more dense (cheaper to produce) but less durable. If you keep with 17 TB per one and half year your SSD should be OK for your for at least next 11 years.

The warranty on your EVO is just 150 TBW.

Yes, but endurance tests almost invariably show that the warranty ratings are extremely conservative. The 1TB 850 PRO (which uses exactly the same NAND chips as the 850 EVO, just a different controller) has been endurance tested to more than 7 Petabytes. See: http://packet.company/blog/

The older generations typically had better endurance, the newer generations are more dense (cheaper to produce) but less durable.

That was true when comparing MLC flash to TLC. But the 850 EVO and PRO use 3D V-NAND, which has significantly more endurance than previous-generation TLC. This seems to be confirmed by endurance tests.

your SSD should be OK for your for at least next 11 years

The warranty runs out after 5 years, anyway. But that does not mean it will suddenly stop working on that date!

Re: Heavy SSD Writes from Firefox

#297
post #283

Earlier quoted context omitted.

I'd wish they'd also restore themselves to the proper location on the proper virtual desktop. With hundreds of windows, typically organized by task, I dread having to reorganize things every time Firefox (or the computer) restarts. Someday the pain may motivate me to try to learn enough about Firefox's internals to do it. :)

Definitely worth filing a bug in bugzilla if they are not on the right virtual desktop... it might take years to get fixed, but they do generally get round to it.

There already is a 10 years old bug about the issue: https://bugzilla.mozilla.org/show_bug.cgi?id=372650

Re: Heavy SSD Writes from Firefox

#298
post #144
post #67

I have been running Firefox for a long time with an LD_PRELOAD wrapper which turns fsync() and sync() into a no-op. I feel it's little antisocial for regular desktop apps to assume it's for them to do this. Chrome is also a culprit, a similar sync'ing caused us problems at my employer's, inflated pressure on an NFS server where /home directories are network mounts. Even where we already put the cache to a local disk.…

If my memory serves correctly, Session Restore doesn't use sync()/fsync() at all. Edit Double-checked in the code: I'm right, it doesn't. Edit If you're interested in how Session Restore improves the safety of its writes without using sync()/fsync(), the details are on my blog: https://dutherenverseauborddelatable.wordpress.com/2014/06/2...

So you're relying on the implicit write barrier many filesystems supply that ensures that the contents of a file hit the disk before a renaming of that file does. That's adequate, but I'd personally checksum the file instead of relying on corruption causing JSON to become structurally invalid.

Re: Heavy SSD Writes from Firefox

#299
post #279

Earlier quoted context omitted.

You're lucky... mine died after the original 1 year warranty (a few days over, it detected as 10MB drive or some such), I replaced it before they had a fix for the issue... that said, every drive I've had since has been very solid, mostly using Samsung drives these days.

That has nothing to do with write endurance; it's a known bug in the firmware.

I know that it's (now) a known bug... unfortunately it wasn't known when it happened to me, and I'd long since replaced it when I found out.

Re: Heavy SSD Writes from Firefox

#300
post #294

Earlier quoted context omitted.

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…

>The reality is that even with fairly heavy use, most of them will far outlive the computers they're in. I'm not sure what the lifetime of a computer is. In my family, we are still occasionally running machines from circa 1995. They work fine. When should I stop using my MacBook? The only reason I'd stop is if it died in a way that can't be cheaply fixed.

[deleted]
Post reply on HN