[Bug 2064483] [NEW] Ubuntu 24.04 doesn't respect vm.swappiness
Public bug reported: 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. ** Affects: ubuntu Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2064483 Title: Ubuntu 24.04 doesn't respect vm.swappiness To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+bug/2064483/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2064483] Re: Ubuntu 24.04 doesn't respect vm.swappiness
** Attachment added: "The screen recording of this issue. I didn't know I can attach file. This is the same recording as the one in OP." https://bugs.launchpad.net/ubuntu/+bug/2064483/+attachment/5773508/+files/Ubuntu%2024.04%20doesn%27t%20respect%20vm.swappiness.mp4 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2064483 Title: Ubuntu 24.04 doesn't respect vm.swappiness To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+bug/2064483/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2064483] Re: Ubuntu 24.04 doesn't respect vm.swappiness
I add a test on Tumbleweed in KVM with vm.swappiness=180. The result is as expected, it's not broken in Tumbleweed. With vm.swappiness=180 the swap kicked in at around 55% of RAM filled, not 95%. And it will maintain this free space percentage, depending on the compression ratio of the data that's being swapped. ** Attachment added: "Tumbleweed respects vm.swappiness.mp4" https://bugs.launchpad.net/ubuntu/+bug/2064483/+attachment/5773788/+files/Tumbleweed%20respects%20vm.swappiness.mp4 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2064483 Title: Ubuntu 24.04 doesn't respect vm.swappiness To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+bug/2064483/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2064483] Re: Ubuntu 24.04 doesn't respect vm.swappiness
To make sure that vm.swappiness is really contribute to the tendency to swap of the kernel as documented, I also did a test on Tumbleweed with vm.swappiness=60, which is the default value. The test result is as expected, the swap kicked in late compared to vm.swappiness=180. And not only that, the system doesn't try to maintain the free space in RAM. ** Attachment added: "Tumbleweed vm.swappiness60.mp4" https://bugs.launchpad.net/ubuntu/+bug/2064483/+attachment/5773789/+files/Tumbleweed%20vm.swappiness60.mp4 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2064483 Title: Ubuntu 24.04 doesn't respect vm.swappiness To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+bug/2064483/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2064483] Re: Ubuntu 24.04 doesn't respect vm.swappiness
I have done the test with free -m outputs with vm.swappiness=180 on Ubuntu 24.04. ** Attachment added: "Ubuntu 24.04 doesn't respect vm.swappiness -- free -m.mp4" https://bugs.launchpad.net/ubuntu/+bug/2064483/+attachment/5773790/+files/Ubuntu%2024.04%20doesn%27t%20respect%20vm.swappiness%20--%20free%20-m.mp4 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2064483 Title: Ubuntu 24.04 doesn't respect vm.swappiness To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+bug/2064483/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2064483] Re: Ubuntu 24.04 doesn't respect vm.swappiness
I have done the test with free -m outputs with vm.swappiness=180 on Tumbleweed. ** Attachment added: "Tumbleweed respects vm.swappiness -- free -m.mp4" https://bugs.launchpad.net/ubuntu/+bug/2064483/+attachment/5773791/+files/Tumbleweed%20respects%20vm.swappiness%20--%20free%20-m.mp4 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2064483 Title: Ubuntu 24.04 doesn't respect vm.swappiness To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+bug/2064483/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2064483] Re: Ubuntu 24.04 doesn't respect vm.swappiness
apport information ** Tags added: apport-collected noble wayland-session ** Description changed: 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. + 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. + --- + ProblemType: Bug + ApportVersion: 2.28.1-0ubuntu2 + Architecture: amd64 + AudioDevicesInUse: + USERPID ACCESS COMMAND + /dev/snd/seq:archerallstars F pipewire + /dev/snd/controlC0: archerallstars 4448 F wireplumber + CRDA: N/A + CasperMD5CheckResult: pass + CurrentDesktop: ubuntu:GNOME + DistroRelease: Ubuntu 24.04 + InstallationDate: Installed on 2024-04-27 (5 days ago) + InstallationMedia: Ubuntu 24.04 LTS "Noble Numbat" - Release amd64 (20240424) + MachineType: Acer Swift SF514-52T + NonfreeKernelModules: zfs + Package: linux (not installed) + ProcFB: 0 i915drmfb + ProcKernelCmdLine: BOOT_IMAGE=/BOOT/ubuntu_o799y4@/vmlinuz-6.8.0-31-generic root=ZFS=rpool/ROOT/ubuntu_o799y4 ro quiet splash vt.handoff=1 + ProcVersionSignature: Ubuntu 6.8.0-31.31-generic 6.8.1 + PulseList: Error: command ['pacmd', 'list'] failed with exit code 1: No PulseAudio daemon running, or not running as session daemon. + RelatedPackageVersions: + linux-restricted-modules-6.8.0-31-generic N/A + linux-backports-modules-6.8.0-31-generic N/A + linux-firmware20240318.git3b128b60-0ubuntu2 + Tags: noble wayland-session + Uname: Linux 6.8.0-31-generic x86_64 + UpgradeStatus: No upgrade log present (probably fresh install) + UserGroups: adm cdrom dip libvirt lpadmin plugdev sudo users + _MarkForUpload: True + dmi.bios.date: 11/26/2018 + dmi.bios.release: 1.11 + dmi.bios.vendor: Insyde Corp. + dmi.bios.version: V1.11 + dmi.board.name: Carlsberg_KL + dmi.board.vendor: KBL + dmi.board.version: V1.11 + dmi.chassis.type: 10 + dmi.chassis.vendor: Acer + dmi.chassis.version: V1.11 + dmi.ec.firmware.release: 1.5 + dmi.modalias: dmi:bvnInsydeCorp.:bvrV1.11:bd11/26/2018:br1.11:efr1.5:svnAcer:pnSwiftSF514-52T:pvrV1.11:rvnKBL:rnCarlsberg_KL:rvrV1.11:cvnAcer:ct10:cvrV1.11:sku: + dmi.product.family: Swift 5 + dmi.product.name: Swift SF514-52T + dmi.product.sku: + dmi.product.version: V1.11 + dmi.sys.vendor: Acer + modified.conffile..etc.default.apport: + # set this to 0 to disable apport, or to 1 to enable it + # you can temporarily override this with + # sudo service apport start force_start=1 + enabled=0 + mtime.conffile..etc.default.apport: 2024-04-27T05:52:33.862578 ** Attachment added: "AlsaInfo.txt" https://bugs.launchpad.net/bugs/2064483/+attachment/5773792/+files/AlsaInfo.txt -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2064483 Title: Ubuntu 24.04 doesn't respect vm.swappiness To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2064483/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2064483] CurrentDmesg.txt
apport information ** Attachment added: "CurrentDmesg.txt" https://bugs.launchpad.net/bugs/2064483/+attachment/5773793/+files/CurrentDmesg.txt -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2064483 Title: Ubuntu 24.04 doesn't respect vm.swappiness To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2064483/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2064483] IwConfig.txt
apport information ** Attachment added: "IwConfig.txt" https://bugs.launchpad.net/bugs/2064483/+attachment/5773794/+files/IwConfig.txt -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2064483 Title: Ubuntu 24.04 doesn't respect vm.swappiness To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2064483/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2064483] Lspci.txt
apport information ** Attachment added: "Lspci.txt" https://bugs.launchpad.net/bugs/2064483/+attachment/5773795/+files/Lspci.txt -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2064483 Title: Ubuntu 24.04 doesn't respect vm.swappiness To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2064483/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2064483] Lsusb.txt
apport information ** Attachment added: "Lsusb.txt" https://bugs.launchpad.net/bugs/2064483/+attachment/5773797/+files/Lsusb.txt -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2064483 Title: Ubuntu 24.04 doesn't respect vm.swappiness To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2064483/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2064483] Lsusb-t.txt
apport information ** Attachment added: "Lsusb-t.txt" https://bugs.launchpad.net/bugs/2064483/+attachment/5773798/+files/Lsusb-t.txt -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2064483 Title: Ubuntu 24.04 doesn't respect vm.swappiness To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2064483/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2064483] Lsusb-v.txt
apport information ** Attachment added: "Lsusb-v.txt" https://bugs.launchpad.net/bugs/2064483/+attachment/5773799/+files/Lsusb-v.txt -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2064483 Title: Ubuntu 24.04 doesn't respect vm.swappiness To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2064483/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2064483] ProcCpuinfo.txt
apport information ** Attachment added: "ProcCpuinfo.txt" https://bugs.launchpad.net/bugs/2064483/+attachment/5773801/+files/ProcCpuinfo.txt -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2064483 Title: Ubuntu 24.04 doesn't respect vm.swappiness To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2064483/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2064483] ProcCpuinfoMinimal.txt
apport information ** Attachment added: "ProcCpuinfoMinimal.txt" https://bugs.launchpad.net/bugs/2064483/+attachment/5773802/+files/ProcCpuinfoMinimal.txt -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2064483 Title: Ubuntu 24.04 doesn't respect vm.swappiness To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2064483/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2064483] ProcEnviron.txt
apport information ** Attachment added: "ProcEnviron.txt" https://bugs.launchpad.net/bugs/2064483/+attachment/5773803/+files/ProcEnviron.txt -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2064483 Title: Ubuntu 24.04 doesn't respect vm.swappiness To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2064483/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2064483] Lspci-vt.txt
apport information ** Attachment added: "Lspci-vt.txt" https://bugs.launchpad.net/bugs/2064483/+attachment/5773796/+files/Lspci-vt.txt -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2064483 Title: Ubuntu 24.04 doesn't respect vm.swappiness To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2064483/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2064483] PaInfo.txt
apport information ** Attachment added: "PaInfo.txt" https://bugs.launchpad.net/bugs/2064483/+attachment/5773800/+files/PaInfo.txt -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2064483 Title: Ubuntu 24.04 doesn't respect vm.swappiness To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2064483/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2064483] ProcInterrupts.txt
apport information ** Attachment added: "ProcInterrupts.txt" https://bugs.launchpad.net/bugs/2064483/+attachment/5773804/+files/ProcInterrupts.txt -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2064483 Title: Ubuntu 24.04 doesn't respect vm.swappiness To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2064483/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2064483] RfKill.txt
apport information ** Attachment added: "RfKill.txt" https://bugs.launchpad.net/bugs/2064483/+attachment/5773806/+files/RfKill.txt -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2064483 Title: Ubuntu 24.04 doesn't respect vm.swappiness To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2064483/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2064483] ProcModules.txt
apport information ** Attachment added: "ProcModules.txt" https://bugs.launchpad.net/bugs/2064483/+attachment/5773805/+files/ProcModules.txt -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2064483 Title: Ubuntu 24.04 doesn't respect vm.swappiness To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2064483/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2064483] acpidump.txt
apport information ** Attachment added: "acpidump.txt" https://bugs.launchpad.net/bugs/2064483/+attachment/5773809/+files/acpidump.txt -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2064483 Title: Ubuntu 24.04 doesn't respect vm.swappiness To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2064483/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2064483] WifiSyslog.txt
apport information ** Attachment added: "WifiSyslog.txt" https://bugs.launchpad.net/bugs/2064483/+attachment/5773808/+files/WifiSyslog.txt -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2064483 Title: Ubuntu 24.04 doesn't respect vm.swappiness To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2064483/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2064483] UdevDb.txt
apport information ** Attachment added: "UdevDb.txt" https://bugs.launchpad.net/bugs/2064483/+attachment/5773807/+files/UdevDb.txt -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2064483 Title: Ubuntu 24.04 doesn't respect vm.swappiness To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2064483/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs