Skip to content

Commit 979996f

Browse files
committed
Base. Reduced swap size to 5GB only
1 parent 6675342 commit 979996f

File tree

1 file changed

+2
-5
lines changed
  • lib/base/lib/assets/user-data

1 file changed

+2
-5
lines changed

lib/base/lib/assets/user-data/node.sh

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,8 @@ if [ -f /swapfile ]; then
119119
fi
120120

121121
# Create a new swap file
122-
total_mem=$(grep MemTotal /proc/meminfo | awk '{print $2}')
123-
# Calculate the swap size
124-
swap_size=$((total_mem / 3))
125-
# Convert the swap size to MB
126-
swap_size_mb=$((swap_size / 1024))
122+
# Set swap size to fixed 5 GB
123+
swap_size_mb=5120
127124
unit=M
128125
fallocate -l $swap_size_mb$unit /swapfile
129126
chmod 600 /swapfile

0 commit comments

Comments
 (0)