Ubuntu: increase swap [Guide]

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

for ubuntu 24.10

If you want to change the size of your swap file (which is 1GB by default on Ploi) just follow the following steps.

Turn off all running swap processes: swapoff -a
Resize swap fallocate -l 1G /swapfile (change 1G to the gigabyte size you want it to be)
CHMOD swap: chmod 600 /swapfile
Make file usable as swap mkswap /swapfile
Active the swap file swapon /swapfile

Thats it! Some commands may take some time to be executed, just wait patiently for the commands to finish.

To verify your swap size run the following command and you will see the swap size: free -m

mandeepmails
Автор

When the process is finished, don't forget to log out from the root, by typing the command "exit"(without double quotes), so it'll log out from the root user to the default user and you will be able to close the terminal properly.

rodrigohenrique
Автор

Great tutorial! Thanks!

I'm however struggling a bit in figuring out the recommended swap file size. I settled on 0.5xRAM as I have 32GB on my home server and I do a lot of RAM bursty tasks on it. It never hibernates and I have a 960 pro in it so swap access should be fast and snappy. I'll keep an eye on the swap file usage over the next couple of weeks. I'll probably increase it if necessary. 1.5x swap wouldn't "hurt" as the 960 pro only stores OS and programs.

BromTeque
Автор

thanks for the vedio but next time can you use white background and black, very dificult to see your terminal.

maninthemirrow
Автор

it is not working, i mean it is not been applied permanently, when ever i restart my system, system resources shows i have swap file but it is utilized properly and even my system crashes due to overload of ram

messiisthebest
Автор

Does this apply the same to a partition? I created swap files yet for some reason checking I see them as partitions in dev/vda2 I'm on a vps but not a seasoned tech guy so could I follow your tutorial and remove the current swap and follow along and het the same result as you show?

cryptoking
Автор

hey great tutorial but when i checked my system monitor its not avaible swap, have i done anything bad?

Baqp
Автор

My /swapfile doesn't show up on "nano etc/fstab"

EDIT: I'm using KDE Neon, if that matters

raddox
Автор

By the way will this revert back our swap size if we reboot our system ? I was actually following some articles on this and after rebooting my system the swap went back to 2 GiB.

himanshutariyal