Deleting Swap Partition

Petter Adsen petter at synth.no
Sat Oct 3 06:27:11 UTC 2015


On Sat, 3 Oct 2015 09:49:39 +0900
inflatus <inflatus at gmail.com> wrote:

> Is having a swap partition an issue with SSD's? I do not hibernate my 
> machine so that is not a reason to keep swap. I can backup my data and 
> reinstall Ubuntu without the swap but that seems to be a bit of work for 
> something may be a non-issue.
> 
> On 10/03/2015 02:50 AM, Tom H wrote:
> > On Fri, Oct 2, 2015 at 2:35 AM, Petter Adsen <petter at synth.no> wrote:
> >> On Fri, 2 Oct 2015 07:55:39 Bradley Harvey <inflatus at gmail.com> wrote:
> >>> I am running my 15.04 on a Thinkpad with an SSD installed. I added some
> >>> extra RAM and the Swap doesn't seem to be getting hit at all now. Is it
> >>> advisable to delete the swap partition?
> >> That depends on your circumstances. If you plan on using hibernation you
> >> will need swap, for example. Of course, if you delete it and later find
> >> out that you need swap after all, you can always add a swap file.
> > Hibernation's disabled in Ubuntu:
> >
> > grep Disable /var/lib/polkit-1/localauthority/10-vendor.d/*
> > /var/lib/polkit-1/localauthority/10-vendor.d/com.ubuntu.desktop.pkla:[Disable
> > hibernate by default in upower]
> > /var/lib/polkit-1/localauthority/10-vendor.d/com.ubuntu.desktop.pkla:[Disable
> > hibernate by default in logind]

Please don't top post. There has been some concern that having swap on
an SSD can cause excessive wear on the cells, but the consensus seems
to be that it is most likely not a problem - at least not with a fairly
recent SSD. If you are concerned about it, just comment out the swap
entry in /etc/fstab or turn swap off with 'swapoff'. You could also set
'vm.swappiness' to a low level as I mentioned earlier, so it doesn't get
used unless you run out of physical memory.

You can of course also boot from a live disk, remove the swap partition
and extend the size of the previous partition to fill up the free space,
but that has some risk of data-loss attached to it.

Personally, I have swap on an SSD and don't worry about it at all.

Petter

-- 
"I'm ionized"
"Are you sure?"
"I'm positive."




More information about the ubuntu-users mailing list