I noticed that my Mint 12 Cinnamon never use swap at all. So, I was thinking to remove it.
If I do this:
swapoff -a
Then comment swap disk off from fstab.
Is that all whats required?
[Solved] How to remove swap?
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
[Solved] How to remove swap?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: How to remove swap?
You could go a step further and delete your swap partition using gparted. My swap never gets used either, but with disk space so cheap (I have over 4tb), I leave it as it is.
Re: How to remove swap?
Yeah, but won't he have to adjust some things in fstab, then?
I've read that one needs to do that, so I didn't bother deleting my Swap unused space.
I've read that one needs to do that, so I didn't bother deleting my Swap unused space.
MB:MSI 770 C-45 / HD1:500 GB-->Windows / HD2:320 GB-->Mint 20 Cinnamon
CPU:AMD X4 640 3.00 GHz / RAM:4.0 GB / VGA: NVidia GeForce GT630
CPU:AMD X4 640 3.00 GHz / RAM:4.0 GB / VGA: NVidia GeForce GT630
Re: How to remove swap?
But what happens if you run out of memory? Even if it just happens once... you never know.
Re: How to remove swap?
If computer runs out of memory, then it's crash. I assume.
Okey, I got my swap removed. What wasn't that big job.
Okey, I got my swap removed. What wasn't that big job.
Re: How to remove swap?
Hello lumikki. I think there is really no problem with letting your system use some swap space, but if you really need to decrease the priority of Virtual Memory vs RAM usage you can simply change the swappiness value; to do that it would be as follows (extracted from https://help.ubuntu.com/community/SwapFaq, and tested so many times in the past and once while writing the comment):
** This would be just in case yu haven't deleted your swap partition or permanently modified anything related, I've read you have already deleted your swap partition so I post this just in case somebody needs a less agressive approach **
1. Open a terminal
2. Type:
3. That will display your swappiness actual value (60)
4. If you are going to be testing your system performance during some time to see if you really need to make this change permanent or if you're going to try with different swappiness values until you find the optimum one, I suggest you to create a launcher in your desktop with the following command:
5. That will change your swappiness value to 10 when you double click the launcher, to try with different values just replace 10 by any integer number in the range 0-100
6. Once you have find the optimum value and decided to make changes permanent, open a terminal and type:
7. Search for vm.swappiness and change its value as desired. If vm.swappiness does not exist, add it to the end of the file like so:
8. Save the file, reboot and check the change is workig using the command in step 2
** This would be just in case yu haven't deleted your swap partition or permanently modified anything related, I've read you have already deleted your swap partition so I post this just in case somebody needs a less agressive approach **
1. Open a terminal
2. Type:
Code: Select all
cat /proc/sys/vm/swappiness
4. If you are going to be testing your system performance during some time to see if you really need to make this change permanent or if you're going to try with different swappiness values until you find the optimum one, I suggest you to create a launcher in your desktop with the following command:
Code: Select all
gksudo sysctl vm.swappiness=10
6. Once you have find the optimum value and decided to make changes permanent, open a terminal and type:
Code: Select all
sudo gedit /etc/sysctl.conf
Code: Select all
vm.swappiness=10