#75 enable zram.service on Live install media
Closed: Fixed 5 years ago by catanzaro. Opened 5 years ago by chrismurphy.

Anaconda includes zram.service which will setup a zram (compressed memory) block device, mkswap on it, then swapon. On netinstallers, this service is enabled by default, and enables swap on zram before anaconda launches.

This service isn't enabled on Live media. Let's enable it for Fedora 29 Live media.

The catch: Enabling it for Live media, but not installed systems (pending further decision making on partitioning and swap options). This conservative approach, makes it viable for Fedora 29 as an fix + optimization to avoid fatal memory pressure problems in the 1.5G - 2.5G available memory case. Whereas enabling it on the installed system needs further discussion, evaluation, and decision making.

I think this can be done by modifying the zram.service file to include:
ConditionKernelCommandLine=rd.live.image

Or maybe there's a way to make 'vendor preset' disabled as-installed.

References:
https://github.com/rhinstaller/anaconda/blob/master/data/systemd/zram.service
https://github.com/rhinstaller/anaconda/blob/master/scripts/zramswapon
https://bugzilla.redhat.com/show_bug.cgi?id=1562278


This seems silly to me. Memory pressure should not be an issue in live systems. Is anyone planning to do performance-intensive computing without installing the OS?

IMO the live system should match whatever we do for the installed system. We're already considering zram for the installed system in #56.

I think it makes sense to enable it for live media. The live media is always under more memory pressure than the final system because it needs to keep the filesystem overlay backed to ram.

@chrismurphy, any chance you could ask for a freeze exception for F29 beta, so that it if we enable it, it can get some testing before the final release?

The original idea was issue 75 (this one) was about live environment only; and issue 56 was about the installed environment. Anyway I think both issues can be closed, and I'll create a new issue to discuss swap problems some people are experiencing.

Note: anaconda during installation simultaneously enables swap on disk and disables zram (soon after the user clicks on begin installation). Therefore think of zram.service as short lived, it helps alleviate memory pressure in the sub 2.5GB RAM edge case, during startup of GNOME and anaconda.

Just an FYI this is not enabled on Fedora-Workstation-Live-x86_64-30-20190224.n.0.iso

Um, we seem to have two issues for this. And Pagure doesn't have duplicate issue functionality.

I'm going to close this in favor of #56. Let's continue discussion there. It seems we've already approved zram for live systems, but not installed systems. Seems nobody has volunteered to implement.

Metadata Update from @catanzaro:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

5 years ago

Pretty sure #75 is only about making LiveOS media behave like netinst which already has zram.service enabled by default.

And #56 is about making zram enabled in lieu of a swap partition on the installation target.

In #56 we agreed to enable zram only on live media, not on installation target. That's the issue where you have WG approval already. No need for two separate issues!

Login to comment on this ticket.

Metadata