Re: Fedora 35 swapon: /swapfile: swapon failed: Invalid argument

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

 



On Thu, Mar 24, 2022 at 6:36 AM Brad Bell <bradbell@xxxxxxxxxx> wrote:
>
> I am doing algorithmic differentiation with very large tapes and my jobs sometimes run out of memory.

So the workload is producing a substantial amount of anonymous pages.
It's kinda hard to tell what to do to optimize without a decent amount
of knowledge about the workload's behavior. So you'd have to just
change some things and see if the performance improves. I tentatively
expect that you'd be better off disabling zram-generator, setting up a
swap partition or file, and optionally enabling zswap (which is a
different thing than zram). On the plus side, this frees up quite a
lot of memory (roughly half), but on the negative side it might
increase swap thrashing - it really depends on the workload. But zswap
has the benefit of using Least Recently Used (LRU) to evict pages from
the in-memory compressed cache pool to the conventional swap file.
That way it's the stale pages going to disk and the active ones being
compressed in memory.

Also, for what it's worth, on Btrfs I use /var/swap/swapfile1
/var/swap/swapfile2 ... and so on. Where "varswap" is a subvolume
located on the top-level of the file system (next to install time
default subvolumes "root" and "home") and has chattr +C set on it.
That way should I take snapshots of root (or even var in some custom
configurations) I'm not snapshotting the swapfiles. Snapshotting the
swap files ends up making them subject to COW again, and that's
incompatible with using them as swapfiles. The entry in fstab looks
like this:

UUID=$uuid /var/swap       btrfs   noatime,subvol=varswap 0 0

man 5 btrfs has a SWAPFILE SUPPORT section that's fairly detailed steps.

--
Chris Murphy
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-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/users@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux