Score:0

Swap partition on VPS

lu flag

Sorry that this is a very similar thread to some others, but as this is a production server I need to make sure what I am doing is right first time and I am still an Ubuntu novice.

I have an Ubuntu 20.04 LTS VPS which is 250Gb SSD + 2Gb RAM. I checked with htop and it shows that the RAM is ticking over at over 96% used. So I was going to add a 4Gb Swapfile - but when I check the current provision it shows that there is a 512Mb swap partition.

Can someone advise how to increase the swapfile/partition to 4Gb? I was reading up about deleting the 512Mb swap partition and then creating a 4Gb swap file - or can I add a swapfile too? I dont want to destroy whats already working on the server!

I am not worried about reclaiming the 512Mb swap partition as usable disk space as I have over provisioned by a lot ;-)

This is my current disk usage;

disk usage

If anyone can help I would be very grateful.

FedKad avatar
cn flag
I would just go ahead and create a swap file. The system will use both of them or as you prioritize them. Assuming that your swap partition and your root file system (where you are going to create the swap file) reside on the same (or similar) SSD, you can use the same priority to both.
FedKad avatar
cn flag
And please, do not post images, as you can just copy and paste the terminal output ***as a text*** in your question.
Slimat avatar
lu flag
Many thanks @FedKad
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.