Enlarge /tmp and /dev/shm

Initial size of those tmpfs-mounted directories is calculated as 50% of
RAM at VM startup time. Which happen to be quite small number, like
150M. Having such small /tmp and/or /dev/shm apparently isn't enough for
some applications like Google chrome. So set the size statically at 1GB,
which would be the case for baremetal system with 2GB of RAM.

Fixes QubesOS/qubes-issues#1003
This commit is contained in:
Marek Marczykowski-Górecki 2015-10-04 23:07:10 +02:00
parent ff40be9c99
commit 2a39adfe0f
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724
4 changed files with 7 additions and 1 deletions

View File

@ -54,6 +54,7 @@ DROPIN_DIR ?= "lib/systemd/system"
# Fedora Dropins # Fedora Dropins
DROPINS := chronyd.service crond.service cups.service cups.path cups.socket ModemManager.service DROPINS := chronyd.service crond.service cups.service cups.path cups.socket ModemManager.service
DROPINS += NetworkManager.service NetworkManager-wait-online.service ntpd.service getty@tty.service DROPINS += NetworkManager.service NetworkManager-wait-online.service ntpd.service getty@tty.service
DROPINS += tmp.mount
# Debian Dropins # Debian Dropins
ifeq ($(shell lsb_release -is), Debian) ifeq ($(shell lsb_release -is), Debian)

View File

@ -5,7 +5,7 @@
/dev/xvdb /rw auto noauto,defaults,discard 1 2 /dev/xvdb /rw auto noauto,defaults,discard 1 2
/rw/home /home none noauto,bind,defaults 0 0 /rw/home /home none noauto,bind,defaults 0 0
/dev/xvdc1 swap swap defaults 0 0 /dev/xvdc1 swap swap defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0 tmpfs /dev/shm tmpfs defaults,size=1G 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0 devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0 sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0 proc /proc proc defaults 0 0

View File

@ -555,6 +555,7 @@ The Qubes core startup configuration for SystemD init.
/lib/systemd/system/NetworkManager.service.d/30_qubes.conf /lib/systemd/system/NetworkManager.service.d/30_qubes.conf
/lib/systemd/system/NetworkManager-wait-online.service.d/30_qubes.conf /lib/systemd/system/NetworkManager-wait-online.service.d/30_qubes.conf
/lib/systemd/system/ntpd.service.d/30_qubes.conf /lib/systemd/system/ntpd.service.d/30_qubes.conf
/lib/systemd/system/tmp.mount.d/30_qubes.conf
%post systemd %post systemd

View File

@ -0,0 +1,4 @@
[Mount]
# Default initial size is '50%' (of physical RAM at system startup)
# Because of memory ballooning this happen to be very low number
Options=mode=1777,strictatime,size=1G