Releases: nefelim4ag/systemd-swap
Releases · nefelim4ag/systemd-swap
Python rewrite
Major changes
systemd-swap
is now completely rewritten in pythonsystemd-swap compression
lists available compression algorithms (#93)
Minor changes
systemd-swap status
now works without root (some info requires root and are not displayed withoutsudo
)systemd-swap
can nowswapon
virtblk disks (for use within VMs)
New dependencies
- python-sysv-ipc
- python-systemd
- >=python-3.7
The last(?) bash release, next release on python
This is a simple release containing the last fixups of the bash code before moving on to the python rewrite (#164), if there are requests to continue the bash version a 4.3.x branch will be created and maintained for the foreseeable future.
Fixes
Properly handle loading of zram module
4.3.1 did not actually fix this issue
Zram, BTRFS and loopback regression fixes
- Allow for loopback devices once again (however if you need to use loopback please report why)
- Use
dd
for all filesystems, fixing #155 when using swapFC on BTRFS - Fix a issue where the zram module would not load properly on startup causing all kinds of problems
- (Debian based distros) don't override configuration files in
/etc
All around updates
- Properly create btrfs subvolume introduced in 4.2.2
- New variable
swapfc_free_ram_perc
for setting the first swapfc file (other swapfc swap files are still managed byswapfc_free_swap_perc
) - Some performance improvements by rewriting external programs in pure bash code
Small regression fixes
More regression fixes
- Now allows
swapon
for swap partitions found on/dev/sd*
and/dev/nvme*
. - Now always
swapon
all zram devices (previously the first one would under certain circumstances not be made active). - Create a btrfs subvolume in
swapfc_path
so that snapshots work. - SwapFC now more accuratly logs why the swap file was created.
Fix zram regression
Last release carried a regression causing zram
s size to be too large. (#134)
Restructuring of configuration files and man pages
New features
We now read configuration options from the following files and folders:
/etc/systemd/swap.conf.d/*.conf
/run/systemd/swap.conf.d/*.conf
/usr/lib/systemd/swap.conf.d/*.conf
/etc/systemd/swap.conf
/usr/share/systemd-swap/swap-default.conf
(With priority from top to bottom).
We now support some new configuration options:
swapfc_remove_free_swap_perc
Allows defining at what % of available ram we remove a swap file (defaluts to 55 which is the old value ofswapfc_free_swap_perc
+ 40.swapfc_min_count
Just how you can define the maximum number of swap files created by swapfc, you can now define a minimum that will always be allocated (for instanse to restore the old behaviour of creating a swap file on startup set this to1
). Defaults to0
.swapfc_priority
Sets the priority of swap files created by swapfc (decreasing by one for every swap file created). Defaults to-2
(old default).
There are two new man pages, 5 swap.conf
and 8 systemd-swap
.
Please read through them and send in grammar mistakes and anything you would like to be added 🥳 .
Misc
- Further removal of use of external programs thus improving performance (thanks zenofile).
- Additional systemd hardening.
- Run as
type=notify
which should improve the output ofsystemctl status systemd-swap
. - Run systemd-swap at "realtime" priority (1ac16cb if you're interested).
- Code refactoring and cleanup.
- Log when we start creating swap files and warn if combining zram with zswap/swapfc/swapd.
- Never shred the swap file before using it (previously it would shred if the filesystem was not ext* or btrfs) (3f2e5a9 & 41d86af).
BTRFS swapfile support and code cleanup
New features
- BTRFS swapfile support
- Only create the first swapfile (swapfc) if we're low on ram instead of on startup
- Setting to specify zRAM count
Updates
- Update defaults to zstd compression and z3fold
- Remove dependencies on external shell programs improving performance
- Various code cleanups
- Various documentation updates
- Harden systemd service
Bug fixes
- Use
dd
instead offallocate
if we're on ext4/3, f2fs or xfs (#109) - Don't attempt
chattr +C
on filesystems that don't support the flag
Regressions
If you're running Ubuntu 18.04 or Centos 7 or older, please comment out line 25 in /usr/lib/systemd/system/systemd-swap.service
(see #118)