You are not logged in.
I am using btrfs without a swap partition on my laptop. I installed systemd-swap, configured it to use ZRam / swapfc, then enabled and started the service using systemctl. When I check with free -h, swapon -s or top I do not see any evidence that it is running. Also, there does not seem to be a swap file generated anywhere. Is there a way I can confirm that systemd-swap is indeed installed properly and running? I searched quite a bit and there is hardly any information on this.
Last edited by undoIT (2018-05-21 03:43:19)
Offline
What is in the journal for the service?
Offline
Since last boot:
May 20 19:51:29 user systemd[1]: Started Manage swap spaces on zram, files and partitions..
May 20 19:51:29 user systemd-swap[669]: INFO: Load: /etc/systemd//swap.conf
May 20 19:51:29 user systemd-swap[669]: /etc/systemd//swap.conf: line 1: ###################################################>
May 20 19:51:29 user systemd-swap[669]: INFO: Zram: check availability
May 20 19:51:29 user systemd-swap[669]: INFO: Zram: not part of kernel, trying to find zram module
May 20 19:51:30 user systemd-swap[669]: INFO: Zram: module successfully loaded
May 20 19:51:30 user systemd-swap[669]: INFO: Zram: trying to initialize free device
May 20 19:51:30 user systemd-swap[669]: INFO: Zram: initialized: /dev/zram0
May 20 19:51:31 user systemd-swap[669]: stat: cannot read file system information for '/var/lib/systemd-swap/swapfc/': No su>
May 20 19:51:31 user systemd-swap[669]: stat: cannot read file system information for '/var/lib/systemd-swap/swapfc/': No su>
May 20 19:51:31 user systemd-swap[669]: INFO: swapD: pickup devices from systemd-gpt-auto-generator
May 20 19:51:31 user systemd-swap[669]: INFO: swapD: searching swap devicesOffline
Your journal is truncated, but it seems to answer your questions.
Offline
Okay. I tried this on another laptop, rebooted and there was no evidence the swap was running. Same on this laptop. However, after I posted the initial message and rebooted, I do see now a swap file at /dev/zram0 and the commands to check for swap do indicate that swap is available. I need to check the other laptop to see if something was not configured properly. Do you think there is any problem with this message?
May 20 19:51:31 user systemd-swap[669]: stat: cannot read file system information for '/var/lib/systemd-swap/swapfc/': No su>Offline
That's only half a message...
Offline
May 20 19:51:31 user systemd-swap[669]: stat: cannot read file system information for '/var/lib/systemd-swap/swapfc/': No such file or directoryOffline
Okay, I have systemd-swap configured properly on the other laptop now and tested it out. It does become very slow when memory is maxed, but it is nowhere near as bad as no swap and the endless wait to get into TTY to kill some processes / hoping that a hard shutdown will not be required. Unless there is something to be concerned about with the "No such file or directory message", it appears to be working. Thanks for the help.
Offline