Announcement

Collapse
No announcement yet.

Fedora Workstation 33 Aiming To Have SWAP-On-ZRAM By Default

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • skeevy420
    replied
    Originally posted by Spam View Post
    Unfortunately compressed swap files are not supported. I guess the swap file actually just acts as a place holder for the physical address the swap writes to.

    The problem with using an underlaying filsystem is that even if you can compress a 4KiB memory page, you still have to write out a block, and most FS's uses 4KiB blocks. It wouldn't save any I/O. What is needed is a virtual swap address so that several blocks can be combined. This is done in-ram with zbud/zsmalloc for zswap.
    zstd+z3fold

    Leave a comment:


  • S.Pam
    replied
    Unfortunately compressed swap files are not supported. I guess the swap file actually just acts as a place holder for the physical address the swap writes to.

    The problem with using an underlaying filsystem is that even if you can compress a 4KiB memory page, you still have to write out a block, and most FS's uses 4KiB blocks. It wouldn't save any I/O. What is needed is a virtual swap address so that several blocks can be combined. This is done in-ram with zbud/zsmalloc for zswap.

    Last edited by S.Pam; 26 January 2020, 04:38 PM.

    Leave a comment:


  • skeevy420
    replied
    Originally posted by Spam View Post
    So when will we get compressed swap on disk? Seems far more useful. Especially if an application actually needs a lot of ram, as zswap takes valuable ram.
    Use ZFS.

    Code:
    zfs create -V 8G \
               -o compression=lz4 \
               -o logbias=throughput \
               -o sync=always \
               -o primarycache=metadata \
               -o secondarycache=none \
               -o com.sun:auto-snapshot=false \
               poolname/swap
    Maybe BTRFS and a swap file (starshipeleven might know) or F2FS with a swap file once F2FS compression support lands.

    Leave a comment:


  • S.Pam
    replied
    So when will we get compressed swap on disk? Seems far more useful. Especially if an application actually needs a lot of ram, as zswap takes valuable ram.

    Leave a comment:


  • skeevy420
    replied
    Originally posted by xinorom View Post

    Sure, for large media storage, backups, etc... but using a HDD for your main system partitions in 2020 is extremely cheapskate. If you're a heavy computer user, I'd even say that not using an NVMe drive is bordering on cheapskate...
    You're not wrong with that assessment. I've been waiting on them to be priced below $100 per TB and they're just now getting to that point. Upgrading to those also means adding a PCIe card with more sata ports and moving my current drives there since I don't think my system will support PCIe drives as boot volumes and I'm out of sata ports.

    I'm content with mirrors and raid0 on HDDs for the time being.

    Leave a comment:


  • xinorom
    replied
    Originally posted by skeevy420 View Post
    I still use HDDs. More storage for less money.
    Sure, for large media storage, backups, etc... but using a HDD for your main system partitions in 2020 is extremely cheapskate. If you're a heavy computer user, I'd even say that not using an NVMe drive is bordering on cheapskate...

    Leave a comment:


  • skeevy420
    replied
    Originally posted by polarathene View Post
    Hibernation by default aims for 40% compression of RAM(2/5th the size). You can reduce that target to 100%(5/5) if you don't care for compression and it'll just write the contents to disk. On a SATA SSD, if it has to write 48GB yeah that would be slow, around 1 min 30? But afaik only actual allocated memory is written to disk for hibernation?
    I still use HDDs. More storage for less money. A reboot cycle is faster than multiple GBs to and from a spinner.

    Leave a comment:


  • polarathene
    replied
    Originally posted by skeevy420 View Post
    The problem with the first option is, at least the last time I tried anyways, a full reboot cycle was faster than just going into hibernation, let alone restoring it.
    Hibernation by default aims for 40% compression of RAM(2/5th the size). You can reduce that target to 100%(5/5) if you don't care for compression and it'll just write the contents to disk. On a SATA SSD, if it has to write 48GB yeah that would be slow, around 1 min 30? But afaik only actual allocated memory is written to disk for hibernation?

    Originally posted by Britoid View Post
    Windows is very good at hibernation and session restore.
    Windows hibernation exists? I thought it does hybrid sleep now, so it suspends to RAM for resume, but can write to disk for hibernation. Regular suspend to RAM(S3) also gets phased out for Suspend to Low Power Idle (S0ix), which if implemented well lets s2idle go into power efficient states but still allow for some other hardware to be a bit awake, like wifi, they call it Modern Standby?

    When you shutdown/restart, it logs out of the user session to free up RAM, then hibernates from there to reduce load times apparently, provided Fast Startup is enabled.

    Originally posted by Britoid View Post
    Probably need to move to a system where a hibernate file can be created on-demand.
    You can assign the hibernate swap target as a different one than usual swap storage afaik(see Arch Wiki). Or use hybrid-sleep, optionally with a delay to wake from suspend and then hibernate.

    Leave a comment:


  • skeevy420
    replied
    Originally posted by Britoid View Post

    That's how Intel Rapid Start worked.

    It's gone now, it got replaced because Windows is very good at hibernation and session restore.

    Probably need to move to a system where a hibernate file can be created on-demand.
    That's not a bad idea and I'm surprised we're not doing it like that now.

    Leave a comment:


  • Britoid
    replied
    Originally posted by skeevy420 View Post

    I wonder how long it'll be until laptops come with two drives -- primary drive and hibernate drive.
    That's how Intel Rapid Start worked.

    It's gone now, it got replaced because Windows is very good at hibernation and session restore.

    Probably need to move to a system where a hibernate file can be created on-demand.

    Leave a comment:

Working...
X