Skip to content
This repository was archived by the owner on Jul 15, 2025. It is now read-only.

Commit fb590c6

Browse files
committed
tune swappiness
1 parent 588f67c commit fb590c6

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

bootstrap/kernel.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
set -xe
44

55
apk add linux-rpi linux-rpi4 raspberrypi-bootloader zram-init
6+
rc-update add zram-init boot
67

78
echo "modules=loop,squashfs,sd-mod,usb-storage root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes console=tty1 rootwait quiet" > /boot/cmdline.txt
89

@@ -31,4 +32,9 @@ cat <<EOF > /etc/fstab
3132
/dev/mmcblk0p2 / ext4 defaults,noatime 0 1
3233
EOF
3334

34-
rc-update add zram-init boot
35+
cat <<EOF >> /etc/sysctl.conf
36+
vm.vfs_cache_pressure=500
37+
vm.swappiness=100
38+
vm.dirty_background_ratio=1
39+
vm.dirty_ratio=50
40+
EOF

0 commit comments

Comments
 (0)