Hi Everyone,
I've got a Fedora 38 install (upgrade from F37). The install happened with Anaconda. Anaconda created the compressed memory swap file. I resized the disk and added a proper swap partition. Now I need to modify /etc/fstab and disable the compressed memory swap file. In the screen text below, /dev/nvme0n1p4 is the new partition.
My Google-fu really sucks today. I cannot find a discussion of it.
How do I modify fstab to remove the compressed memory swap file?
Thanks in advance.
---
$ sudo blkid [sudo] password for jwalton: /dev/nvme0n1p3: LABEL="fedora_localhost-live" UUID="c9556f10-0bc7-4018-829f-7a892300b2e0" UUID_SUB="12db21cb-7e46-4878-a52f-4a8be1e29525" BLOCK_SIZE="4096" TYPE="btrfs" PARTLABEL="fedora" PARTUUID="6513b9de-51e5-4714-942f-2d2c315f3a3c" /dev/nvme0n1p1: UUID="B78D-F611" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="94c2d79e-02a3-4af8-bb8c-e62a1ebadf47" /dev/nvme0n1p4: UUID="26b85275-6dc9-4ffa-914c-e992d216a3e6" TYPE="swap" PARTUUID="5a906783-7377-48b8-ab47-c0f45d861171" /dev/nvme0n1p2: UUID="27d17ecd-07db-46e6-ace5-6edbfd06724f" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="44d9d521-cf65-414d-ba2b-f69927b5bcab" /dev/zram0: LABEL="zram0" UUID="823c4078-30b0-489e-8f48-5b818696680d" TYPE="swap"
$ cat /etc/fstab # /etc/fstab # ... # After editing this file, run 'systemctl daemon-reload' to update systemd # units generated from this file. UUID=c9556f10-0bc7-4018-829f-7a892300b2e0 / btrfs subvol=root,compress=zstd:1 0 0 UUID=27d17ecd-07db-46e6-ace5-6edbfd06724f /boot ext4 defaults 1 2 UUID=B78D-F611 /boot/efi vfat umask=0077,shortname=winnt 0 2 UUID=c9556f10-0bc7-4018-829f-7a892300b2e0 /home btrfs subvol=home,compress=zstd:1 0 0
$ sudo blkid [sudo] password for jwalton: /dev/nvme0n1p3: LABEL="fedora_localhost-live" UUID="c9556f10-0bc7-4018-829f-7a892300b2e0" UUID_SUB="12db21cb-7e46-4878-a52f-4a8be1e29525" BLOCK_SIZE="4096" TYPE="btrfs" PARTLABEL="fedora" PARTUUID="6513b9de-51e5-4714-942f-2d2c315f3a3c" /dev/nvme0n1p1: UUID="B78D-F611" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="94c2d79e-02a3-4af8-bb8c-e62a1ebadf47" /dev/nvme0n1p4: UUID="26b85275-6dc9-4ffa-914c-e992d216a3e6" TYPE="swap" PARTUUID="5a906783-7377-48b8-ab47-c0f45d861171" /dev/nvme0n1p2: UUID="27d17ecd-07db-46e6-ace5-6edbfd06724f" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="44d9d521-cf65-414d-ba2b-f69927b5bcab" /dev/zram0: LABEL="zram0" UUID="823c4078-30b0-489e-8f48-5b818696680d" TYPE="swap"
On 6/26/23 20:48, Jeffrey Walton wrote:
Hi Everyone,
I've got a Fedora 38 install (upgrade from F37). The install happened with Anaconda. Anaconda created the compressed memory swap file. I resized the disk and added a proper swap partition. Now I need to modify /etc/fstab and disable the compressed memory swap file. In the screen text below, /dev/nvme0n1p4 is the new partition.
My Google-fu really sucks today. I cannot find a discussion of it.
How do I modify fstab to remove the compressed memory swap file?
Why would you want to?
The easiest way would be to remove the "zram-generator" package. I don't know off-hand how to disable a generator.
On Tue, Jun 27, 2023 at 2:14 AM Samuel Sieb samuel@sieb.net wrote:
On 6/26/23 20:48, Jeffrey Walton wrote:
I've got a Fedora 38 install (upgrade from F37). The install happened with Anaconda. Anaconda created the compressed memory swap file. I resized the disk and added a proper swap partition. Now I need to modify /etc/fstab and disable the compressed memory swap file. In the screen text below, /dev/nvme0n1p4 is the new partition.
My Google-fu really sucks today. I cannot find a discussion of it.
How do I modify fstab to remove the compressed memory swap file?
Why would you want to?
The compiler is crashing in cc1plus. I'm out-of-memory on a machine with 16GB of RAM. Effectively I'm DoS'd with the btrfs default strategy. Time to do something different... like get rid of that compressed swap file in RAM, use a real swap file, and use memory for programs.
The easiest way would be to remove the "zram-generator" package. I don't know off-hand how to disable a generator.
Thanks.
Jeff
On 6/26/23 23:20, Jeffrey Walton wrote:
On Tue, Jun 27, 2023 at 2:14 AM Samuel Sieb samuel@sieb.net wrote:
On 6/26/23 20:48, Jeffrey Walton wrote:
I've got a Fedora 38 install (upgrade from F37). The install happened with Anaconda. Anaconda created the compressed memory swap file. I resized the disk and added a proper swap partition. Now I need to modify /etc/fstab and disable the compressed memory swap file. In the screen text below, /dev/nvme0n1p4 is the new partition.
My Google-fu really sucks today. I cannot find a discussion of it.
How do I modify fstab to remove the compressed memory swap file?
Why would you want to?
The compiler is crashing in cc1plus. I'm out-of-memory on a machine with 16GB of RAM. Effectively I'm DoS'd with the btrfs default strategy. Time to do something different... like get rid of that compressed swap file in RAM, use a real swap file, and use memory for programs.
It has nothing to do with btrfs. That's just the default and it works really well. You get lots of "extra" memory without the lag of going to the disk. You could add the disk swap as well. You don't have to remove the zram for that.
On Tue, Jun 27, 2023 at 2:40 AM Samuel Sieb samuel@sieb.net wrote:
On 6/26/23 23:20, Jeffrey Walton wrote:
On Tue, Jun 27, 2023 at 2:14 AM Samuel Sieb samuel@sieb.net wrote:
On 6/26/23 20:48, Jeffrey Walton wrote:
I've got a Fedora 38 install (upgrade from F37). The install happened with Anaconda. Anaconda created the compressed memory swap file. I resized the disk and added a proper swap partition. Now I need to modify /etc/fstab and disable the compressed memory swap file. In the screen text below, /dev/nvme0n1p4 is the new partition.
My Google-fu really sucks today. I cannot find a discussion of it.
How do I modify fstab to remove the compressed memory swap file?
Why would you want to?
The compiler is crashing in cc1plus. I'm out-of-memory on a machine with 16GB of RAM. Effectively I'm DoS'd with the btrfs default strategy. Time to do something different... like get rid of that compressed swap file in RAM, use a real swap file, and use memory for programs.
It has nothing to do with btrfs. That's just the default and it works really well. You get lots of "extra" memory without the lag of going to the disk. You could add the disk swap as well. You don't have to remove the zram for that.
I guess that's in the eye of the beholder. I don't like being DoS'd.
Fedora with btrfs is worse than Solaris. Solaris will work with 8 GB of RAM (but usually not less). Fedora can't operate with 16 GB. Ugh...
I'll install a different OS to sidestep the problem.
Jeff
On 6/27/23 00:27, Jeffrey Walton wrote:
On Tue, Jun 27, 2023 at 2:40 AM Samuel Sieb samuel@sieb.net wrote:
On 6/26/23 23:20, Jeffrey Walton wrote:
On Tue, Jun 27, 2023 at 2:14 AM Samuel Sieb samuel@sieb.net wrote:
On 6/26/23 20:48, Jeffrey Walton wrote:
I've got a Fedora 38 install (upgrade from F37). The install happened with Anaconda. Anaconda created the compressed memory swap file. I resized the disk and added a proper swap partition. Now I need to modify /etc/fstab and disable the compressed memory swap file. In the screen text below, /dev/nvme0n1p4 is the new partition.
My Google-fu really sucks today. I cannot find a discussion of it.
How do I modify fstab to remove the compressed memory swap file?
Why would you want to?
The compiler is crashing in cc1plus. I'm out-of-memory on a machine with 16GB of RAM. Effectively I'm DoS'd with the btrfs default strategy. Time to do something different... like get rid of that compressed swap file in RAM, use a real swap file, and use memory for programs.
It has nothing to do with btrfs. That's just the default and it works really well. You get lots of "extra" memory without the lag of going to the disk. You could add the disk swap as well. You don't have to remove the zram for that.
I guess that's in the eye of the beholder. I don't like being DoS'd.
Fedora with btrfs is worse than Solaris. Solaris will work with 8 GB of RAM (but usually not less). Fedora can't operate with 16 GB. Ugh...
I'll install a different OS to sidestep the problem.
I don't know why you're linking this to btrfs. That has nothing at all to do with it. And Fedora works just fine with 16GB. I have it running on ancient computers with only 3GB.
Samuel Sieb wrote:
On 6/26/23 20:48, Jeffrey Walton wrote:
Hi Everyone,
I've got a Fedora 38 install (upgrade from F37). The install happened with Anaconda. Anaconda created the compressed memory swap file. I resized the disk and added a proper swap partition. Now I need to modify /etc/fstab and disable the compressed memory swap file. In the screen text below, /dev/nvme0n1p4 is the new partition.
My Google-fu really sucks today. I cannot find a discussion of it.
How do I modify fstab to remove the compressed memory swap file?
Why would you want to?
The easiest way would be to remove the "zram-generator" package. I don't know off-hand how to disable a generator.
I think the zram-generator.conf file provides two methods (one is effectively the same as you've suggested ;).
$ cat /usr/lib/systemd/zram-generator.conf # This config file enables a /dev/zram0 device with the default settings: # — size — same as available RAM or 8GB, whichever is less # — compression — most likely lzo-rle # # To disable, uninstall zram-generator-defaults or create empty # /etc/systemd/zram-generator.conf file. [zram0] zram-size = min(ram, 8192)
The other would be something like:
sudo sh -c '>/etc/systemd/zram-generator.conf'
If the file doesn't already exist, `sudo touch ...` would be even simpler, of course.
On Mon, 2023-06-26 at 23:48 -0400, Jeffrey Walton wrote:
I've got a Fedora 38 install (upgrade from F37). The install happened with Anaconda. Anaconda created the compressed memory swap file. I resized the disk and added a proper swap partition. Now I need to modify /etc/fstab and disable the compressed memory swap file. In the screen text below, /dev/nvme0n1p4 is the new partition.
What does this have to do with BTRFS? The compressed memory swap file is present in Fedora, no matter what filesystem you use.
man zramctl
poc
On Tue, Jun 27, 2023 at 5:20 AM Patrick O'Callaghan pocallaghan@gmail.com wrote:
On Mon, 2023-06-26 at 23:48 -0400, Jeffrey Walton wrote:
I've got a Fedora 38 install (upgrade from F37). The install happened with Anaconda. Anaconda created the compressed memory swap file. I resized the disk and added a proper swap partition. Now I need to modify /etc/fstab and disable the compressed memory swap file. In the screen text below, /dev/nvme0n1p4 is the new partition.
What does this have to do with BTRFS? The compressed memory swap file is present in Fedora, no matter what filesystem you use.
man zramctl
poc
I have sometimes hit a bug in gcc that caused (infinite?) memory growth. Tried clang?