Re: Fedora 33 System-Wide Change proposal: swap on zram

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 2020-06-07 11:29 p.m., Chris Murphy wrote:
On Sun, Jun 7, 2020 at 11:25 PM Luya Tshimbalanga
<luya@xxxxxxxxxxxxxxxxx> wrote:
On Sun, Jun 7, 2020 at 1:26 PM Luya Tshimbalanga <luya(a)fedoraproject.org&gt; wrote:

zram-generator has no service unit file at all. The zram.service unit
file is part of Anaconda.

Good to know. I proceed to remove on my desktop which has 32 GB RAM.


I'm not sure whose service this is but I don't have it.

After removing both anaconda and zram package, the result is

systemctl status zram-setup@zram0.service
● zram-setup@zram0.service - Setup zram based device zram0
      Loaded: loaded (/usr/lib/systemd/system/zram-setup@.service; static; vendor preset: disabled)
      Active: active (exited) since Sun 2020-06-07 22:08:36 PDT; 4min 57s ago
     Process: 856 ExecStart=/bin/sh -c echo $ZRAM_NUM_STR > /sys/class/block/zram0/max_comp_streams (code=exited, s>
     Process: 879 ExecStart=/bin/sh -c echo $ZRAM_DEV_SIZE > /sys/class/block/zram0/disksize (code=exited, status=1>
     Process: 882 ExecStart=/bin/sh -c [ "$SWAP" = "y" ] && mkswap /dev/zram0 && swapon /dev/zram0 (code=exited, st>
    Main PID: 882 (code=exited, status=1/FAILURE)
         CPU: 4ms
This suggests the mkswap failed which might happen if this device is
already active, and somehow this service is from something else. Maybe
do:

dnf provides /usr/lib/systemd/system/zram-setup@.service

The command revealed udisks2-zram, a module for zram, was the provided package. Once removed it, there no more service related to zram after reboot. I confirm zram is now active as seem on my laptop.

journalctl --no-hostname -b -o  short-monotonic | grep 'swap\|zram'
[    0.468101] kernel: Spectre V1 : Mitigation: usercopy/swapgs barriers and __user pointer sanitization
[    1.395800] kernel: zswap: loaded using pool lzo/zbud
[    1.411736] kernel: Lockdown: swapper/0: hibernation is restricted; see man kernel_lockdown.7
[    4.408224] systemd[1]: Created slice system-swap\x2dcreate.slice.
[    4.448207] kernel: zram: Added device: zram0
[    4.399416] systemd-modules-load[592]: Inserted module 'zram'
[    4.614307] systemd[1]: Found device /dev/zram0.
[    4.614638] systemd[1]: Starting Create swap on /dev/zram0...
[    4.992881] kernel: zram0: detected capacity change from 0 to 7838105600
[    4.697841] mkswap[636]: Setting up swapspace version 1, size = 7.3 GiB (7838101504 bytes) [    4.697841] mkswap[636]: no label, UUID=69e8bc81-6456-470a-be0d-8f3319d11df4
[    4.703285] systemd[1]: swap-create@zram0.service: Succeeded.
[    4.704332] systemd[1]: Finished Create swap on /dev/zram0.
[    4.704783] audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=swap-create@zram0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success' [    4.704876] audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=swap-create@zram0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[    4.711170] systemd[1]: Activating swap Compressed swap on /dev/zram0...
[    5.066565] kernel: Adding 7654396k swap on /dev/zram0. Priority:-2 extents:1 across:7654396k SSFS
[    4.749250] systemd[1]: Activated swap Compressed swap on /dev/zram0.
[   10.991487] earlyoom[804]: mem total: 14951 MiB, swap total: 7474 MiB
[   10.991487] earlyoom[804]: sending SIGTERM when mem <= 2.68% and swap <= 10.00%, [   10.991660] earlyoom[804]:         SIGKILL when mem <= 1.34% and swap <=  5.00%

Thank you for the helps. I found the process is much easier to do.

--
Luya Tshimbalanga
Fedora Design Team
Fedora Design Suite maintainer
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux