New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
heads up, PR to drop legacy swap startup in fedora kickstarts #133
Comments
@FGrose Can you take a look at this and see what we need to do, if anything? |
re: There's an unrelated zram package in Fedora being used mainly by IoT folks right now And work on a generic solution in systemd Ideally this will converge on the systemd zram generator, and use that in base as a generic swap on zram implementation. And at that time it'll make sense for anaconda folks to depend on it, and livecd-tools can more seriously consider dropping swapfiles. Until the dust settles, I don't think it makes sense to flat out break livecd-tools --swap-size-mb, so looking at: |
Yeah, that probably makes sense... |
Another factor in favor of swap on zram, and livecd-tools dropping swapfiles in favor of it, is the security angle. The swapfile isn't encrypted. |
I just want to give livecd-tools folks a heads up in case they want to nack this PR:
https://pagure.io/fedora-kickstarts/pull-request/544#
Anaconda now automatically starts swap on ZRAM on low memory systems, so doing
swapon
for existing swap partitions isn't necessary. But then I thought, oh maybe someone uses livecd-iso-to-disk for a portable system and needs/wants --swap-size-mb flag to create a swapfile, and if so my PR, if merged, would mean the swapfile is silently not used.Two alternatives to the proposed clean up:
Changing the swapon section to apply only to /run/initramfs/live/${livedir}/swap.img so that no other swap partition or LV is enabled.
Drop --swap-size-mb in favor of e.g. --swapforce which would add two boot parameters
inst.zram=1 systemd.wants=zram.service
. I've tested this on a VM with 3G RAM, and the first option causes anaconda/zramswapon to be forced even if memory is more than 2G, and the second directly starts zram.service rather than requiring anaconda to be launched.Using swap on ZRAM will give way better performance than swapfile on flash drive.
The text was updated successfully, but these errors were encountered: