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

  • latalante
    replied
    Typical discussion. Turning the cat's tail.

    A lot about m$ windows, even more about something that is not part of Linux - ZFS, about hibernation, about zswap but nothing about the swap in zram.

    Leave a comment:


  • phuclv
    replied
    Originally posted by skeevy420 View Post

    I still use HDDs. More storage for less money. A reboot cycle is faster than multiple GBs to and from a spinner.
    of course HDDs will continue to be cheap for the foreseeable future, but a small cheap SSD plus a big HDD is a far better investment. I had a laptop with 32GB SSD as cache, and when I tried to install Windows to that tiny SSD (with compact OS enabled), the machine became far more responsive than ever. SSD has magnitudes better access time (ns vs ms) and IOPS (~50k-500k IOPS vs ~50-150 IOPS). Those are more important during booting and program start up than mere linear read/write performance. That's why MS has ReadyBoost that uses USB flash drives for boosting performance because they have good access time, even though they have very slow read/write speeds

    Originally posted by starshipeleven View Post
    I also personally think compressed swap isn't particularly relevant in this day and age where 512GB SSDs are getting cheap
    It is still relevant nowadays. Have you ever actually tried zram? I've enabled it on various old laptops with 1 or 2GB RAM and the result is noticeably better. Or just try it in a VM running on SSD with low RAM and see. Windows 10 and macOS also have similar page file compression feature. Lubuntu, ChromeOS and many other Linux distros have already enabled zram by default for a long time
    The reason is because CPUs can compress memory even far faster than the modern SSDs can achieve. See the benchmark on the LZ4 repo. Many more modern tools have already switched to LZ4 or Zstd due to their speed advantage. Later Windows versions also compress hibernation data, which results in much faster hibernation and restoration

    Windows XP further improved support for hibernation.[8] Hibernation and resumption are much faster as memory pages are compressed using an improved algorithm; compression is overlapped with disk writes, unused memory pages are freed and DMA transfers are used during I/O

    https://en.wikipedia.org/wiki/Hibern...rosoft_Windows

    Leave a comment:


  • phuclv
    replied
    Originally posted by Britoid View Post

    You can usually hibernate successfully with less swap than available RAM, the kernel will attempt to compress and fit the used memory into the available swap space.
    as from the posts in the following pages, Linux doesn't compress the hibernation data
    Originally posted by Britoid View Post
    It's gone now, it got replaced because Windows is very good at hibernation and session restore.
    Windows 7 and up compress hibernation data, so it's very fast to shutdown

    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.
    Things will be different if your work involves heavy programs that load slowly. For example it'll be much faster hibernating than saving your current video editing project → reboot → reload the video editor → reopen the project

    Originally posted by polarathene View Post

    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?
    Hybrid sleep is a different feature, and it's turned off by default. Normally when people talk about hibernation, they mean selecting the "hibernation" option in the shutdown menu and not hybrid sleep which is still a sleep and the PC continues to run without shutting down, and hibernation is also disabled by default since Windows 8 because hybrid boot makes it much faster to start up

    Leave a comment:


  • torsionbar28
    replied
    Originally posted by Britoid View Post
    It's gone now, it got replaced because Windows is very good at hibernation and session restore.
    LMAO, now that's funny! Mac OSX is great at hibernate and restore. Linux, when properly configured, is also quite good at hibernate and restore. Windows - and I've had a work laptop with every version in the past 20 years - has been horrible abysmal utter garbage when it comes to either suspend OR hibernate. Actually, it's just the "restore" part that Microsoft seems to have never got working quite right. Even my latest Win10 laptop work issued me just a few months ago can't do it right... and over the years I've had Dell, HP, IBM, Compaq, Toshiba, doesn't matter who makes it. Ugh, I get pissed off just thinking about how awful Windows is at suspend or hibernate, and how many hours of productivity I've lost because of it.
    Last edited by torsionbar28; 01-26-2020, 11:47 PM.

    Leave a comment:


  • polarathene
    replied
    Originally posted by skeevy420 View Post

    I still use HDDs. More storage for less money. A reboot cycle is faster than multiple GBs to and from a spinner.
    Err.. then yeah reboot. I would reboot over hibernate since on an SSD it's only around 10 seconds(half of that is just UEFI. Only reason for hibernating for me is because the memory contents is of value and I really don't want to lose my unsaved state. Eg if I've got a browser open and have some tabs with stuff highlighted that I need to get back to later and write some notes about, or I've got something else that isn't in a position for saving it's state at the time for whatever reason.

    Some times it's state that is not easily restorable, eg I have 10 Chrome windows open on a few virtual desktops, and perhaps a code editor instance on two of those. A reboot with the ability to restore a session of those windows only goes so far, it fails to relocate the windows to their virtual desktops, and need to be moved/sorted again. Or my terminal instances, if I've got several windows/tabs open, once I reboot, all history is the same for each of them, not unique to the activity I was using it for. Hibernation or Suspend is great for that.

    Leave a comment:


  • horizonbrave
    replied
    Hello dear fedora developers,
    I'm going ultra OT because my cat-like curiosity makes me wonder how is Stratis doing.
    Thanks for all your work and the eventual heads up

    Leave a comment:


  • Mario Junior
    replied
    Trying to configure on Gentoo, but is complicated and I can't understand a shit about zram blocks and etc.

    Leave a comment:


  • skeevy420
    replied
    Originally posted by starshipeleven View Post
    Who is talking of ZFS compressing files? Don't offend my intelligence you peasant.

    ZFS has no concept of "swap file" at all so if I'm saying its handling of compressing swap is wrong this has NOTHING to do with transparent file compression support.

    ZFS does a custom shenanigan with a zpool to offer a swap device that is stored on a filesystem and is compressed by the filesystem logic under the kernel's nose. That's what I disagree with.

    More offending of my intelligence by strawmanning.

    I specifically mentioned the fact that it also can generate NFS sand SMB shares, and you go on a tangent about compression and encryption.
    You're trying to make a joke, but, when gone back far enough (like 2000 years), my surname actually is peasant. I just thought it interesting to add that, technically speaking, I am a Peasant.

    As it is, swap on ZFS is known to cause odd lockups and it one of the few "shoot yourself in the foot" settings that ZFS has.

    And it has Need For Speed and Super Mario Brothers? Damn, I should read the ZFS man pages again.

    .....but I just thought you were listing random ZFS features like I did the other day when I brought up NFS and SMB

    Leave a comment:


  • starshipeleven
    replied
    Originally posted by Spam View Post
    Terrabtes written is indeed a KPI that your warranty specifies.
    Look at Write Endurance table at https://www.anandtech.com/show/13761...lus-ssd-review
    I know.
    What I meant is that this number is so high that it's as meaningless as the MTBF (mean time before failure) rate of hard drives, or the maximum number of spinup/spindown cycles they can endure (which I remember was a thing, once upon a time when HDDs were young technology). You will never encounter it with normal consumer workloads for any SSD built from around 2014 onwards.

    For businness is another matter alltogether, but there are businness SSDs that last longer than that, and most of that kind of hardware is in a RAID anyway so you just factor the replacement drives as maintenance cost for your high-speed storage node, and all is fine.

    Leave a comment:


  • starshipeleven
    replied
    Originally posted by Spam View Post
    As for UNIX philosophy, files should be files and store on filesystems. If there were problems for the kernel storing swap on these files, the solutions should have ended up in kernel, rather than a hack on the FS level. storing swap files on disk, then . I think the solution to the problem should have fixed in the kernel swap module, rather than tweaks and work around on FS layer.
    To be fully 100% fair, swap files are also hacks to the FS layer as they are special files handled in a special way by the filesystem, and you can use them safely only on filesystems that support this feature (i.e. have the relevant hacks in place to suspend any filesystem logic from touching this "file").
    For example btrfs only recently added support for that, and making a swap file on ZFS is not a good idea at all (it has its own way to make a swap device that does not involve swap files, as described above).

    But it's imho acceptable as the filesystem is just moving out of the way and relinquishing control over some disk memory areas to the kernel, and not doing its thing under the kernel's nose.

    Leave a comment:

Working...
X