Comment 0 for bug 2064483

Revision history for this message
Archer Allstars (archerallstars) wrote :

My sysctl vm.swappiness returns vm.swappiness = 180.

Swap kicked in when RAM is filled around 95%. I’m using zRAM as the swap.

When this happened, my laptop is barely usable, as the system would have to do both the swap and compression at the same time. If `vm.swappiness = 180` worked as intended, the issue wouldn't have happened, as the swap would kick in early, which is good for zRAM system like mine, see kernel docs: https://docs.kernel.org/admin-guide/sysctl/vm.html#swappiness

This is my main workstation (laptop). I used to run openSUSE Tumbleweed on it (~2 years). The experience with `vm.swappiness` is totally different.

---

Here's my zRAM script:

```
#!/bin/bash

mem_total_kb=$(grep MemTotal /proc/meminfo | grep -E --only-matching '[[:digit:]]+')
mem_total=$((mem_total_kb * 1536))

modprobe zram

echo zstd > /sys/block/zram0/comp_algorithm;
echo $mem_total > /sys/block/zram0/disksize

mkswap /dev/zram0

swapon -p 100 /dev/zram0

```

Here's the content of my /etc/sysctl.conf

```
vm.swappiness=180
vm.page-cluster=0
vm.watermark_scaling_factor=125
vm.watermark_boost_factor=0
```

I make a fresh install, not upgrading from the previous release.

I also upload the screen recording of this issue on my personal Proton drive here:

https://drive.proton.me/urls/5KTCS1DF58#qZTscuv5XE0M

I mount ~/ramtest in the RAM, then copy the system's usr folder to ~/ramtest. Since most contents in usr are compressible, it should be perfect to show this issue.