Here's what I learned when I had to work with not-enough RAM:
In Firefox you can limit the processes that get spawned for tabs. The RAM usage will then top out and will stop increasing even if you open a lot of tabs.
There's a browser extension "auto tab discard" that helps when working with dozens of tabs:
https://add0n.com/tab-discard.html
It will put tabs that you didn't look at for x minutes into the same sort of standby mode that you get if you close and re-open the browser.
About the desktop, I remember occasionally getting hit by memory leak bugs in the desktop (panel etc.). You could try to research if you are hit by similar bugs right now. For example, what happens if you right now close all programs and then look at memory usage in free -h
? It hopefully falls back down to a value somewhat similar to what it was like after boot and login.
You could also look through "RSS" memory usage numbers for processes that belong to the system's services. There might be a leak there.
There's "zswap" and "zram" kernel modules to help with the times when running out of RAM. It delays the use of the actual swap on disk. When disk swap starts getting used things can get really bad with the machine hanging for a full minute etc.
Sounds to me like they have no trouble managing the tabs, that the problem is that with so many tabs open the browser claims basically all system resources.
/u/daredeviler_21, have you tried any extensions that automatically hibernate background tabs? Auto Tab Discard for example is available for Firefox and Chrome (and thus also Vivaldi and Opera).
Nah it's a separate thing from shadowfox...the link is just in his github's wiki. Here's the direct link to the restart button, which is a js hack: https://gist.github.com/Sporif/ad6e917d87787491538bac80d3c8918c
But I recommend shadowfox. It's pretty good. Look over that github for extra tweaks and you'll also find dark scrollbars.
Auto Tab Discard reloads suspended pages but it saves where you are on the page. FAQ is here. Works better on my fast desktop than it does on my shitty laptop, but both benefit from it. It's a good extension.
Hello, you can look for "Auto Tab Discard" module for Chrome or Edge.
It freeze unused tabs, but you can specify tabs tou need to stay awaken. So, less pressure on battery... :-)
​
I'm not sure if this is a solution to your specific problem but I use Auto Tab Discard.
There's a whitelist feature that keeps specified domains from unloading; maybe it even helps with keeping your programs active in their tabs?
This helped me: https://add0n.com/tab-discard.html It's not pretty, but it keeps Firefox's RAM usage in check.
Also, swap is terrible, but at least it prevents hard lockups. I used systemd-swap.
Since having installed the Auto Tab Discard extension, Firefox has become more efficient than all other browsers except Opera. Unfortunately, Opera isn't great for web development, so I've settled on Firefox.