Workspaces Queston *answered*
Colin Law
clanlaw at gmail.com
Fri Jun 12 16:50:40 UTC 2020
On Fri, 12 Jun 2020 at 17:06, Liam Proven <lproven at gmail.com> wrote:
>
> On Fri, 12 Jun 2020 at 17:39, Colin Law <clanlaw at gmail.com> wrote:
> >
> > There is nothing wrong with using a swap file (as far as I know). I
> > haven't used a swap partition for years. It is so much easier to
> > change the size with a file.
>
> Agreed -- but in theory a swap partition might be slightly faster. It
> should not get fragmented, it doesn't share space with the root
> filesystem (which could be getting full), it can even be on a
> different physical disk...
>
> On some of my machines, where I have both types of drive, I keep / on
> SSD but /home and swap on HD. Slower but lots more room, it doesn't
> wear out my flash media, etc.
>
> Yes, it's much slower, but then, if I am hitting swap hard, things are
> going to be slowing way down anyway...
Yes, certainly there are situations where it could be advantageous to
use a separate partition, particularly if you want to put it on
another disk. In the simple (common) situation where there is only
one disk then the argument about running out of space on the root
partition doesn't hang together as the root partition would (commonly)
be bigger by the size that the swap partition would have been if there
were one, which cancels out the size of the file, so you end up in the
same situation. In fact possibly slightly better off with a file as
you haven't got the overheads of a partition, but that is a trivial
point.
I can't point to it but I remember reading an apparently knowledgeable
article where benchmarks had been done using a partition and a file
and didn't find any significant difference, however it may have been
BS for all I know :) That was when I decided to start using
swapfiles. None of my systems have multiple discs so that hasn't been
an issue for me.
However, what I was responding to was the fact that the OP suggested
that the use of a swap file rather than a partition may have been the
cause of the lockup, which should not be the case. Of course the file
may not have been big enough or something, but that is a different
issue.
Colin
More information about the ubuntu-users
mailing list