Hi,
This is a systemd generator for setting up swap on zram. If a configuration file, /etc/systemd/zram-generator.conf, does not exist, nothing happens. If it does exist, a zram device is created, swap-create(a)zram0.service is created and started, which does mkswap and swapon using the same systemd logic found with either GPT swap autodiscovery (using partition type GUID) and /dev/urandom based swap.
https://github.com/systemd/zram-generator
This has been packaged in Fedora as 'zram-generator'. While zram package works fine and I see no problems with it, I'm liking the idea of converging on zram-generator, to use existing logic, maintenance and bug fixing. It's also an example of a generator made in Rust.
I've found a few issues, reported upstream, but I don't think any of them negatively impact IoT.
https://github.com/systemd/zram-generator/issues
There's maybe a 50/50 chance we'll get this going in Workstation for Fedora 32 in lieu of a conventional swap partition (pretty much what IoT has been doing from the start, correct?). But I expect to propose it as a system-wide change for Fedora 33. The idea is to make the generator available system wide; and then we can discuss whether to:
1. enable it by default, by including a one size fits all configuration; which any edition/spin can opt-out by either deleting the configuration file or substituting it with their own
2. not enable it by default, by not including a configuration file; which any edition/spin can opt-in by including their own configuration file
3. what might possibly make sense as the most universal on size fits all configuration
Based on the anaconda zram setup; the zram package setup; brief discussion upstream, and my own testing, I've arrived at:
Create a zram device the same size as RAM (i.e. 1:1 ratio), with a cap of 2G or 4G.
The rationale is, upstream says a zram device twice that of RAM is sane because expected compression ratio is 2:1. But going above that really makes no sense. Therefore a 1:1 ratio is conservative enough, but it's also reasonable to go with 1:2 (1/2 that of RAM, for the zram device size), depending on what IoT folks experience has been thus far. The ratio will affect small RAM devices more then workstations and servers, which I expect will pretty much always be subject to the cap.
But if this isn't what upstream zram folks want to do, then it's not a big deal to just have a use case specific configuration files.
=================================================
#fedora-meeting: Fedora IoT Working Group Meeting
=================================================
Meeting started by pbrobinson at 14:02:00 UTC. The full logs are
available at
https://meetbot.fedoraproject.org/fedora-meeting/2020-01-15/fedora_iot_work…
.
Meeting summary
---------------
* roll call (pbrobinson, 14:02:01)
* 1) ==== Working Group process and admin ==== (pbrobinson, 14:03:50)
* 2) ==== Fedora Rawhide AKA F-32 ==== (pbrobinson, 14:12:30)
* 3) ==== Fedora 31 ==== (pbrobinson, 14:17:39)
* there's a new compose, will be doing another one shortly so please
test (pbrobinson, 14:18:02)
* 4) ==== Open Floor ==== (pbrobinson, 14:24:12)
Meeting ended at 14:39:37 UTC.
Action Items
------------
Action Items, by person
-----------------------
* **UNASSIGNED**
* (none)
People Present (lines said)
---------------------------
* pbrobinson (31)
* puiterwijk (21)
* pwhalen (18)
* zodbot (6)
* bcotton (4)
* jsmith (2)
* tdawson (1)
Generated by `MeetBot`_ 0.1.4
.. _`MeetBot`: http://wiki.debian.org/MeetBot
=================================================
#fedora-meeting: Fedora IoT Working Group Meeting
=================================================
Meeting started by pbrobinson at 14:02:22 UTC. The full logs are
available at
https://meetbot.fedoraproject.org/fedora-meeting/2020-01-08/fedora_iot_work…
.
Meeting summary
---------------
* roll call (pbrobinson, 14:02:22)
* 1) ==== Working Group process and admin ==== (pbrobinson, 14:05:42)
* 2) ==== Fedora Rawhide AKA F-32 ==== (pbrobinson, 14:08:53)
* 3) ==== Fedora 31 ==== (pbrobinson, 14:20:17)
* latest compose being promoted today, new compose happening once
that's done (pbrobinson, 14:29:28)
* next compose will have the 5.4.x kernel (pbrobinson, 14:29:40)
* 4) ==== Open Floor ==== (pbrobinson, 14:29:45)
Meeting ended at 14:33:01 UTC.
Action Items
------------
Action Items, by person
-----------------------
* **UNASSIGNED**
* (none)
People Present (lines said)
---------------------------
* pbrobinson (26)
* pwhalen (12)
* puiterwijk (7)
* zodbot (6)
* jsmith (2)
* bcotton (1)
Generated by `MeetBot`_ 0.1.4
.. _`MeetBot`: http://wiki.debian.org/MeetBot