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

It’s grub2-mkconfig.

2 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