mirror of
https://github.com/home-assistant/operating-system.git
synced 2026-07-13 01:36:29 +01:00
c5122371e4
The rule using 33% of RAM for default swapfile size had flaws both for low and high RAM systems - for the former the swap was too small to provide any buffer for OOM situations, for the latter it created unnecessarily big swapfile. Clamp the swapfile size to 1-4 GB. This means the file will somewhat grow on systems with 1 or 2 GB of RAM, but this should be within bounds of what's reported by HA as low storage. For systems with >12 GB of RAM, the swap file wouldn't be created larger than 4 GB (in fact, will be recreated if bigger). The configured size is still respected. Closes #4481