fix(partitioning): lower swap minimum from 4GB to 2GB for small VMs

This commit is contained in:
2026-02-21 01:19:23 +01:00
parent eb63a4fa83
commit 53e4499d2b
2 changed files with 3 additions and 3 deletions

View File

@@ -5,7 +5,7 @@
#
# Swap sizing:
# - RAM >= 16 GB → swap = RAM/2 (in GB)
# - RAM < 16 GB → swap = max(RAM_GB, 4)
# - RAM < 16 GB → swap = max(RAM_GB, 2)
# - Capped to: min(target, 4 + max(disk - overhead, 0))
# - Further capped to: max available after subtracting reserved + CIS + extent reserve + 4 GB buffer
#
@@ -48,7 +48,7 @@
((partitioning_memory_mb | float / 1024) >= 16.0)
| ternary(
(partitioning_memory_mb | float / 2048),
[(partitioning_memory_mb | float / 1024), 4] | max | float
[(partitioning_memory_mb | float / 1024), 2] | max | float
)
)
if system_cfg.features.swap.enabled | bool