How to slim down debian-10 Vm memory use?

I am using a debian-10-minimal VM for VPN access.

They each use 2140mb or so memory.

How would I go about slimming down these processes? I’m surprised they are using so much memory.

Can anyone think of things that could be dumped?

For each VM, you can set a dynamic memory range. This dynamic memory range is the range within which memory can be added or removed from the VM without requiring a reboot. You can adjust the dynamic range while the VM is running, without having to reboot it. Citrix Hypervisor always guarantees to keep the amount of memory allocated to the VM within the dynamic range. For example, if the Dynamic Minimum Memory is 512 MB and the Dynamic Maximum Memory is 1,024 MB, the VM has a Dynamic Memory Range of 512–1,024 MB. The VM operates within this range. With DMC, Citrix Hypervisor guarantees to always assign each VM memory within its specified DMR.

When host memory is plentiful, all running VMs receive their Dynamic Maximum Memory level. When host memory is scarce, all running VMs receive their Dynamic Minimum Memory level. If new VMs are required to start on full servers, running VMs have their memory squeezed to start new ones. The required extra memory is obtained by squeezing the existing running VMs proportionally within their pre-defined dynamic ranges.

1 Like

Thanks. I just upgraded from a very tight 16GB of memory to 32GB. Perhaps that is the reason why these VPNs are bloated.

I had set the minimum memory at 400mb and the maximum at 4000mb.

I will play around with opening more windows, to take up memory, and see how the VPNs shrink. I will also try reducing the maximum memory for them and see how they cope.

You can use the command ‘ps aux’ to get the full process list with allocated memory.

1 Like

I reduced the maximum memory down to 1000mb and it still works fine.

Most of my debian-11-minimal sys-* qubes use 400mb. Some needed a bit more though. Trying to reduce qube memory usage really just shows how much of a memory hog browsers are. I find using a browser with anything less than 2-3gb tedious

1 Like

I find that a debian-minimal template with only openvpn or wireguard installed (and the relevant networkmanager packages), runs well on 200mb of RAM and 1 VCPU. I’ve currently no need to reduce the RAM below 200MB, but I’m sure I could get it to 100MB or lower.

If you were to use a minimal kernel and take the time to remove unncecessary packages misleadingly marked as dependencies, you could reduce resource usage even more than already possible with the existing templates.

After a while of running, you may notice that VM’s disk usage is more than 1gb. That means it has used swap. You may then allocate more RAM to it.

1 Like


minimal template. don’t install unnecessary services.

get rid of X if the sys-qube doesn’t need X

don’t use usb-qube if you don’t need it.

don’t use sys-whonix when you are not updating a qube.

lighter browser for unimportant browsing… midori’s development stopped at 2019. :frowning: w3m if you only need to read the text.

maybe get rid of swap. my laptop has a small ssd and only 12 gb ram.

This is virtual memory being mapped, not used.
Qubes use lazy memory balooning/balancing to “steal” unused memory.

Most memory assigned at boot of a vm can be stolen by this mechanism, outside of what is actually reserved and used.

Again, yes, browsers are probably the most intensive memory huggers out there, yet again. The same question always applies. Do you really need those 100 opened tabs?

Under qubes, opening qubes needed for an anticipated short term workflow is the way to go. Once that workflow is over, close that qube and gonon with the next one. Following that simple workflow permits to ioen most stuff in disposable qubes, limit what is kept in memory, reducing risks of exposure and enforces a cleaner digital hygiene all at once.

Unless i’m actually building stuff on my x230, I have plenty of memory and do not swap. I have multiple browsers windows opened, each window being linked to a subquest of mine, which i close when those tasks are done. That is, i do not keep more then needed tabs in browsers.

Convenience reaches its limit when faced to security and performance. Again, more memory seem a good idea, where in practice, limiting what is in memory is most of the time the real solution when having prevention in mind.

If you attempt to start a qube that refuses to start because of memory missing, the most probable cause is a browser with too many tabs open. Again, why so kany tabs opened?