Re: Adding file swap on btrfs

2022-12-23 Thread Chris Murphy
options), and inside you'll see what appears to be two directories: root and home. Those are the subvolumes the installer creates by default. Create a new subvolume in here and add it to fstab such that: UUID=$fsuuid /var/swap btrfs noatime,subvol=swap 0 0 I use chattr +C on this swap

Re: Adding file swap on btrfs

2022-12-19 Thread Barry
> On 19 Dec 2022, at 19:59, Neal Becker wrote: > >  > I've just installed f37 on a new lenovo x1 carbon. > One thing, the installation didn't setup any swap (other than zswap). > That is the preferred way to setup swap. Research has shown that use of swap files on HDD or SSD is far worse

Re: Adding file swap on btrfs

2022-12-19 Thread Samuel Sieb
On 12/19/22 12:19, Jonathan Billings wrote: On Dec 19, 2022, at 15:10, Samuel Sieb wrote: On 12/19/22 11:58, Neal Becker wrote: I've just installed f37 on a new lenovo x1 carbon. One thing, the installation didn't setup any swap (other than zswap). After a bit of reading I found sudo btrfs

Re: Adding file swap on btrfs

2022-12-19 Thread Jonathan Billings
On Dec 19, 2022, at 15:10, Samuel Sieb wrote: > > On 12/19/22 11:58, Neal Becker wrote: >> I've just installed f37 on a new lenovo x1 carbon. >> One thing, the installation didn't setup any swap (other than zswap). >> After a bit of reading I found >> sudo btrfs filesystem mkswapfile -s 32G

Re: Adding file swap on btrfs

2022-12-19 Thread Samuel Sieb
On 12/19/22 12:13, Richard Shaw wrote: On Mon, Dec 19, 2022 at 2:10 PM Samuel Sieb > wrote: On 12/19/22 11:58, Neal Becker wrote: > I've just installed f37 on a new lenovo x1 carbon. > One thing, the installation didn't setup any swap (other than zswap).

Re: Adding file swap on btrfs

2022-12-19 Thread Richard Shaw
On Mon, Dec 19, 2022 at 2:10 PM Samuel Sieb wrote: > On 12/19/22 11:58, Neal Becker wrote: > > I've just installed f37 on a new lenovo x1 carbon. > > One thing, the installation didn't setup any swap (other than zswap). > > > > After a bit of reading I found > > sudo btrfs filesystem mkswapfile

Re: Adding file swap on btrfs

2022-12-19 Thread Jonathan Billings
On Dec 19, 2022, at 14:59, Neal Becker wrote: > I've just installed f37 on a new lenovo x1 carbon. > One thing, the installation didn't setup any swap (other than zswap). > > After a bit of reading I found > sudo btrfs filesystem mkswapfile -s 32G /swapfile > But: > sudo swapon -v /swapfile >

Re: Adding file swap on btrfs

2022-12-19 Thread Samuel Sieb
On 12/19/22 11:58, Neal Becker wrote: I've just installed f37 on a new lenovo x1 carbon. One thing, the installation didn't setup any swap (other than zswap). After a bit of reading I found sudo btrfs filesystem mkswapfile -s 32G /swapfile But:  sudo swapon -v /swapfile swapon: /swapfile:

Re: Adding file swap on btrfs

2022-12-19 Thread Neal Becker
On Mon, Dec 19, 2022 at 2:58 PM Neal Becker wrote: > I've just installed f37 on a new lenovo x1 carbon. > One thing, the installation didn't setup any swap (other than zswap). > > After a bit of reading I found > sudo btrfs filesystem mkswapfile -s 32G /swapfile > But: > sudo swapon -v

Adding file swap on btrfs

2022-12-19 Thread Neal Becker
I've just installed f37 on a new lenovo x1 carbon. One thing, the installation didn't setup any swap (other than zswap). After a bit of reading I found sudo btrfs filesystem mkswapfile -s 32G /swapfile But: sudo swapon -v /swapfile swapon: /swapfile: found signature [pagesize=4096,

Re: Swap on BTRFS

2020-11-11 Thread Patrick O'Callaghan
On Wed, 2020-11-11 at 01:12 -0700, Chris Murphy wrote: > On Thu, Nov 5, 2020, 3:24 PM Patrick O'Callaghan > wrote: > > > > This is a clean install, so it's enabled by default and has reserved > > 4GB. I think that's what's actually causing the OOMs. I have 16GB of > > RAM. On F32 I could run an

Re: Swap on BTRFS

2020-11-11 Thread Patrick O'Callaghan
On Wed, 2020-11-11 at 01:04 -0700, Chris Murphy wrote: > On Thu, Nov 5, 2020, 10:03 AM Patrick O'Callaghan > wrote: > > > The swapon(8) man page says: > > > >    The swap file implementation in the kernel expects to be able to > > write > >    to the file directly, without the assistance of

Re: Swap on BTRFS

2020-11-11 Thread Chris Murphy
On Thu, Nov 5, 2020, 3:24 PM Patrick O'Callaghan wrote: > This is a clean install, so it's enabled by default and has reserved > 4GB. I think that's what's actually causing the OOMs. I have 16GB of > RAM. On F32 I could run an 8GB VM with hugepages, i.e. dedicated > memory, plus normal stuff

Re: Swap on BTRFS

2020-11-11 Thread Chris Murphy
On Thu, Nov 5, 2020, 10:03 AM Patrick O'Callaghan wrote: > The swapon(8) man page says: > >The swap file implementation in the kernel expects to be able to > write >to the file directly, without the assistance of the filesystem. This > is a >problem on files with holes or on

Re: Swap on BTRFS

2020-11-06 Thread Patrick O'Callaghan
On Fri, 2020-11-06 at 12:50 -0400, George N. White III wrote: > > # chattr +C swapfile > > chattr: Invalid argument while setting flags on swapfile > > > > Mybe we are no lnpger meant to use chattr: Manual page btrfs- > property(8) > says: > > "btrfs property provides an unified and

Re: Swap on BTRFS

2020-11-06 Thread Patrick O'Callaghan
On Fri, 2020-11-06 at 10:59 -0800, Samuel Sieb wrote: > On 11/6/20 3:36 AM, Patrick O'Callaghan wrote: > > On Thu, 2020-11-05 at 15:23 -0800, Samuel Sieb wrote: > > > On 11/5/20 2:23 PM, Patrick O'Callaghan wrote: > > > > On Thu, 2020-11-05 at 10:47 -0800, Samuel Sieb wrote: > > > > > Yes. But

Re: Swap on BTRFS

2020-11-06 Thread Samuel Sieb
On 11/6/20 3:36 AM, Patrick O'Callaghan wrote: On Thu, 2020-11-05 at 15:23 -0800, Samuel Sieb wrote: On 11/5/20 2:23 PM, Patrick O'Callaghan wrote: On Thu, 2020-11-05 at 10:47 -0800, Samuel Sieb wrote: Yes. But have you enabled zram yet for swap? This is a clean install, so it's enabled by

Re: Swap on BTRFS

2020-11-06 Thread Patrick O'Callaghan
On Fri, 2020-11-06 at 23:03 +0800, Qiyu Yan wrote: > Okay, I think I get it now, just don't set > btrfs property set /SWAP compression no > seems that this lead to something strange, while I can't tell why but > it is totally fine to do so, since nocow means no datacsum and no >

Re: Swap on BTRFS

2020-11-06 Thread George N. White III
actually wondering about precisely that, so I'm glad to > > > > see it's supported with the right incantations. > > > > > > Trying to follow the instructions in the above URL, but clearly I'm > > > misunderstanding something: > > > > > >

Re: Swap on BTRFS

2020-11-06 Thread Qiyu Yan
Okay, I think I get it now, just don't set btrfs property set /SWAP compression no seems that this lead to something strange, while I can't tell why but it is totally fine to do so, since nocow means no datacsum and no compression ___ users mailing list

Re: Swap on BTRFS

2020-11-06 Thread Patrick O'Callaghan
On Fri, 2020-11-06 at 21:08 +0800, Qiyu Yan wrote: > see > lsattr swapfile # lsattr swapfile swapfile # poc ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-le...@lists.fedoraproject.org

Re: Swap on BTRFS

2020-11-06 Thread Qiyu Yan
see lsattr swapfile ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines:

Re: Swap on BTRFS

2020-11-06 Thread Patrick O'Callaghan
antations. > > > > Trying to follow the instructions in the above URL, but clearly I'm > > misunderstanding something: > > > > # btrfs sub create /SWAP > > Create subvolume '//SWAP' > > # btrfs property set /SWAP compression no > > # btrfs sub show /SWAP > > r

Re: Swap on BTRFS

2020-11-06 Thread Qiyu Yan
archlinux.org/index.php/btrfs#Swap_file for instructions > > > > Great. I was actually wondering about precisely that, so I'm glad to > > see it's supported with the right incantations. > > Trying to follow the instructions in the above URL, but clearly I'm > misunderstanding something:

Re: Swap on BTRFS

2020-11-06 Thread Patrick O'Callaghan
y wondering about precisely that, so I'm glad to > see it's supported with the right incantations. Trying to follow the instructions in the above URL, but clearly I'm misunderstanding something: # btrfs sub create /SWAP Create subvolume '//SWAP' # btrfs property set /SWAP compression no #

Re: Swap on BTRFS

2020-11-06 Thread Patrick O'Callaghan
On Thu, 2020-11-05 at 15:23 -0800, Samuel Sieb wrote: > On 11/5/20 2:23 PM, Patrick O'Callaghan wrote: > > On Thu, 2020-11-05 at 10:47 -0800, Samuel Sieb wrote: > > > Yes. But have you enabled zram yet for swap? > > > > This is a clean install, so it's enabled by default and has reserved > >

Re: Swap on BTRFS

2020-11-06 Thread Patrick O'Callaghan
On Fri, 2020-11-06 at 05:43 +, Qiyu Yan wrote: > You can use swapfile on btrfs with nocow > > See: > https://btrfs.wiki.kernel.org/index.php/FAQ#Does_btrfs_support_swap_files.3F > > And > > https://wiki.archlinux.org/index.php/btrfs#Swap_file for instructions Great. I was actually

Re: Swap on BTRFS

2020-11-06 Thread Patrick O'Callaghan
On Thu, 2020-11-05 at 17:46 -0600, Gabriel Ramirez wrote: > On 11/5/20 4:23 PM, Patrick O'Callaghan wrote: > > This is a clean install, so it's enabled by default and has reserved > > 4GB. I think that's what's actually causing the OOMs. I have 16GB of > > RAM. On F32 I could run an 8GB VM with

Re: Swap on BTRFS

2020-11-05 Thread Qiyu Yan
Yes, only available on 5.x+ kernel and only for one disk btrfs volume. And for btrfs, nocow means no checksumming. Because you can't keep atomicity with csum when not using cow. ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe

Re: Swap on BTRFS

2020-11-05 Thread Samuel Sieb
On 11/5/20 9:43 PM, Qiyu Yan wrote: You can use swapfile on btrfs with nocow See: https://btrfs.wiki.kernel.org/index.php/FAQ#Does_btrfs_support_swap_files.3F So it's something new with 5.x kernels. I wonder how that works with the checksumming.

Re: Swap on BTRFS

2020-11-05 Thread Qiyu Yan
You can use swapfile on btrfs with nocow See: https://btrfs.wiki.kernel.org/index.php/FAQ#Does_btrfs_support_swap_files.3F And https://wiki.archlinux.org/index.php/btrfs#Swap_file for instructions ___ users mailing list --

Re: Swap on BTRFS

2020-11-05 Thread Earl Ramirez
On Thu, 2020-11-05 at 15:23 -0800, Samuel Sieb wrote: > Check what's using the memory.  zram doesn't *reserve* memory.  It > doesn't use any memory until you start swapping out.  Try increasing > the > zram size.  I would suggest at least 12GB.  On my 12GB laptop, I have > it > set to 12GB.

Re: Swap on BTRFS

2020-11-05 Thread Gabriel Ramirez
On 11/5/20 4:23 PM, Patrick O'Callaghan wrote: This is a clean install, so it's enabled by default and has reserved 4GB. I think that's what's actually causing the OOMs. I have 16GB of RAM. On F32 I could run an 8GB VM with hugepages, i.e. dedicated memory, plus normal stuff including multiple

Re: Swap on BTRFS

2020-11-05 Thread Samuel Sieb
On 11/5/20 2:23 PM, Patrick O'Callaghan wrote: On Thu, 2020-11-05 at 10:47 -0800, Samuel Sieb wrote: Yes. But have you enabled zram yet for swap? This is a clean install, so it's enabled by default and has reserved 4GB. I think that's what's actually causing the OOMs. I have 16GB of RAM. On

Re: Swap on BTRFS

2020-11-05 Thread Patrick O'Callaghan
On Thu, 2020-11-05 at 10:47 -0800, Samuel Sieb wrote: > On 11/5/20 9:02 AM, Patrick O'Callaghan wrote: > > The swapon(8) man page says: > > > > The swap file implementation in the kernel expects to be able to > > write > > to the file directly, without the assistance of the

Re: Swap on BTRFS

2020-11-05 Thread Samuel Sieb
On 11/5/20 9:02 AM, Patrick O'Callaghan wrote: The swapon(8) man page says: The swap file implementation in the kernel expects to be able to write to the file directly, without the assistance of the filesystem. This is a problem on files with holes or on copy-on-write files on

Swap on BTRFS

2020-11-05 Thread Patrick O'Callaghan
The swapon(8) man page says: The swap file implementation in the kernel expects to be able to write to the file directly, without the assistance of the filesystem. This is a problem on files with holes or on copy-on-write files on filesystems like Btrfs. As I'm getting OOM