Dom0 max RAM - Low memory Qubes OS installations

There have been a lot of posts lately about low memory situations where people are running the bare minimum of RAM.

I have from personal experience ran QubesOS on the lowest possible RAM and found that setting

dom0_mem=max:4096M

to

dom0_mem=max:1536M

in grub.cfg, will result in being able to open more Qubes on a low memory system.

If qmemman is running, what are the requirements behind assigning a default of 4Gb max RAM to Dom0 in the installation process, when this could represent 66% of the installed RAM on a system with the bare minimum 6GB per system requirements?

3 Likes

How do I change the settings in the grub.cfg? I start by editing the grub file in /etc/default/

sudo nano /etc/default/grub

Save. Then I regenerate the grub.cfg in /boot/grub2/

grub-mkconfig -o /boot/grub2/grub.cfg

This gives me an error:

bash: grub-mkconfig: command not found

1 Like

It’s grub2-mkconfig.

3 Likes

@unman do you know if theres any technical reason that Dom0 has a default max mem of 4Gb?

1 Like

It was, I seem to remember, an arbitrary decision. There used to be
no limit.
It’s good practice to allocate to dom0, and also good practice to review
your requirements, and adjust accordingly. 4GB is a good starting point
for most systems.

Honestly I haven’t seen dom0 use more than 1.5GB so far. So 2-2.5GB seems
more reasonable to me.

Update:
2GB appears to cause a lot of dom0 memory swapping when one starts a lot of VMs. 3GB appears to be more stable.

Ironically pulseaudio’s memory grows linearly in dom0 with the number of started VMs.

How do you track this? Just by looking at the output of something like top?

1 Like

Not my experience.

How can we apply this to an EFI boot.

In my current install I have no file at /etc/default/grub
But I have in /boot/efi/EFI/qubes/xen.cfg that seems to be the correct file to modify.

Do I edit the file directly or there is a similar procedure with grub2-mkconfig ?

Thanks for your help on that matter,
Guillaume

So based on that link, I applied below procedure :slight_smile:

  1. duplicate folder /boot/efi/EFI/qubes into one named qubes2
    cp -avr -- /boot/efi/EFI/qubes /boot/efi/EFI/qubes2

  2. edit file xen.cfg in qubes2 folder to adapt options parameter dom0_mem=max:8192M and save

  3. identify your boot partition disk with df /boot/efi or lsblk command

  4. check the actual boot configuration with efibootmgr -v

  5. add new boot and makes it first priority with command below to adapt to your hdd partition (-d and -p) and .efi correct path (-l) and desired name (-L)
    efibootmgr -v -c -u -L Qubes2 -l /EFI/qubes2/xen.efi -d /dev/sda -p 1

  6. reboot and check BIOS to make sure you boot on the correct one

It did boot correctly but when arriving at login it seems my usb doesn’t respond nor for mouse or keyboard or yubikey, at luks it did works tho.

How can I update xen configuration to apply RAM value of 8192M ?

Am I really the only one here who cares to have more RAM, or is the EFI thing that is not common ?

Why does standard Qubes OS installation doesn’t pick the max to fit the max available RAM ?

I know quite a lot of users who would have switch to qubesOS but the lack of RAM stopped them to do so, well if the standard install doesn’t even pick your hardware to fit it is surely a miss here…

original post deleted

Hi, everyone, I also have a question on this topic. Memory usage for each Qube is always maxed out at 4000MB, although I think some may need more and I have 32GB of RAM. When I watch videos in a Qube or have many browser tabs open, the video stutters and the websites sometimes crash. Can I increase the memory for the Qube or set it to increase automatically?

Thanks in advance!

The maximum of 4000 MB can be changed in the qube settings. If you switch on the tick below, the memory management will adjust RAM on the fly up to this value. Depending on your resources bottleneck, increasing the max memory might help with the video shutter.

OK thanks! If I increase the RAM capacity, the Qube always uses exactly as much memory as the maximum indicates, is the RAM then also in use or is it only theoretically available? And I have another question, which doesn’t fit the topic of RAM, but maybe it’s still possible, what are the pre-installed Qubes for, such as Personal, Work and so on, because I can’t install any additional software in the AppVMs anyway?

AFAIK this memory is available for other qubes when needed.

It’s better to create new topics for different questions, otherwise other users won’t find the answer.

Of course you can install software in AppVMs (via templates).

See also:

OK thank you!!

»My« dom0 doesn’t accept reducing memory via

sudo nano etc/default/grub
GRUB_CMDLINE_XEN_DEFAULT="... dom0_mem=max:2048M ..."
grub2-mkconfig -o /boot/grub2/grub.cfg

What am I missing here?

Thanks in advance!

Mine does.

To give more info. “My computer behaves strangely” diagnoses do not help.
How do you know dom0 doesn’t accept it?

xl list in dom0 terminal and Open Qube Manager in panel are showing the default 4000+ RAM/memory after reboot with new grub.cfg. No error messages during generating grub config file. found theme, found linux image, found initrd image.

Qubes 4.1
dom0 5.10.104-3.fc32.qubes.x86_64