Does it need really that much RAM? RAM you don't use tend to get swapped out, and browsers themselves are pretty good working with a large amount of tabs opened, sometimes by unloading those that are currently unused. Note: swap is good!
I think what kill memory more than having dozens of windows on many desktops is self contained apps and VMs. For example, if you have a browser with 1000 tabs open, you will only have one instance of the engine, and the browser can manage the memory associated with tabs effectively. Now if you have 10 distinct browsers opened with all their dependencies, which can happen if you are running electron apps and you are actually using them, you are going to need a lot of RAM. Also if they all come with their dependencies instead of using what's on the system, you also multiply RAM usage.
Running many instances of the same apps running the same libraries tend to not cost that much, as they only need to be loaded once and are shared. There are a reason we call .so and .dll files shared libraries.
VMs are even worse, as they need a whole fixed chunk of memory that is mostly opaque to the host OS, meaning there isn't much it can do.
I checked. htop reports 22.7 GB. I do have one VM with 4 GB RAM.
Having 32 GB I disabled swap. It's been maybe 8 years since the last time I had swap on. No problems at all.
I think what kill memory more than having dozens of windows on many desktops is self contained apps and VMs. For example, if you have a browser with 1000 tabs open, you will only have one instance of the engine, and the browser can manage the memory associated with tabs effectively. Now if you have 10 distinct browsers opened with all their dependencies, which can happen if you are running electron apps and you are actually using them, you are going to need a lot of RAM. Also if they all come with their dependencies instead of using what's on the system, you also multiply RAM usage.
Running many instances of the same apps running the same libraries tend to not cost that much, as they only need to be loaded once and are shared. There are a reason we call .so and .dll files shared libraries.
VMs are even worse, as they need a whole fixed chunk of memory that is mostly opaque to the host OS, meaning there isn't much it can do.