Selecting Swap Space in the EndeavourOS Installation

Hi friends.

I need to create a 16gb swap file during the installation of my EndeavourOS.

I haven’t tried the latest EOS ISO yet, but on the previous ISO, when I selected “Erase Disk + Swap to File”, I couldn’t continue with the installation for some reason I don’t remember, but I think a screen appeared to create the partition Swap manually (or something like that), and I didn’t know how to do it.

So how do I create a Swap on EOS after selecting “Erase Disk”?

Also, what is the difference between the 3 Swaps available during EOS installation? Since I have seen several people use the 3 different types of Swap.

I need 16gb of Swap for Blender, since it helps me alleviate the % of work on the PC by preloading the textures before rendering. I know that it is always better to buy more ram, but the Swap helps a little, even if it is not much.

Thanks in advance.

By the way, I am referring to this part of the installation (the screenshot is not mine):

There is no trick, you just pick the option you want from the box.

The only difference between hibernate/no hibernate is the size. If you pick hibernate, it ensures swap is at least as big as RAM, otherwise it tops out at 8GB.

If you choose swapfile it uses a file instead of a dedicated partition.

Unless you happen to have 16GB of physical ram, it won’t give you a 16GB swap partition. I would select no swap and then just create a swapfile after the install. It is very easy to do. That being said, I don’t think a very large swap file/partition will make blender all that much faster. Pre-caching things from disk back to disk might makes things slower. You would have to test and see what the performance difference between 8GB and 16GB of swap is.

2 Likes

Hi,

You can always create swap later and choose no swap first.
After a succesfull installation you might consider zram-generator

sudo pacman -S --noconfirm zram-generator;sudo vim /etc/systemd/zram-generator.conf

[zram0]
zram-size = min(ram / 2, 4096)
compression-algorithm = zstd
swap-priority = 100
fs-type = swap
1 Like

The only difference is the size, but do both partitions work the same?

But “With Hibernate” I think it saves everything you are doing when you turn off the computer, like the “fast startup” of Windows, right? And I don’t want that.

I mean, I don’t want to use hibernation, sleep or anything like that, so I disabled everything with this:

sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target

Also, is there any performance/speed difference between swap partition or swap file?

Because it seems that the swap file can be deleted/extended/shrinked, but I think not the swap partitions.

But on the other hand the partitions seem more “stable” since they have an “isolated” space, and perhaps the swap file needs to take GBs from the EOS storage, and I don’t know if this can cause instability or something in the future.

I see, thank you very much. I have 16gb of ram, I forgot to mention it.

I know this won’t make much difference, but even if it relieves 5-10%, it will be enough. Sometimes I have to open files I download with very heavy textures and my EOS gets stuck and I have to REISUB. Perhaps this can mitigate or prevent this from happening.

If you don’t recommend the swap partition over the swap file, then I will create a swap file and test the difference.

By the way, I’m reading the wiki tutorial:

https://wiki.archlinux.org/title/swap#Swap_file_creation

And I want to make sure I don’t break something, is this correct and do these commands still work? (I just changed “4gb” to “16gb”):

Use mkswap to create a swap file the size of your choosing. For example, creating an 4 GiB swap file:

# mkswap -U clear --size 16G --file /swapfile

Activate the swap file:

# swapon /swapfile

Finally, edit the fstab configuration to add an entry for the swap file:

/etc/fstab

/swapfile none swap defaults 0 0

The 1st command creates the file, the 2nd command activates it (I didn’t know it needed to be activated). But what do the 3rd and 4th command do? (fstab). Add the swap file to run when starting EOS?

Sorry, a lot of text!

Yes, they do.

While that is true, selecting “With hibernate” in the installer only changes the size. It makes sure the swap partition is big enough to support hibernation.

It is unlikely you would notice any material performance difference in most desktop use cases.

A swapfile won’t create instability.

If you are running out of memory, having some swap can help. However, having lots of swap probably won’t help more than having a reasonable amount of swap. In rare cases, it could decrease performance. I would start with 8GB and see how it goes.

They should, as long as you are not using a btrfs filesystem.

Those aren’t command. The third is the name of a file. The fourth is is a line you should add to the file.

2 Likes