#
…

2024-11-27

03:19tobhe_ has joined #ubuntu-asahi
03:26tobhe has quit [Ping timeout: 480 seconds]
10:23hwpplayer1 has joined #ubuntu-asahi
12:45hwpplayer1 has quit [Remote host closed the connection]
13:31jhlee has joined #ubuntu-asahi
20:16nukeleti think enabling zswap + swap would be great for the users; i've been daily-driving the config used in fedora asahi (12GB swapfile + zswap) for a few days and it improved my experience quite a bit (even on my 16GB machine i still run into awkward OOM scenarios sometimes)
20:16nukeleton 8GB i think it would make even more of an impact
20:27tobhe_thanks, well since asahi is in the process of switching over to zswap that is likely what we would do too
20:27tobhe_ is now known as tobhe
20:27tobhebut I agree that this is overdue
20:35nukeleti would like to help with this, but i'd need some help figuring things out; i'm familiar with the ubuntu kernel packaging bits, but that's about it :')
20:39nukeletand these changes are not really kernel-specific as we would need to basically just run a couple scripts to create a swapfile + add it to fstab, and then enable zswap either through kernel cmdline options in grub (this has some important caveats), or do it the fedora asahi way and write to the relevant files in /sys/module/zswap/parameters to
20:39nukeletenable/configure zswap upon boot (and critically, after systemd is brought up and /lib/modules is made available)
20:41nukeletwhat would be the best way to achieve this? maybe through a new package?
21:01tobhe[m]I haven't looked at the script in detail yet but I think we would do this in the postinst hook of our ubuntu-asahi meta package
21:02tobhe[m]oh no it actually is a first-boot script. so install a script with the meta package and add a first-boot systemd service I guess
21:03tobhe[m]but I think the zram stuff doesn't need to be done at runtime or does it?
21:11nukeletwe could do it as kernel cmdline options but then we would need to make sure the relevant modules for the compression algorithm we're using for zswap are included in the initramfs (otherwise we panic early in boot)
21:12tobhe[m]that shouldn't be too hard
21:12tobhe[m]they could even be built-in
21:13nukeletright, i guess i could confirm with the asahi people first if i'm missing some other less obvious reason for doing it at runtime
21:14tobhe[m]well migrating has to be done at runtime
21:14tobhe[m]if we want to enable it on existing installations
21:16nukeletwe could migrate upon reboot, no? i was under the impression that the tmpfile script fedora is using to write to /sys/moduke/zswap is run by systemd-tmpfile during boot
21:18nukeleti think migrating during runtime can be weird especially if the ram is already somewhat full (with the need to reserve a chunk of it for the zswap pool)
21:20tobhe[m]makes sense yes
21:23tobhe[m]but we still don't really have anything to migrate except custom setups since we never shipped a default
21:24tobhe[m]question is how do we make sure those don't break badly
21:26tobhe[m]if we ship a kernel cmdline file in /etc/default/grub.d and make sure the modules I don't see a lot of potential fallout. there is no zram default we need to disable
21:27tobhe[m]what we do need is a way to enable swap in new installations
21:28tobhe[m]I guess an argument for creating everything on first boot is that it doesn't make a lot of sense to ship and install an empty 12GB swap file
…