Skip to content

Commit b7cc353

Browse files
committed
Reduce udev max children count on minimal VMs
Udev child uses between 2-5 MB each. With the default of 10, that's significant part of memory of sys-net/sys-usb. Reduce to 2. This will slow down startup a bit, but since those VMs have 2 vCPUs by default anyway, not by much. QubesOS/qubes-issues#10886
1 parent d19d121 commit b7cc353

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

vm-systemd/setup-minimal-vm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,17 @@ disable_zram() {
4242
fi
4343
}
4444

45+
limit_udev() {
46+
udevadm control --children-max=2
47+
}
48+
4549
if is_minimal_netvm; then
4650
setup_minimal_netvm
51+
limit_udev
4752
disable_zram
4853
fi
4954

5055
if is_minimal_usbvm; then
56+
limit_udev
5157
disable_zram
5258
fi

0 commit comments

Comments
 (0)