Re: btrfs swapfile - Not enough swap space for hibernation.

2020-12-14 Thread Sreyan Chakravarty
On Mon, Dec 14, 2020 at 2:57 PM Sreyan Chakravarty wrote: > > On Sun, Dec 13, 2020 at 3:23 AM Chris Murphy wrote: > > You are in adventure land. So you're going on an adventure. If you > > want it to just work, use a swap partition. > > To be clear my problem is not with swap files per se. > > It

Re: btrfs swapfile - Not enough swap space for hibernation.

2020-12-14 Thread Sreyan Chakravarty
On Sun, Dec 13, 2020 at 3:23 AM Chris Murphy wrote: > You are in adventure land. So you're going on an adventure. If you > want it to just work, use a swap partition. To be clear my problem is not with swap files per se. It's a SELinux error. I was asking for help on how to configure SELinux so

Re: btrfs swapfile - Not enough swap space for hibernation.

2020-12-12 Thread Chris Murphy
On Fri, Dec 11, 2020 at 7:02 AM Sreyan Chakravarty wrote: > > The only reason I can fathom is that systemd-logind is unable to > access the directory /var/swap. IIRC, you were the one who suggested I > mount in that directory. > > Not blaming you, but the question is what do I do now ? Well, what

Re: btrfs swapfile - Not enough swap space for hibernation.

2020-12-12 Thread Grumpey
On Sat, Dec 12, 2020 at 10:12 AM stan via users wrote: > > On Sat, 12 Dec 2020 16:22:29 +0530 > Sreyan Chakravarty wrote: > > > Isn't chcon just temporary ? Won't the changes be lost after a reboot > > ? > > Persistent across reboots here. I think "temporary" in this case means > that it has no

Re: btrfs swapfile - Not enough swap space for hibernation.

2020-12-12 Thread stan via users
On Sat, 12 Dec 2020 16:22:29 +0530 Sreyan Chakravarty wrote: > Isn't chcon just temporary ? Won't the changes be lost after a reboot > ? Persistent across reboots here. I think "temporary" in this case means that it has no context with restorecon. I haven't tried it, but if you change it with

Re: btrfs swapfile - Not enough swap space for hibernation.

2020-12-12 Thread stan via users
On Sat, 12 Dec 2020 13:09:24 +0530 Sreyan Chakravarty wrote: > I am a novice of I am very squeamish about applying commands without > understanding them. man chcon > Is system_u a type? Is there any way to view all types for SELinux > within Fedora? Search on selinux system_u for information

Re: btrfs swapfile - Not enough swap space for hibernation.

2020-12-12 Thread Sreyan Chakravarty
On Fri, Dec 11, 2020 at 9:05 PM stan via users wrote: > > On Fri, 11 Dec 2020 20:26:31 +0530 > Sreyan Chakravarty wrote: > > > It's a SELinux error. Are there any SELinux experts here ? > > [snip] > > > My current SELinux label is : > > > > unconfined_u:object_r:swapfile_t:s0 /var/swap/fedora.swa

Re: btrfs swapfile - Not enough swap space for hibernation.

2020-12-11 Thread Sreyan Chakravarty
On Fri, 11 Dec 2020, 9:05 pm stan via users, wrote: > On Fri, 11 Dec 2020 20:26:31 +0530 > Sreyan Chakravarty wrote: > > > It's a SELinux error. Are there any SELinux experts here ? > > [snip] > > > My current SELinux label is : > > > > unconfined_u:object_r:swapfile_t:s0 /var/swap/fedora.swap >

Re: btrfs swapfile - Not enough swap space for hibernation.

2020-12-11 Thread stan via users
On Fri, 11 Dec 2020 20:26:31 +0530 Sreyan Chakravarty wrote: > It's a SELinux error. Are there any SELinux experts here ? [snip] > My current SELinux label is : > > unconfined_u:object_r:swapfile_t:s0 /var/swap/fedora.swap Not an expert. There is no context for this, as it is your unique cre

Re: btrfs swapfile - Not enough swap space for hibernation.

2020-12-11 Thread Sreyan Chakravarty
On Fri, Dec 11, 2020 at 8:26 PM Sreyan Chakravarty wrote: > > On Fri, Dec 11, 2020 at 12:32 AM Chris Murphy wrote: > > > > If the journal doesn't have more information about why it says this, > > and if the error is reported in the journal by systemd-logind, enable > > debug logging for logind an

Re: btrfs swapfile - Not enough swap space for hibernation.

2020-12-11 Thread Sreyan Chakravarty
On Fri, Dec 11, 2020 at 12:32 AM Chris Murphy wrote: > > If the journal doesn't have more information about why it says this, > and if the error is reported in the journal by systemd-logind, enable > debug logging for logind and reproduce and the try to figure out why > logind is complaining: > >

Re: btrfs swapfile - Not enough swap space for hibernation.

2020-12-11 Thread Sreyan Chakravarty
On Fri, Dec 11, 2020 at 12:32 AM Chris Murphy wrote: > > If the journal doesn't have more information about why it says this, > and if the error is reported in the journal by systemd-logind, enable > debug logging for logind and reproduce and the try to figure out why > logind is complaining: > >

Re: F33 BTRFS - Not enough swap space for hibernation [solved]

2020-12-09 Thread Sreyan Chakravarty
On Wed, Dec 9, 2020 at 5:36 AM Chris Murphy wrote: > Small clarification. 'chattr +C' to set the C file attribute is > 'nodatacow'. Since Btrfs is cow by default, it's generally OK to > assume cow unless this attribute is set. But there's a rather uncommon > and not highly recommended mount optio

Re: F33 BTRFS - Not enough swap space for hibernation [solved]

2020-12-09 Thread Sreyan Chakravarty
nd also not even documented how to do a > post-install setup of swap. But it's on my todo. > Ok, I am out of ideas. Have created the swap file in a different subvolume from my root. I have also used btrfs_map_physical script to find the offset, but I am still getting "Not enough sw

Re: F33 BTRFS - Not enough swap space for hibernation [solved]

2020-12-09 Thread Sreyan Chakravarty
On Wed, Dec 9, 2020 at 5:31 AM Chris Murphy wrote: > I referred you to man 5 btrfs about a list of limitations of swapfiles > on btrfs 10 days ago. > > https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org/message/XF7YO27N2XPWGLPMPUN76VFT3RW2KFYS/ Apologies, I missed that.

Re: F33 BTRFS - Not enough swap space for hibernation [solved]

2020-12-09 Thread Sreyan Chakravarty
On Tue, Dec 8, 2020 at 9:30 PM Qiyu Yan wrote: > Since swapfile should always be NOCOW, while doing snapshot the subvol > containing the file will definitely make it COW. You may want to put > swapfile to a separate subvol. > Yes, you are right. I just snapshotted my root, and restored the snap

Re: F33 BTRFS - Not enough swap space for hibernation [solved]

2020-12-08 Thread Chris Murphy
On Tue, Dec 8, 2020 at 11:14 AM Garry T. Williams wrote: > > On Tuesday, December 8, 2020 1:02:19 PM EST Sreyan Chakravarty wrote: > > How would you verify if a file is CoW in BTRFS? > > It's not btrfs-specific, but use the lsattr(1) command. E.g., > > garry@gtw$ lsattr .local/share/akonadi/d

Re: F33 BTRFS - Not enough swap space for hibernation [solved]

2020-12-08 Thread Chris Murphy
On Tue, Dec 8, 2020 at 5:53 AM Sreyan Chakravarty wrote: > > On Mon, Dec 7, 2020 at 3:43 PM Chris Murphy wrote: >> >> >> This isn't a great location for a swapfile on btrfs because you can't ever >> snapshot /. > > > You never said why it was not possible to snapshot /. > > Why is that ? I refe

Re: F33 BTRFS - Not enough swap space for hibernation [solved]

2020-12-08 Thread Garry T. Williams
On Tuesday, December 8, 2020 1:02:19 PM EST Sreyan Chakravarty wrote: > How would you verify if a file is CoW in BTRFS? It's not btrfs-specific, but use the lsattr(1) command. E.g., garry@gtw$ lsattr .local/share/akonadi/db_data/ibdata1 ---C .local/share/akonadi/db_data/

Re: F33 BTRFS - Not enough swap space for hibernation [solved]

2020-12-08 Thread Sreyan Chakravarty
On Tue, 8 Dec 2020, 9:30 pm Qiyu Yan, wrote: > Since swapfile should always be NOCOW, while doing snapshot the subvol > containing the file will definitely make it COW. You may want to put > swapfile to a separate subvol. > How would you verify if a file is CoW in BTRFS? > _

Re: F33 BTRFS - Not enough swap space for hibernation [solved]

2020-12-08 Thread Qiyu Yan
Sreyan Chakravarty 于2020年12月8日周二 下午8:53写道: > > On Mon, Dec 7, 2020 at 3:43 PM Chris Murphy wrote: >> >> >> This isn't a great location for a swapfile on btrfs because you can't ever >> snapshot /. > > > You never said why it was not possible to snapshot /. Since swapfile should always be NOCOW,

Re: F33 BTRFS - Not enough swap space for hibernation [solved]

2020-12-08 Thread Sreyan Chakravarty
On Mon, Dec 7, 2020 at 3:43 PM Chris Murphy wrote: > > This isn't a great location for a swapfile on btrfs because you can't ever > snapshot /. > You never said why it was not possible to snapshot /. Why is that ? -- Regards, Sreyan Chakravarty ___

Re: F33 BTRFS - Not enough swap space for hibernation [SOLVED]

2020-12-07 Thread Sreyan Chakravarty
On Mon, Dec 7, 2020 at 3:43 PM Chris Murphy wrote: > > The more predictable arrangement is a swap partition. > I did it. The problem was that btrfs_map_physical script will actually output the offset in bytes. I had to divide by my block size 4096. So the correct resume_offset is = 147455098

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-07 Thread Sreyan Chakravarty
On Mon, Dec 7, 2020 at 3:43 PM Chris Murphy wrote: > What happens if you manually swapon? What does cat /proc/cmdline show? > > Output of manual swapon: $ swapon -v -f /fedora.swap swapon: /fedora.swap: found signature [pagesize=4096, signature=swap] swapon: /fedora.swap: pagesize=4096, swapsize

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-07 Thread Chris Murphy
On Mon, Dec 7, 2020, 1:48 AM Sreyan Chakravarty wrote: > On Mon, Dec 7, 2020 at 1:58 PM Samuel Sieb wrote: > >> > >> > [ 269.976652] PM: Cannot find swap device, try swapon -a >> >> This is the important line. >> >> > What could be causing this ? I am not even getting error messages. > > >> D

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-07 Thread Sreyan Chakravarty
On Mon, Dec 7, 2020 at 1:58 PM Samuel Sieb wrote: > On 12/7/20 12:13 AM, Sreyan Chakravarty wrote: > > Hibernation is not successful. > > > > This is what I get from 'dmesg': > > > > [ 269.976652] PM: Cannot find swap device, try swapon -a > > This is the important line. > > What could be causin

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-07 Thread Samuel Sieb
On 12/7/20 12:13 AM, Sreyan Chakravarty wrote: Hibernation is not successful. This is what I get from 'dmesg': [  269.976652] PM: Cannot find swap device, try swapon -a This is the important line. What does 'Cannot get swap writer' mean ? It means that the previous thing failed. This is

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-07 Thread Sreyan Chakravarty
On Mon, Dec 7, 2020 at 11:55 AM Samuel Sieb wrote: > > So this is why you aren't noticing any improvement from zram. You > aren't using any swap at all at this point. But more importantly, this > is why hibernation isn't working. You don't have any disk swap. What > happened to your swap file

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-06 Thread Sreyan Chakravarty
p. What > happened to your swap file? > When I added my swap file and did: systemctl hibernate I got: Not enough swap space for hibernation. I used the filefrag tool for calculating the offset. -- Regards, Sreyan Chakravarty _

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-06 Thread Samuel Sieb
On 12/6/20 10:17 PM, Sreyan Chakravarty wrote: On Mon, Dec 7, 2020 at 1:31 AM Chris Murphy > wrote: What do you get for 'swapon' ? # swapon NAME       TYPE      SIZE USED PRIO /dev/zram0 partition 3.8G   0B  100 So this is why you aren't noticing any impro

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-06 Thread Sreyan Chakravarty
On Mon, Dec 7, 2020 at 2:04 AM Chris Murphy wrote: > > I think a higher priority is supporting encrypted authenticated > hibernation images. And arguably it's needed for swap as well, because > there are all kinds of private user data that can be evicted to swap. > It's another advantage of swap

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-06 Thread Sreyan Chakravarty
On Mon, Dec 7, 2020 at 1:31 AM Chris Murphy wrote: > What do you get for 'swapon' ? > # swapon NAME TYPE SIZE USED PRIO /dev/zram0 partition 3.8G 0B 100 -- Regards, Sreyan Chakravarty ___ users mailing list -- users@lists.fedoraproject

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-06 Thread Sreyan Chakravarty
On Sun, Dec 6, 2020 at 11:42 PM Qiyu Yan wrote: > https://chrisdown.name/2018/01/02/in-defence-of-swap.html > > A good article answering why we need swap. > >> >> Yes I have read this. It is indeed a good article. > >>> Or another workaround, swapon the hibernation only file and swapoff all > o

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-06 Thread Chris Murphy
On Sun, Dec 6, 2020 at 11:12 AM Qiyu Yan wrote: > > IDK, maybe just because no one is working on this. But changing PRIO may do > similar thing, page swap to zram and hibernat to disk. The kernel knows not to write a hibernation image to a swap device backed by zram. In fact it knows it needs co

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-06 Thread Chris Murphy
On Sun, Dec 6, 2020 at 12:35 AM Sreyan Chakravarty wrote: > > On Sat, Dec 5, 2020 at 3:37 AM Ed Greshko wrote: >> >> Well, which "echo" command fails? >> >> Do these exist? >> >> /sys/power/disk >> /sys/power/state > > > $ ll /sys/power/disk > -rw-r--r--. 1 root root 4096 Dec 6 12:53 /sys/powe

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-06 Thread Qiyu Yan
Sreyan Chakravarty 于 2020年12月6日周日 下午6:23写道: > On Sun, Dec 6, 2020 at 1:29 PM Samuel Sieb wrote: > >> Are you actually using the swap? If you aren't, or only very little, >> then you aren't going to notice anything. It will only use RAM if >> you're swapping out pages. >> >> > Well I do have a

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-06 Thread Sreyan Chakravarty
On Sun, Dec 6, 2020 at 1:29 PM Samuel Sieb wrote: > Are you actually using the swap? If you aren't, or only very little, > then you aren't going to notice anything. It will only use RAM if > you're swapping out pages. > > Well I do have a lot of open tabs in chrome and firefox for testing. I ha

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-06 Thread Sreyan Chakravarty
On Sun, 6 Dec 2020, 2:00 pm Andras Simon, wrote: > > Don't think of it as swap. It's in-place compression of memory. > Thank you. Sir I rarely get such short concise and eloquent answers. I really wish naming was easier in computer science. In place memory compression is exactly what the zram

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-06 Thread Andras Simon
2020-12-06 8:51 UTC+01:00, Sreyan Chakravarty : > On Sun, Dec 6, 2020 at 10:33 AM Tim via users > > wrote: > >> On Sat, 2020-12-05 at 17:45 -0700, Chris Murphy wrote: >> > There definitely is no free lunch with swap-on-zram, but it helps >> > quite a lot for most workloads. >> >> I'm curious how d

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-06 Thread Samuel Sieb
On 12/5/20 11:56 PM, Sreyan Chakravarty wrote: On Sun, Dec 6, 2020 at 11:13 AM Chris Murphy > wrote: https://fedoraproject.org/wiki/Changes/SwapOnZRAM#Detailed_Description Let me

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-05 Thread Samuel Sieb
On 12/5/20 11:49 PM, Sreyan Chakravarty wrote: On Sat, Dec 5, 2020 at 12:18 PM Samuel Sieb > wrote: Because there isn't one that can do everything.  With both, you get fast swap, but also the ability to hibernate. To be honest, I have not seen any performan

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-05 Thread Sreyan Chakravarty
On Sun, Dec 6, 2020 at 11:13 AM Chris Murphy wrote: > https://fedoraproject.org/wiki/Changes/SwapOnZRAM#Detailed_Description > > Let me know if you have questions not answered there. A key point is > this is not a preallocation. Creating a 4G /dev/zram0 device doesn't > reserve or consume 4G. It'

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-05 Thread Samuel Sieb
On 12/5/20 11:45 PM, Sreyan Chakravarty wrote: On Sat, Dec 5, 2020 at 3:47 AM Samuel Sieb > wrote: But what you are saying is that if I have 8 GB of RAM and let's say 3 GB is actually full of zram swap pages, then, by that logic, applications will have 3GB less RAM to ope

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-05 Thread Sreyan Chakravarty
On Sun, Dec 6, 2020 at 10:33 AM Tim via users wrote: > On Sat, 2020-12-05 at 17:45 -0700, Chris Murphy wrote: > > There definitely is no free lunch with swap-on-zram, but it helps > > quite a lot for most workloads. > > I'm curious how dedicating some of your RAM for swap, therefore having > less

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-05 Thread Sreyan Chakravarty
On Sat, Dec 5, 2020 at 12:18 PM Samuel Sieb wrote: > > Because there isn't one that can do everything. With both, you get fast > swap, but also the ability to hibernate. > To be honest, I have not seen any performance or responsiveness improvement with ZRAM. Hence I am very suspicious when it c

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-05 Thread Sreyan Chakravarty
On Sat, Dec 5, 2020 at 11:44 AM Jon LaBadie wrote: > Because your needs are not my needs. > > I have no use for hibernation. > > I may have a need for fast, ram-based swap. > I understand my workflows are not your workflows. But my question is how can you conserve RAM by using more RAM ? That

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-05 Thread Sreyan Chakravarty
On Sat, Dec 5, 2020 at 3:47 AM Samuel Sieb wrote: > It's more like having a TARDIS in your room if you understand that > reference. It takes up some space, but it's bigger on the inside. :-) > Sorry not a Doctor Who fan. It's way too convoluted a plot for me. :-) > Although in this case, it d

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-05 Thread Sreyan Chakravarty
On Sat, Dec 5, 2020 at 3:37 AM Ed Greshko wrote: > Well, which "echo" command fails? > > Do these exist? > > /sys/power/disk > /sys/power/state > $ ll /sys/power/disk -rw-r--r--. 1 root root 4096 Dec 6 12:53 /sys/power/disk $ ll /sys/power/state -rw-r--r--. 1 root root 4096 Dec 6 12:53 /sys

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-05 Thread Chris Murphy
On Sat, Dec 5, 2020 at 10:03 PM Tim via users wrote: > > On Sat, 2020-12-05 at 17:45 -0700, Chris Murphy wrote: > > There definitely is no free lunch with swap-on-zram, but it helps > > quite a lot for most workloads. > > I'm curious how dedicating some of your RAM for swap, therefore having > les

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-05 Thread Doug H.
On Sat, Dec 5, 2020, at 9:03 PM, Tim via users wrote: > On Sat, 2020-12-05 at 17:45 -0700, Chris Murphy wrote: > > There definitely is no free lunch with swap-on-zram, but it helps > > quite a lot for most workloads. > > I'm curious how dedicating some of your RAM for swap, therefore having > less

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-05 Thread Tim via users
On Sat, 2020-12-05 at 17:45 -0700, Chris Murphy wrote: > There definitely is no free lunch with swap-on-zram, but it helps > quite a lot for most workloads. I'm curious how dedicating some of your RAM for swap, therefore having less RAM, is more beneficial than just using your RAM as RAM. --

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-05 Thread Chris Murphy
On Fri, Dec 4, 2020 at 9:32 AM Sreyan Chakravarty wrote: > > > > On Fri, Dec 4, 2020 at 5:50 PM Qiyu Yan wrote: >> >> >> No > > > How can I shut off the ZRAM swap ? Sreyan, it's OK to be confused and ask a lot of questions. However, Qiyu did go to the trouble to refer you to the swap-on-zram fe

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-04 Thread Samuel Sieb
On 12/4/20 11:56 AM, Sreyan Chakravarty wrote: On Sat, Dec 5, 2020 at 1:14 AM Ed Greshko > wrote: I'm not advocating doing this.  And, I don't use hibernation. But there is also https://fedoraproject.org/wiki/QA:Testcase_SwapOnZRAM_hibernation

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-04 Thread Jon LaBadie
On Sat, Dec 05, 2020 at 01:26:35AM +0530, Sreyan Chakravarty wrote: > On Sat, Dec 5, 2020 at 1:14 AM Ed Greshko wrote: > > > > > I'm not advocating doing this. And, I don't use hibernation. > > > > But there is also > > > > https://fedoraproject.org/wiki/QA:Testcase_SwapOnZRAM_hibernation >

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-04 Thread Samuel Sieb
On 12/4/20 2:04 PM, Sreyan Chakravarty wrote: On Sat, 5 Dec 2020, 3:17 am Samuel Sieb, < zram doesn't take up any significant amount of RAM until it's needed. Then it compresses the swapped data blocks.  I see that I've misconfigured something and ended up with two zram swaps active,

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-04 Thread Ed Greshko
On 05/12/2020 04:06, Sreyan Chakravarty wrote: On Sat, Dec 5, 2020 at 1:14 AM Ed Greshko mailto:ed.gres...@greshko.com>> wrote: https://fedoraproject.org/wiki/QA:Testcase_SwapOnZRAM_hibernation BTW, the above does not w

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-04 Thread Sreyan Chakravarty
On Sat, 5 Dec 2020, 3:17 am Samuel Sieb, < > > zram doesn't take up any significant amount of RAM until it's needed. > Then it compresses the swapped data blocks. I see that I've > misconfigured something and ended up with two zram swaps active, so I > have almost 17GB of zram defined on my 12GB

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-04 Thread Samuel Sieb
On 12/4/20 1:32 PM, Sreyan Chakravarty wrote: On Sat, 5 Dec 2020, 2:57 am Samuel Sieb, > wrote: I think you missed the point about it being *fast*.  Swapping in RAM is orders of magnitude faster than swapping to disk, even SSD. I thought swap was supposed to be u

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-04 Thread Sreyan Chakravarty
On Sat, 5 Dec 2020, 2:57 am Samuel Sieb, wrote: > > > I think you missed the point about it being *fast*. Swapping in RAM is > orders of magnitude faster than swapping to disk, even SSD. > I thought swap was supposed to be used when you were running low on RAM. Then it kind of makes intuitive s

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-04 Thread Samuel Sieb
On 12/4/20 11:43 AM, Sreyan Chakravarty wrote: On Sat, Dec 5, 2020 at 1:12 AM Samuel Sieb > wrote: The zram swap is fast and efficient.  But if you use more than that, there is the disk swap to fall back on.  Also, you can only hibernate to disk swap so in

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-04 Thread Sreyan Chakravarty
On Sat, Dec 5, 2020 at 1:14 AM Ed Greshko wrote: > https://fedoraproject.org/wiki/QA:Testcase_SwapOnZRAM_hibernation BTW, the above does not work. I get: -bash: echo: write error: No such device -- Regards, Sreyan Chakravarty ___ users

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-04 Thread Sreyan Chakravarty
On Sat, Dec 5, 2020 at 1:14 AM Ed Greshko wrote: > > I'm not advocating doing this. And, I don't use hibernation. > > But there is also > > https://fedoraproject.org/wiki/QA:Testcase_SwapOnZRAM_hibernation One question, why is it considered Hibernation on ZRAM if you have to set up a file

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-04 Thread Ed Greshko
On 05/12/2020 02:58, Sreyan Chakravarty wrote: On Fri, Dec 4, 2020 at 11:13 PM Patrick O'Callaghan mailto:pocallag...@gmail.com>> wrote: Using swapoff(8) I mean how do I disable it permanently? The swap-on-zram feature can be disabled with sudo touch /etc/systemd/zram-generator.conf a

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-04 Thread Sreyan Chakravarty
On Sat, Dec 5, 2020 at 1:12 AM Samuel Sieb wrote: > > The zram swap is fast and efficient. But if you use more than that, > there is the disk swap to fall back on. Also, you can only hibernate to > disk swap so in your case, you need it too. > There is no point to having the zram swap if I hav

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-04 Thread Samuel Sieb
On 12/4/20 11:27 AM, Sreyan Chakravarty wrote: On Sat, Dec 5, 2020 at 12:37 AM Samuel Sieb > wrote: Why would you want to? What is the point of having 2 types of swap ? The zram swap is fast and efficient. But if you use more than that, there is the disk swap to

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-04 Thread Sreyan Chakravarty
On Sat, Dec 5, 2020 at 12:37 AM Samuel Sieb wrote: > Why would you want to? > What is the point of having 2 types of swap ? -- Regards, Sreyan Chakravarty ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-le

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-04 Thread Samuel Sieb
On 12/4/20 10:58 AM, Sreyan Chakravarty wrote: On Fri, Dec 4, 2020 at 11:13 PM Patrick O'Callaghan mailto:pocallag...@gmail.com>> wrote: Using swapoff(8) I mean how do I disable it permanently? Why would you want to? ___ users mailing list -- u

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-04 Thread Sreyan Chakravarty
On Fri, Dec 4, 2020 at 11:13 PM Patrick O'Callaghan wrote: > Using swapoff(8) > I mean how do I disable it permanently? -- Regards, Sreyan Chakravarty ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-le...@

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-04 Thread Sreyan Chakravarty
On Fri, Dec 4, 2020 at 11:17 PM Patrick O'Callaghan wrote: > I'm referring to recent messages in which the question of swap on BTRFS > has been discussed. You'll have to search for them, but I'm doing this > myself and it wasn't a big deal to set up. > You mean discussions on this mailing list ?

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-04 Thread Patrick O'Callaghan
On Fri, 2020-12-04 at 21:53 +0530, Sreyan Chakravarty wrote: > On Fri, Dec 4, 2020 at 6:35 PM Patrick O'Callaghan > wrote: > > > > > > > You seem to be confusing two different things. BTRFS has nothing to do > > with Zram. IIRC previous posters have already pointed to descriptions > > of using

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-04 Thread Patrick O'Callaghan
On Fri, 2020-12-04 at 22:01 +0530, Sreyan Chakravarty wrote: > On Fri, Dec 4, 2020 at 5:50 PM Qiyu Yan wrote: > > > > > No > > > > How can I shut off the ZRAM swap ? Using swapoff(8) poc ___ users mailing list -- users@lists.fedoraproject.org To un

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-04 Thread Sreyan Chakravarty
On Fri, Dec 4, 2020 at 5:50 PM Qiyu Yan wrote: > > No > How can I shut off the ZRAM swap ? -- Regards, Sreyan Chakravarty ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-le...@lists.fedoraproject.org Fedo

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-04 Thread Sreyan Chakravarty
On Fri, Dec 4, 2020 at 6:35 PM Patrick O'Callaghan wrote: > > > You seem to be confusing two different things. BTRFS has nothing to do > with Zram. IIRC previous posters have already pointed to descriptions > of using BTRFS for hibernation. Are you referring to this script ? https://raw.githu

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-04 Thread Patrick O'Callaghan
On Fri, 2020-12-04 at 18:23 +0530, Sreyan Chakravarty wrote: > On Fri, 4 Dec 2020, 5:56 pm Patrick O'Callaghan, > wrote: > > > > > > > It's in RAM, so not permanent. > > > > > So how is hibernation done in BTRFS? You seem to be confusing two different things. BTRFS has nothing to do with Zr

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-04 Thread Sreyan Chakravarty
On Fri, 4 Dec 2020, 5:56 pm Patrick O'Callaghan, wrote: > > > It's in RAM, so not permanent. > So how is hibernation done in BTRFS? > ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-le...@lists.fedoraproj

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-04 Thread Sreyan Chakravarty
On Fri, 4 Dec 2020, 5:50 pm Qiyu Yan, wrote: > No > So how do you do hibernate on BTRFS? > ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-le...@lists.fedoraproject.org Fedora Code of Conduct: https://doc

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-04 Thread Patrick O'Callaghan
On Fri, 2020-12-04 at 17:22 +0530, Sreyan Chakravarty wrote: > On Fri, 4 Dec 2020, 5:15 pm Patrick O'Callaghan, > wrote: > > > > > It's a compressed RAM disk: > > > > https://www.kernel.org/doc/html/latest/admin-guide/blockdev/zram.html > > > > poc > > > > Can it be used for hibernation? It

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-04 Thread Qiyu Yan
Sreyan Chakravarty 于2020年12月4日周五 下午7:52写道: > > > > On Fri, 4 Dec 2020, 5:15 pm Patrick O'Callaghan, > wrote: >> >> >> It's a compressed RAM disk: >> >> https://www.kernel.org/doc/html/latest/admin-guide/blockdev/zram.html >> >> poc > > > Can it be used for hibernation? No > > ___

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-04 Thread Sreyan Chakravarty
On Fri, 4 Dec 2020, 5:15 pm Patrick O'Callaghan, wrote: > > It's a compressed RAM disk: > > https://www.kernel.org/doc/html/latest/admin-guide/blockdev/zram.html > > poc > Can it be used for hibernation? > ___ users mailing list -- users@lists.fedorap

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-04 Thread Patrick O'Callaghan
On Fri, 2020-12-04 at 16:16 +0530, Sreyan Chakravarty wrote: > Is ZRAM a file or is it a partition ? It's a compressed RAM disk: https://www.kernel.org/doc/html/latest/admin-guide/blockdev/zram.html poc ___ users mailing list -- users@lists.fedoraproje

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-04 Thread Sreyan Chakravarty
On Fri, Dec 4, 2020 at 3:58 PM Qiyu Yan wrote: > Just execute `swapon` to see a list of all swap devices or files, such > as... > # swapon NAME TYPE SIZE USED PRIO /dev/zram0 partition 3.8G 0B 100 How do I increase the size of zram0 ? I want to have the hibernate facility. > ..

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-04 Thread Qiyu Yan
Sreyan Chakravarty 于2020年12月4日周五 下午6:07写道: > > On Fri, Dec 4, 2020 at 3:20 PM Qiyu Yan wrote: >> >> Try checking with `swapon`, > > > This is the output I get with `swapon`: > > # swapon -v -f /fedora.swap > swapon: /fedora.swap: found signature [pagesize=4096, signature=swap] > swapon: /fedora.s

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-04 Thread Sreyan Chakravarty
On Fri, Dec 4, 2020 at 3:20 PM Qiyu Yan wrote: > Try checking with `swapon`, This is the output I get with `swapon`: # swapon -v -f /fedora.swap swapon: /fedora.swap: found signature [pagesize=4096, signature=swap] swapon: /fedora.swap: pagesize=4096, swapsize=15032385536, devsize=15032385536

Re: F33 BTRFS - Not enough swap space for hibernation

2020-12-04 Thread Qiyu Yan
Try checking with `swapon`, I guess the 4G zram swap makes the difference. Sreyan Chakravarty 于2020年12月4日周五 下午5:45写道: > > Hi, > > Migrated to BTRFS on Fedora 33. > > How do I get hibernate to work with swap files ? > > I did: > touch /fedora.swap > chattr +C /fedora.swap > dd if=/dev/

F33 BTRFS - Not enough swap space for hibernation

2020-12-04 Thread Sreyan Chakravarty
Hi, Migrated to BTRFS on Fedora 33. How do I get hibernate to work with swap files ? I did: touch /fedora.swap chattr +C /fedora.swap dd if=/dev/zero of=/fedora.swap bs=1M count=14336 status=progress chmod 600 /fedora.swap mkswap /fedora.swap /etc/fstab entry: /fe

Re: Not enough swap space for hibernation

2020-11-18 Thread Sreyan Chakravarty
Thank you to everyone here. I guess the problem was not putting the correct kernel parameters. Now hibernation actually works faster. Thanks again. -- Regards, Sreyan Chakravarty ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe

Re: Not enough swap space for hibernation

2020-11-18 Thread Sreyan Chakravarty
On Sat, Nov 14, 2020 at 11:40 AM Samuel Sieb wrote: > That's a good point. The memory usage is quite low at that point, but > if he ever ended up using swap space, there could easily not be enough > to hibernate. However, it should work in this current case. > Exactly, it should work. It use t

Re: Not enough swap space for hibernation

2020-11-15 Thread Chris Murphy
On Fri, Nov 13, 2020 at 11:10 PM Samuel Sieb wrote: > > On 11/13/20 9:39 PM, Tim via users wrote: > > On Fri, 2020-11-13 at 21:24 +0530, Sreyan Chakravarty wrote: > >> I have no idea why this is happening when I have 8GB of free swap space : > >> > >> $ free -h > >>totalus

Re: Not enough swap space for hibernation

2020-11-13 Thread Samuel Sieb
On 11/13/20 9:39 PM, Tim via users wrote: On Fri, 2020-11-13 at 21:24 +0530, Sreyan Chakravarty wrote: I have no idea why this is happening when I have 8GB of free swap space : $ free -h totalusedfree shared buff/cache available Mem: 7.7Gi

Re: Not enough swap space for hibernation

2020-11-13 Thread Tim via users
On Fri, 2020-11-13 at 21:24 +0530, Sreyan Chakravarty wrote: > I have no idea why this is happening when I have 8GB of free swap space : > > $ free -h > totalusedfree shared buff/cache > available > Mem: 7.7Gi 1.6Gi 4.1Gi 269Mi

Re: Not enough swap space for hibernation

2020-11-13 Thread Sreyan Chakravarty
On Fri, Nov 13, 2020 at 9:29 PM Jonathan Billings wrote: > I believe that using a swap *file* for hibernation requires special > steps, as described here: > > https://www.kernel.org/doc/html/latest/power/swsusp-and-swap-files.html > > I believe you need to add the kernel parameters to make it wor

Re: Not enough swap space for hibernation

2020-11-13 Thread Jonathan Billings
ystemctl hibernate > Failed to hibernate system via logind: Not enough swap space for hibernation > > I have no idea why this is happening when I have 8GB of free swap space : > > $ free -h > totalusedfree shared buff/cache > avai

Not enough swap space for hibernation

2020-11-13 Thread Sreyan Chakravarty
Hi, I have just upgraded to the new 5.8 kernel on Fedora 32. I have also configured my swap as a swap file of 8GB. But when I try to hibernate using the following command: $ systemctl hibernate Failed to hibernate system via logind: Not enough swap space for hibernation I have no idea why