On Saturday, May 20, 2017 at 1:10:10 PM UTC-4, Reg Tiangha wrote: > On 05/20/2017 10:51 AM, Gaiko Kyofusho wrote: > > I have a 16gb mem system which can't be upgraded any further to my > > knwoledge. I had thought this would be enough but I am running into > > memory errors more often than I would like. I admittedly open maybe > > 7-12 appvms so the obvious answer to my prob might be open less appvms > > but for my workflow that would be inconvient. I do not remember > > setting up a swap space during setup but I think it was set up > > automatically though in the dom0 system monitor plugin the swap space > > monitor never seems to move (stays at zero). > > > > My questions are two fold I guess: > > > > 1. Are there any recomended ways for reducing memory usage? > > 2. How can I tell if swap is being used? > > 3. If swap is not being used how can I enable it? > > > I only have 8 GB of RAM and it can handle about 7-12 VMs, depending on > what I'm doing. But I tweaked my VM memory settings; leaving it to the > defaults makes it hard to run more than 4-5 VMs at the same time since > new ones won't start up because of a lack of RAM. > > The first thing you can do is reduce the max amount of memory the AppVMs > use. By default, they're set to use between 400-4000 MB of RAM, but if > you look at your actual VM RAM usage in a terminal window by using the > top or free commands, you may find that your actual usage is a lot less > and can reduce that upper limit to something like 2000 MB or less. That > includes your service VMs like your firewall; you can probably reduce > the upper limit on sys-firewall to 300-400 MB rather than the 4000 MB > it's set to by default. > > Or if you don't go crazy with various iptables firewall rules, you can > run the qubes-mirage-firewall from here as a replacement to sys-firewall: > > https://github.com/talex5/qubes-mirage-firewall > > I have mine running with only 32MB of RAM and things work fine (there's > a hack you may need to do to get DispVMs to connect to the internet > properly though, but regular VMs work fine with it). > > Next thing to look at is the RAM allocated to dom0. By default, the > upper limit is 4096 MB but I reduced mine to 2048 MB and haven't > encountered any noticeable issues. In order to change it though, you > have to edit your GRUB config files and then reboot. > > Edit /etc/default/grub in dom0 and change the dom0_mem=min and > dom0_mem=max values to match your needs. I set mine to 1024 and 2048 > respectively, but you might be able to go even lower (say 512 and 1536 > or something like that). Then, you'd need to regenerate > /boot/grub2/grub.cfg to get it to work permanently. I don't remember the > command off the top of my head, but you alternatively, you can edit that > file directly making the changes to all references of dom0 max and min > memory like you did with the previous file, save it, and it'll still > work once you reboot. > > If you make those changes, that should help. There's no magic bullet as > to what to set those max memory settings to since it really depends on > how you use your VMs, so you may have to do a bit of profiling first to > figure out what your optimal max RAM values are for each case.
Wow thanks, I didn't realize that I was lowering the min and ignoring the max (now not sure what I was thinking) but the parameters you gave really helped! -- You received this message because you are subscribed to the Google Groups "qubes-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/qubes-users/f7850034-ecc3-47f3-9e55-94c3f806dd00%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
