Swap partition too small :(

Windows is a system designed to use swap constantly, but Zorin OS is not. Relying on swap does not make performance practical.

In my experience I can run Zorin 16 Core with 4GB RAM, but it would be better to install Lite instead.

1 Like

Actually, 2G is too small, too, in my opinion. I had to increase it the way @PlumpKibbles described it. I think the installer should provide an option to set the swap size, or at least provide several defaults, as many arch based distros do in the Calamares installer.

Oh I agree for sure - but it's Ubuntu under the hood; pretty standard in terms of Ubuntu ways, heh. I am glad it's pretty easy now though with the swapfile instead of the partition :wink: I do have a partition on another device, but it's a permanent thing; only 1GB, tiny eMMC storage..

Gday @lakimens , Welcome to the community!

Could you please tell us how you created your bootable device,
What program?
Device (usb,SD card,dvd)?

Are you dual booting?

"1Gb after install says a red flag"

Could you also tell us about your pc
Laptop/Desktop.
Make/Brand/or Motherboard:?
RAM: 16
cpu:?
Drive & size/SSD?HDD:?
Graphics:?

You only need a swap area for HDD's not SSD's. In the unofficial manual for Zorin 15 I wrote how to manually partition the drive at point of install - you choose the 'something else' method.

When partitioning manually I usually just have a primary partition marked for '/' root filesystem of 80 Gb, formatted to Ext4 and flagged as bootable. I then create a logical/extended partition for the remainder of the drive. Before GNU/Linux OS's used swap files they would place the swap area at the end of the drive - so this is what I do when partitioning manually. I create the swap area at the end of the extended/logical partition and make it double the amount of physical RAM on board, so in my case, 32 Gb as I have 16 Gb of RAM. Everything in front of that I format as Ext4 and mark it '/home'. (I normally run 1 Tb Western Digital Black HDDs.)

I never bother with Encryption as experience has shown me that it is oh so easy to lose your data. I always took note of OpenSuse 9.3 Professional's advice that I bought during installation - when you selected encryption option, it warned that their is a chance of data loss - that was enough to convince me that Encryption is a bad idea. It also happened at work. My line manager asked me to make her Business Manager's hard drive secure for confidential data. This was Windows XP, created the Encrypted partition for data, 3 days later the machine fell over, as did all the data. Fortunately, the Business Manager had the nouse to make a backup of her data so only one day's data was lost.

1 Like

I've just automatically followed the double physical RAM advice after extensive research on the matter a long time ago. It has taken me many years to get to a place with a 16 Gb of RAM machine. And in any case I have plenty of space on a 1 Tb drive.

1 Like

16 GB ram is already enough for doing a lot of things on windows, so keeping in mind linux uses far less ram, I dont see how would it be neccessary to have a swap partition

my laptop has 12 GB ram (10.7 GB detected by zorin) and with that I have been able to use a virtual machine of 6 GB, have some tabs open on firefox, do some homework in libreoffice at the same time and there was still some unused ram

If you do some kind of ram-intensive work that requires more than that (maybe a very detailed 3D animation?) then that makes more sense. But for normal daily usage or gaming, you dont really need more

Any reason for that ?

If swap area is accessed many times it means the life of the SSD may be shortened. HDD probably only necessary if low RAM, but I always err on the side of caution!

So what you suggest for SSD ? I have 16 GB RAM

You don't need swap area for SSD. If it puts a swap file in (the installer) it should make itself a suitable size. I cannot check this any more as the SSD went into my eldest's Desktop as their hotswap HDD sounded like it was failing to put Windows 11 on it.

Good read here:

4 Likes

I clicked "Like" on two of @swarfendor437 's posts for good reason.
Swap is useful in the right circumstances: It can prevent an out of memory crash under an intense workload.
But it is not Free RAM.

When the system needs to fall back to swap (Partition or file) there will be a delay in that action. It won't prevent sluggishness, nor will it clear out the unnecessary caching of used data in RAM.

I do not use Swap (I am on SSD)- and when my RAM fills up, even higher than 90%, on Zorin OS, the system clears as necessary, keeping the performance smooth and uninterrupted.
If I enable swap, however, then I get a lot of pauses and delays as the system switches to accessing swap. It is not a smooth experience.

On rare occasions, I may run the following to clear out RAM while working.

sudo sync

sudo sysctl -w vm.drop_caches=3

sudo sync

Warning: It is necessary to sync both before and after clearing RAM!

3 Likes

If you have a SSD as your primary drive, and you need additional swap space due to having low memory, I'd suggest:

  1. get more memory (if possible)
  2. buy a spinning-rust USB drive and create a partition on it, then use that partition as a second swap space, with the same priority as the first swap space.

Nah, it is not my primary mission :slight_smile:

I just want to have in case if needed (when I am playing steam, multittasking , watching YT etc) but that case is really rare

I have 16GB RAM in my Asus laptop - zero swap, but also using NVMe storage. I'm usually sitting around 1 - 2.5GB RAM use on idle; just a tad more with Firefox open. I've not ran into any issues with no swap - even did some 'intense' video editing with Kdenlive lol but, didn't have an effect on RAM - just about 5GB used, and still ~8GB free to use.

To each their own!

Hello,

Thanks to everyone for the replies, this has kinda blown up which I did not expect

I believe it's a partition, I'll post swapon here here:

lakimens@lakimens-zorin:~$ swapon -s
Filename				Type		Size	Used	Priority
/dev/dm-2                              	partition	999420	867728	-2

My device is Lenovo Yoga 7 14", AMD 6800U, 16GB RAM, no discrete GPU, 512GB SSD Storage.

I downloaded the image from the official website (core version) and dragged it into my ventoy USB drive, then booted from the drive and installed it from there.

Hope this is enough info! Let me know if something more is needed!

I understand, but I mostly want swap equal to RAM to be able to hibernate the device.

I find sleep somewhat unreliable at times. I've had devices wake up in my bag and waste all the battery, which can't happen under hibernate.

1 Like

Gday @lakimens ,
Try this link may help.

For swap size create it to double your ram,,
Eg: If you have 4Gb, create an 8Gb swap file.

So engaging in enlarging the file size will enlarge the swap?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.