From fb590c6dab91f70952c77d9d82e60041995a9f2b Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Sat, 17 Jul 2021 12:20:57 +0200 Subject: [PATCH] tune swappiness --- bootstrap/kernel.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bootstrap/kernel.sh b/bootstrap/kernel.sh index b8a80ee..9a060f7 100755 --- a/bootstrap/kernel.sh +++ b/bootstrap/kernel.sh @@ -3,6 +3,7 @@ set -xe apk add linux-rpi linux-rpi4 raspberrypi-bootloader zram-init +rc-update add zram-init boot 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 @@ -31,4 +32,9 @@ cat < /etc/fstab /dev/mmcblk0p2 / ext4 defaults,noatime 0 1 EOF -rc-update add zram-init boot \ No newline at end of file +cat <> /etc/sysctl.conf +vm.vfs_cache_pressure=500 +vm.swappiness=100 +vm.dirty_background_ratio=1 +vm.dirty_ratio=50 +EOF \ No newline at end of file