t started out innocently enough, I wanted to install eOS on virtualbox.
Here are the specs:-
1.4gb ram
2.125mb video
3.Storage VS 60gb Actual 10.85
4.Swap file 512mb.
Using eOS’s default swap file was 512gb. Now the point of contention is why only 512mb swap on 4mb ram?
Helpful eOS forum users pointed me to:-
https://discovery.endeavouros.com/storage-and-partitions/adding-swap-after-installation/2021/03/
However, I missed the point twice. When you create the new size swap it automatically updates the /etc/fstab using the UUID.
It has created the correct file size but cannot be accessed.
The /etc/fstab must be edited manually, remove the UUID entry and manually add
‘/swapfile none swap defaults 0 0’. Now it will work.
Using the original 512mb swap, I was able to run out of swap (and freeze my system) very quickly.
Armed now with my new 2gb swap file I wanted to see what it would take to break it. Here’s what I did.
I used 4 work place switcher just to keep the amount of open apps in order.
1.100 mousepad windows
Was the first sign of swap been used
free -m
total used free shared buff/cache available
Mem: 3920 3091 136 32 692 575
Swap: 2047 9 2038
2.Two firefox windows 130 tabs. Plus 100 mousepad windows
free -m
total used free shared buff/cache available
Mem: 3920 3582 111 24 226 97
Swap: 2047 1484 563
This is where the swap starts to work used swap increased by 197mb and available up from 97mb to 248mb.
Add another 5 FF tabs 140
free -m
total used free shared buff/cache available
Mem: 3920 3481 163 37 274 170
Swap: 2047 1625 422
165 Firefox tab + 100 mousepad windows
free -m
total used free shared buff/cache available
Mem: 3920 3617 109 31 193 75
Swap: 2047 2047 0
Out of swap, now see how long the 75mb memory lasts?
173 Firefox tabs + 100 mousepad windows
free -m
total used free shared buff/cache available
Mem: 3920 3707 100 35 112 23
Swap: 2047 2047 0
That’s it frozen. I have a read a lot of theory swap file, partition or no swap.
It is not conclusive but small ram systems do benefit from swap.