fix(partitioning): lower swap minimum from 4GB to 2GB for small VMs
This commit is contained in:
@@ -152,6 +152,6 @@ partitioning_swap_size_gb: >-
|
|||||||
((partitioning_memory_mb / 1024) >= 16.0)
|
((partitioning_memory_mb / 1024) >= 16.0)
|
||||||
| ternary(
|
| ternary(
|
||||||
(partitioning_memory_mb / 2048) | int,
|
(partitioning_memory_mb / 2048) | int,
|
||||||
[partitioning_memory_mb / 1024, 4.0] | max | int
|
[partitioning_memory_mb / 1024, 2.0] | max | int
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
#
|
#
|
||||||
# Swap sizing:
|
# Swap sizing:
|
||||||
# - RAM >= 16 GB → swap = RAM/2 (in GB)
|
# - 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))
|
# - Capped to: min(target, 4 + max(disk - overhead, 0))
|
||||||
# - Further capped to: max available after subtracting reserved + CIS + extent reserve + 4 GB buffer
|
# - 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)
|
((partitioning_memory_mb | float / 1024) >= 16.0)
|
||||||
| ternary(
|
| ternary(
|
||||||
(partitioning_memory_mb | float / 2048),
|
(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
|
if system_cfg.features.swap.enabled | bool
|
||||||
|
|||||||
Reference in New Issue
Block a user