Qube VMs Less RAM Usage Suggestion

I’ve been using Qubes for 2.5-3 years now, and up until about 5 months ago, I was using it with 2 cores and 16GB RAM with very few resource-changing modifications. The sys-firewall and sys-whonix qubes each used 4GB of RAM, which along with dom0 used up 75% of my available RAM. Recently, after I upgraded my hardware of course, I figured out that I could set all of these qubes to 400MB without consequence (top says that I’m not using much, if any, swap). I have also reduced all the templates to 1GB each (very possibly less in the near future) because all they do is install, configure, and update software. I have also set non-RAM-hungry AppVMs (like for Signal Messenger) to 1000MB, and more RAM-hungry ones (like for Firefox) to 2000MB. It was like magic when I found this, and it made more than a significant difference in my daily usage of Qubes.

Has anyone else done this and had negative effect? Is there any reason to expect negative effects? I don’t put much stress on these qubes, so there may be different consequences for different usages. I’m looking for feedback because if there isn’t a good reason not to do this, then I’m going to either include it in an appropriate existing community guide or create my own and suggest this as an upstream change.

What do you think?

1 Like

The qubes are using memory balancing by default and the Qubes OS will give all the free memory to the running qubes up to their maximum memory value.
When you start new qubes and there won’t be enough memory to start it or when some qube will require more memory for some operation then memory balancing will take away free memory from other qubes to assign to the qube that needs it.

1 Like

Thanks, I already knew about qmemman and memory balancing, but I didn’t read into it and assumed qmemman was managing low-level RAM usage to prevent leaks and mismanagement. I also assumed that the balancing simply stole from qubes that had an appropriate amount and would slow them down. I come from the (business, not tech) rule that you never want to use more than 80% of your capacity, so when I saw that RAM was full, I assumed I was using the max and that it would simply sacrifice performance for another one or two qubes. I now wish I would’ve done my due diligence.

I will add my 2 cents, I do prefer qubes to only be allotted the necessary amount of RAM, but I now understand that this isn’t necessary. Thank you for explaining.

For what it’s worth, I also lower maxmem on long running qubes (mostly sys-*). I find it helps me understand the system both at a lower level (how much does this kind of qube need, actually?) and a higher level (how much am I stretching my system? How much more can I push it?).

1 Like

Not sure if it’s only me, but I found memory balancing to use a lot of CPU and produce regular stuttering. I only enable it when I have no choice.


I’ve put some thought into this, and aside from the technical implementation (which is above my pay grade) I think the Qubes Domains widget should show the amount of RAM the qubes are actually using, as in not including anything that would be taken if needed. As an end user, it is confusing to see that a “3894MB” next to qubes and not assume that is how much they are using.

On the technical end, maybe it may be a good UX idea to balance the qubes such that they inly have what they need instead of taking it when something else needs it? I agree with @Euwiiwueir—I prefer to keep the usage down to understand what my machine is doing, and I think the current setup is a little confusing for a user trying to manage his resources. I’m not advocating for changes, just adding my opinion.

1 Like

Related issue:

1 Like

I haven’t had this happen. First thing that comes to mind is maybe it’s hardware related?