Changed swap partition size, now it takes several minutes to boot (instead of seconds before)

I just extended my swap partition. Then Tumbleweed stopped using it altogether. Here’s my setup:

I started with ~32GiB of swap, and extended to the size in the above picture using a live USB and Gparted.

So I tried:

  • sudo mkswap /dev/nvme0n1p3 then reboot: still no swapon
  • swapon in Gparted, sudo grub2-mkconfig -o /boot/grub2/grub.cfg, then reboot: still nothing
  • added resume=/dev/nvme0n1p3 to the kernel parameters in YaST bootloader, regenerate Grub config then reboot: still nothing
  • told system to mount swap in YaST partitionning: that did it.

But. The system still takes several minutes to boot, instead of seconds before. What’s going on…? I noticed that even though locked, the swap partitionned is not used (Used: 0.00GiB in Gparted, even after a while)…

Please show

cat /etc/fstab

BTW, I doubt that Gparted knows anything about swap usage.

UUID=f1bc6821-bb1c-45a4-9afb-1291fbb5502f  /                       btrfs  defaults                      0  0
UUID=f1bc6821-bb1c-45a4-9afb-1291fbb5502f  /var                    btrfs  subvol=/@/var                 0  0
UUID=f1bc6821-bb1c-45a4-9afb-1291fbb5502f  /usr/local              btrfs  subvol=/@/usr/local           0  0
UUID=f1bc6821-bb1c-45a4-9afb-1291fbb5502f  /srv                    btrfs  subvol=/@/srv                 0  0
UUID=f1bc6821-bb1c-45a4-9afb-1291fbb5502f  /root                   btrfs  subvol=/@/root                0  0
UUID=f1bc6821-bb1c-45a4-9afb-1291fbb5502f  /opt                    btrfs  subvol=/@/opt                 0  0
UUID=f1bc6821-bb1c-45a4-9afb-1291fbb5502f  /home                   btrfs  subvol=/@/home                0  0
UUID=f1bc6821-bb1c-45a4-9afb-1291fbb5502f  /boot/grub2/x86_64-efi  btrfs  subvol=/@/boot/grub2/x86_64-efi  0  0
UUID=f1bc6821-bb1c-45a4-9afb-1291fbb5502f  /boot/grub2/i386-pc     btrfs  subvol=/@/boot/grub2/i386-pc  0  0
UUID=1e9c11f4-683d-47ec-a314-c8bde8ec9ad6  swap                    swap   defaults                      0  0
UUID=ecd8e4e2-c30f-4523-97b7-a1d57a4341ab  swap                    swap   defaults                      0  0
UUID=f1bc6821-bb1c-45a4-9afb-1291fbb5502f  /.snapshots             btrfs  subvol=/@/.snapshots          0  0
UUID=972D-34CA                             /boot/efi               vfat   utf8                          0  2

Erm, ok, I guess the problem is obvious now…? Do I simply remove a line from fstab, or is there another cleaner way to do this?

Oh.

Well, when you have in fact only one swap partition, then yes, one entry should be removed.
Do not remove the wrong one!
And IMHO that is the cleanest way to do it. How else?

Why do you need 32GBs of swap? That is way beyond typical.

I’ve been told that with less I’d have trouble with hibernation (I’ve got 32GB of RAM) (?)

@ultome So how long does it take to boot your system, how long does it take to return from hibernate?

Bear in mind I don’t run hibernation, sleep or swap (even on a 4GB RAM tablet) on any systems here.

Here my desktop with tumbleweed does hibernate. Waking up from hibernation takes 1 minute where as
I can boot my machine within 10 seconds. So I pick shutdown rather than hibernate. My two cents.
Oh, my swap partition is 20GB.

Unfortunately, I do need the hibernate functionnality for my work (I move my laptop from places to places several times a day).

Ok, there’s no problem with that. Me too I need a bigger swap for some stuffs.
Take a look at this might help.

I’s just a poll but you will get an idea.
To add use one swap partition, there are two on yours.

@conram I have 128GB in my Desktop :wink: But MicroOS runs no swap, I run kubernetes, so no swap there either. Systems are either busy, or off… newer hardware and boot times have improved as well… and then on Tumbleweed with secure boot and kernel lockdown…

And what about your RAM?

Hibernate compresses the memory image when storing in swap so you need just a bit over 1/2 memory size.

Unless you do extreme memory usage 32 gig should not require swap for normal running. A samll amount helps if you run off the top of your memory because when you run out Linux crashes!!!

I have only 16GB of RAM. :smiling_face_with_tear: That’s the only thing I can afford.
I just rely on my GPU’s memory for help in the stuffs I am working.

I guess during boot the system looks for one of the 2 swap partitions, which isn’t there, timeout is about 2 minutes, then boots continues.

Yes removing the extra swap entry in fstab did the trick.

Two days after that was suggested???

Erm, no, two days ago… It seems I forgot to mention it here eventually, I apologize ^^’ (though I’m not sure why I have to, what if I didn’t get a chance do restart my computer in the last two days, because of work or something?)

Which means that there were about 10 more or less off-topic posts in two days and in the mean time your problem was solved all the time :angry:

Sometimes I ask myself why I am trying to help here.

1 Like

It’s fine and okay hcvv, you’re doing alright to help :+1: :index_pointing_at_the_viewer: :+1:

1 Like