How i can disable swap (incl. zram) on Asus TinkerBoard?
I tried swapoff -a; /DietPi/dietpi/func/dietpi-set_dphys-swapfile 0 /var/swap
and removing any matching reference found in /etc/fstab
but it didn't help.
cat /proc/swaps
outputs zram partitions.
Required Information:
@GR3S
Just had had a look into zram:
But I am wondering why those are active since zram seems to require an additional APT package: zram-config
Does swapon -s
show the zram swaps as well?
Futher reading: Hmm on Debian zram-config is not available, but zram-tools instead, although only on Buster: https://packages.debian.org/buster/zram-tools
Formaly it was called compcache and indeed there seems to be no Debian package to handle or enable them user friendly. But by default it should not be active. So I guess if this is indeed your case, that TinkerOS somehow hardcoded it or has some service active by default.
Could you print: systemctl -l
This should list all active boot services so we can check if there is anything unordinary or directly related to zram initialization.
But totally apart from the actual question:
Perhaps we can add zram handling by times, although not before Debian Buster is released and the majority of our SBC images migrated.
Thx for the detailed answer.
I want to install Kubernetes and it requires a disabled swap.
I am familiar with the benefits of using zram, but not sure that the Kubernetes will work without problems.
I found the following solution to disable zram:
edit /etc/default/armbian-zram-config
and set ENABLED=false
and systemctl disable armbian-zram-config
@GR3S
Ah, does this come from any APT package?
dpkg -S /etc/default/armbian-zram-config
Strange since I didn't find this on our image. When did you download the image?
On fresh installation:
root@DietPi:~# dpkg -S /etc/default/armbian-zram-config
dpkg-query: no path found matching pattern /etc/default/armbian-zram-config
root@DietPi:~# dpkg -S /usr/lib/armbian/armbian-zram-config
linux-stretch-root-next-tinkerboard: /usr/lib/armbian/armbian-zram-config
https://dietpi.com/downloads/images/DietPi_ASUSTB-ARMv7-Stretch.7z - downloaded on 19 apr
Checksums (sha256):
3d26fba8ae87f0d2d3674fee47a92bf254504b59caaa899f3129af35c2a1ea91 DietPi_ASUSTB-ARMv7-Stretch.7z
33707ed2f471f4b077a6116667d26aa2acaea2b385c2c06839c8b33a199b0b8b DietPi_v6.18_ASUSTB-ARMv7-Stretch.img
Okay I checked the ARMbian repo:
linux-<distro>-root-<branch>-<device>
packages are core packages of the ARMbian system and we preserve it for our images.Replaces: zram-config
so ship an own zRam implementation, at least with the current version.So yeah actually I think it can be quite useful but should not be enabled automatically. I will think it through, perhaps even skip the whole APT package as it anyway doubles some of features.
Conflicts/bugs RAMlog in case: https://dietpi.com/phpbb/viewtopic.php?p=18548#p18548
DietPi-PREP already has this inside, but especially zRam came with a recent update of the linux-root-* package from the ARMbian repo.
With the above bug, I think it is now time to disable/remove it. While zRam is generally a nice idea, it should not be active without user knowledge. Generally IMO a swapfile on an external drive is generally the best solution if hardware RAM is too rare.
Long term a nicer solution has to be found. Every package update will at least reinstall all the files.
@rpecb
Do you have time and mood to runs the above tests, would appreciate? 馃檪
Most helpful comment
Thx for the detailed answer.
I want to install Kubernetes and it requires a disabled swap.
I am familiar with the benefits of using zram, but not sure that the Kubernetes will work without problems.
I found the following solution to disable zram:
edit
/etc/default/armbian-zram-config
and set ENABLED=falseand
systemctl disable armbian-zram-config