** Description changed:

  [ Impact ]
  
  On the smallest platforms (in particular the Zero 2W and 3A+ with 512MB
  of RAM), the tmpfs mount reduces the available RAM to a dangerous
  degree.
  
  [ Test plan ]
  
  Flash Ubuntu 26.04 resolute to a spare SD card
  
  * Boot on a Pi with less than 8 GB of RAM (e.g. a 3B+ with 1GB will do)
  * findmnt /tmp
  * Check output states /tmp is a tmpfs mount
  * sudo apt install -t resolute-proposed ubuntu-raspi-settings
  * sudo reboot
  * findmnt /tmp
  * Check there is no output (exit code !=0)
  * sudo poweroff
  * Shift SD card to a Pi 5 with >=8GB of RAM and boot
  * findmnt /tmp
  * Check output states /tmp is a tmpfs mount
  
- [ Where things might go wrong ]
+ [ Where things could go wrong ]
  
  If /tmp is persistent there must still be a method to periodically clear
  it. Thankfully, in resolute and stonking /lib/tmpfiles.d/tmp.conf still
  contains an entry for /tmp so that much should be safe.
  
  Disabling tmpfs *may* reduce performance for users with lower amounts of
  RAM, but this is a worthwhile trade-off for avoiding situations where
  critical services like building the initramfs run out of RAM.
  
  The test plan covers both low and high RAM boards, ensuring that the
  desired effect takes place on both.
  
  [ Original description ]
  
  The tmpfs mount is causing serious issues on Pi platforms with lower
  memory sizes. In particular it's preventing creation of boot assets on
  the half-gig platforms, but it also causes memory pressure issues on the
  1GB platforms.
  
  Generally speaking, tmpfs /tmp is probably a terrible idea on anything
  with <8GB of RAM, so add a condition making tmp.mount conditional on
  this (systemd 244 added ConditionMemory which should be sufficient).
  Will also need a tmp.conf for systemd-tmpfiles to ensure the regular
  /tmp directory actually gets cleaned. This probably *can't* be
  conditional on RAM, but it's not going to harm any tmpfs /tmp users
  (just cause a tiny amount of extra I/O cleaning files anyway).
  
  This will need SRU'ing to resolute.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2157975

Title:
  [SRU] Disable tmp.mount when RAM <8GB

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-raspi-settings/+bug/2157975/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to