I have fixed this issue forever. I got a Thinkpad P50 with 64 gigs of ram. So, I just mount a tmpfs over ~/.cache. I actually use a tmpfs for a few things: $ grep tmpfs /etc/fstab tmpfs /tmp tmpfs nodev,nosuid,mode=1777,noatime 0 0 tmpfs /var/tmp/portage tmpfs noatime 0 0 tmpfs /home/zx2c4/.cache tmpfs noatime,nosuid,nodev,uid=1000,gid=1000,mode=0755 0 0
Heavy SSD Writes from Firefox
181–190 of 361 posts
Re: Heavy SSD Writes from Firefox
#182Re: Heavy SSD Writes from Firefox
#183Re: Heavy SSD Writes from Firefox
#184Earlier 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…
Re: Heavy SSD Writes from Firefox
#185Earlier 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…
> 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…
Re: Heavy SSD Writes from Firefox
#186I 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.…
Would you be willing to post a how-to or example of doing this? I'm curious about how this trick works!
Re: Heavy SSD Writes from Firefox
#187It also is about single CD speed (yes, you could almost record uncompressed stereo CD quality audio all day round for that amount of data)
All to give you back your session if your web browser crashes or is crashed.
Moore's law at its best.
Re: Heavy SSD Writes from Firefox
#188Hi, 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…
1. Thanks for your work.
2. How do I really contribute? Could you link to what I need to do to start working on this now? I'm affected by this problem ame want to figure out if I can fix it.
Re: Heavy SSD Writes from Firefox
#189Earlier quoted context omitted.
Would you be willing to post a how-to or example of doing this? I'm curious about how this trick works!
It's probably best to just disable sessionstore if you don't want it, as overwriting fsync would disable it for all operations Firefox might use, not just sessionstore.
In my case it was not SSD wear I wanted to reduce, but the short pauses during interactive use.
Re: Heavy SSD Writes from Firefox
#190Hi, 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…