4 ms·
For a few months now I saw a huge improvement on Linux regarding the memory management of Firefox. Previously I had to run Firefox in a separate cgroup to limit
by hawski 4y ago
For a few months now I saw a huge improvement on Linux regarding the memory management of Firefox. Previously I had to run Firefox in a separate cgroup to limit its memory usage, because it could easily deplete my whole RAM. And if I did close most of my tabs it did not release the memory back to the system. Now I never actually get to the limit I've set before and also with Auto Tab Discard extension it is well managed. So kudos to the team for such improvements.
- marto1 4y agoCorrect me if I'm wrong, but the blog post is concerning a stability improvement on Windows specifically?
- kaladin_1 4y agoYeah the article is about Windows. Even though you can see here: https://hacks.mozilla.org/author/gsveltomozilla-com/ https://hacks.mozilla.org/author/gsveltomozilla-com/ that they also worked on MacOs and Linux stability this year. I had abandoned Firefox entirely on MacOS until sometime I decided to try again and it was no longer attempting to claim an entire 32GB memory for itself. So, I am back as a happy user :)
- hawski 4y agoIt is, but it just reminded me of this other bit. Sorry if I was a bit too off topic. I just see those improvements on the sidelines and I'm glad.
- Existenceblinks 4y agoMe too, on macOS, I notice memory is freed more.
- chris_wot 4y agoI'm exclusively using Firefox on MacOS now.
- gsvelto 4y agoI'm glad you noticed! We did indeed roll an improvement on Linux too, see: https://bugzilla.mozilla.org/show_bug.cgi?id=1771712 https://bugzilla.mozilla.org/show_bug.cgi?id=1771712 In a nutshell we're directing the OOM killer towards less interesting processes within Firefox so that when the system is low on memory they'll get killed first. This not only makes it more stable overall but it plays nicer with other applications too. Web pages that leak memory in the background are particularly likely to be killed by this mechanism and that alone is a huge improvement in overall stability.
- RunSet 4y ago
- MayeulC 4y agoI was very excited about this improvement (it was covered on phoronix IIRC), but my systems still ends up thrashing when Firefox grows too big, unfortunately. I usually keep an eye on the memory usage I have displayed in the taskbar, and have sysrq activated in case. I tried multiple things, including avoiding swapping to disk (only using zram), and Zen kernels. I'll have to see if I use MGLRU.
- heavyset_go 4y agoDoes this OOM killer direction respect cgroup memory limits? Back when I was using Firefox on a low memory system, I ran it in a limited cgroup, but features like `browser.tabs.unloadOnLowMemory` wouldn't unload tabs on low cgroup memory, but only on low total system memory.
- heavyset_go 4y ago> And if I did close most of my tabs it did not release the memory back to the system. Check out `about:memory` and `about:unloads`, the former has memory minimization options and the latter lets you unload background tabs from memory.
- Abishek_Muthian 4y ago> and also with Auto Tab Discard extension it is well managed Have you compared it with the default Hibernation (Tab Unloading) recently? I don't use any extensions apart from UBlock Origin since I lost trust with extensions after seeing a recommended FF extension promoting scam. When compared to Vivaldi's default hiberation(Where I have to manually trigger bg hibernation every now and then), FF's hibernation seems to do its thing (about:unload) quite well.