That doesn't disable swap. It only minimizes the tendency to swap.
When I still had 8 GiB of RAM in my machine, it was still swapping ─ and erratically too ─ with vm.swappiness set to 0, and even now that I've got 16 GiB of RAM, creating a backup with timeshift also caused the kernel to start swapping.
So I've disabled swap on my system, although I still have both of my swap partitions, just in case I ever need to reactivate them.
Correct, and then the OP should also rebuild the initramfs so as to remove it there too, as well as that the resume=<UUID_here> should also be removed from /etc/default/grub.
So these are the necessary steps...
Comment out the swap partition in /etc/fstab.
Remove resume=UUID=303a8e7e-8c4e-4142-b5ff-ae7aea35f0d8 from /etc/default/grub and run...
Remove the resume hook from /etc/mkinitcpio.conf and run...
You've got a point, but at the same time, one could argue that the removal of the swap partition and swap file as described in that section of the wiki is not intended as a literal guide for removing swap, but rather as an example of what you need to do if you want to make use of systemd-swap.
That all said, I'm not sure who's responsible for maintaining the Manjaro wiki. That would probably be one of the Manjaro team members ─ pinging @Moderator-Team, because they will know.
Gparted, and deleted swap partition.
Rebooted and everything fine.
Wiki is then correct, no need of "sudo update-grub" and so forth.
my understanding is that a swap partition has the advantage over a swap file, that
1/ it (can?) take all the partition, no dynamic shrink or grow as with a swap file or does it create a swap file into the swap partition?
2/ several OS can use the same swap partition (for instance, you installed N Linux and boot in one of the N OS )?
while if you don't have a swap partition every OS might need its very own swap file.
3/ hybernate takes place in swap partition or swap file or it's completely independant?
4/ eventhough there is no swap partition, systemd can enforce a swap file on the sys partition?
5/ If there is a swap partition, can systemd still enforce a swap file on the sys partition in case it would consider too small?? For instance, your fooling by creating a swap partition of 10Mb
To be more pratical, imagine you have:
10Gb swap partition
At the moment you want to hibernate,
say the system as eaten up 7.5Gb of RAM and 1.5Gb of swap, aka all together 9Gb.
Will it store 7.5Gb as already 1.5Gb is on disk, or does it needs 9Gb??
Where will the system physically store the hibernation?
No, a swap partition is unformatted ─ there is no filesystem on that partition, and thus there aren't any files on it either. The kernel accesses the raw blocks directly. But the downside ─ at least, some people feel that it's a negative ─ is that the partition takes up a static amount of space on the drive.
With a swap file, the file itself must be set up with special attributes to allow the kernel to access the raw blocks, especially with an advanced filesystems like btrfs, which employs copy-on-write and inline compression. Those techniques may not be used on a swap file.
In addition to that, a swap file resides on a filesystem, which means that the kernel must pass through the filesystem layer in order to access the raw blocks the file is comprised of. Nowadays the performance impact of this is minimal and barely noticeable, if at all. But it's still not the natural way for the kernel to access swap, even though the advantage is that a swap file can more easily be resized if need be than a swap partition, and this is why many have begun using a swap file instead of a swap partition.
In essence, it's a hack for emergency situations ─ where you are suddenly in need of more swapping capacity than you had accounted for when you created the swap partition(s) ─ that is becoming the mainstream usage pattern, mostly because today's newbies come from an operating system that has always used swap files instead of a swap partition.
That is correct, albeit that I have to add the following... If you are dual-booting between GNU/Linux distributions with a single common swap partition, then you may of course not hibernate one system and boot into the other, because the hibernation process uses the swap partition to store the contents of the RAM before the hardware is powered down.
No, it indeed uses the swap space ─ file or partition ─ that the system has at its discretion.
I'm afraid I can't answer that because I don't use systemd-swap. I have static swap partitions ─ one on the SSD containing my system and one on a HDD that contains my backups ─ and I prefer to decide for myself whether I'll enable swap or not. I also don't hibernate my system.
2/ with a single common swap partition, then you may of course not hibernate one system and boot into the other
Any idea, with "my example", I start to wonder in this example if a swap partition of 10Gb is sufficient, or must to be greater than 1.5Gb + 9Gb or I do miss a point with the answer to 3/ & 4/
I can image, the system copying the RAM swap into the filesystem to release space in the swap partition and then dump the hybernation onto the swap partition, but it's my imagination.