Serious question: Is 12GB a day really going to make a dent in your SSD's lifespan? I was under the impression that, with modern SSDs, you basically didn't have to worry about this stuff.
Also, does this affect hybrid disks?
Heavy SSD Writes from Firefox
231–240 of 361 posts
Re: Heavy SSD Writes from Firefox
#232Hi, 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…
Re: Heavy SSD Writes from Firefox
#233Even if some data is being written, it could still be orders of magnitude lower than the writes executed by the program.
There are legitimate pros/cons of using sync() or not. Missing it out could mean that the file data is lost if your computer crashes. But if firefox crashes by itself, the data will be safe.
Re: Heavy SSD Writes from Firefox
#234Earlier quoted context omitted.
You could at least just compress the data with LZF or any of the really fast text compressors. It'll compress to about 30% of the size, it's easy to do, and it shouldn't add more than a tiny CPU overhead over formatting the JSON itself. It solves half the problem with like 15 minutes of work.
Actually, we had a prototype doing this. In the end, we didn't because it broke some add-ons, but it might be time to try again.
Also, what do these add-ons do? The only use case I can think of is figuring out whether the user has a tab open to a given site, and that's going around the browser's security model, so breaking that would be a good thing.
Re: Heavy SSD Writes from Firefox
#235Earlier quoted context omitted.
If you miss a sync, your profile isn't going to be 'broken', just out of date.
if it happens during the sync you could be arbitrirly broken.
rsync [...] /dev/shm/.browser ~/.browser
Instead of: rsync [...] /dev/shm/.browser ~/.browser.new && ln -sf ~/.browser.new ~/browser
Or some such equivalent, i.e. doing the full sync and then atomically juggling a symlink around.Re: Heavy SSD Writes from Firefox
#236Earlier 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). That is actually a good idea we haven't considered yet. A bit too brute force for my tastes, but relatively easy to implement. We would need to determine how…
Why is there so much data in the session restore anyway? If the goal is to have the URLs of the currently opened tabs, I'd expect that just the given URLs should be enough? I think I've seen some unexpected stuff there like the images base64 encoded? Maybe there's enough users that would be satisfied just with the URLs? At least for them the "rewrite" would be seldom needed. Or, maybe to reformulate, which wild scena…
Re: Heavy SSD Writes from Firefox
#237Re: Heavy SSD Writes from Firefox
#238Earlier quoted context omitted.
Hadn't thought about it until now, but this feature may be why I don't see "I wrote you a long message but accidentally closed the tab / hit the back button / my computer crashed and I lost it, so here's the highlights I remember" emails from friends and family anymore. I would much rather discover this caveat and opt out than expect my grandmother to know it's even possible to opt in.
At this point, isn't that responsiblity larged handled by server-based autosave? GMail / Google Docs being the big ones, I assume FB and other social networking sites do the same.
Re: Heavy SSD Writes from Firefox
#239Chrome, on my system, is even more abusive. Watch the size of the .config/google-chrome directory and you'll see that it grows to multi-GB in the profile file. There is a Linux utility that takes care of all browsers' abuse of your ssd called profile sync daemon, PSD. It's available in the debian repo or [1] for Ubuntu or [2] for source. It uses `overlay` filesystem to direct all writes to ram and only syncs back to…
services.psd.enable = true;
services.psd.users = ["your-user-name"];Re: Heavy SSD Writes from Firefox
#240Earlier quoted context omitted.
> I dunno but I think plenty of people consider their web browser a pretty vital application. No one is arguing against that point. However, most people do not need their browser state to be needlessly backed-up that aggressively (every 15 seconds - which is about the same time it took me to type everything before this sentence). I'm OK with losing up to 20 minutes of my state in a browser. Most work done in a browse…
And when you just spent 10 minutes finding the link you need, and your browser crashes, you're going to spend a lot more time again. There are plenty of cases where I'm really glad my browser re-opens all the tabs, with cookies in play etc. If your job includes having to use a web application for significant portions of said job, it's even more invaluable. I've worked on several applications that account for more tha…