swap file vs swap partition

Stephen Partington cryptworks at gmail.com
Thu Oct 29 19:32:55 MST 2020


Technically that would be a trim operation. Fragmentation is not a thing on
an ssd as it can read from multiple blocks. And forcing it to run will only
burn up your write cycles.

On Thu, Oct 29, 2020 at 7:15 PM Seabass via PLUG-discuss <
plug-discuss at lists.phxlinux.org> wrote:

> Defragmentation should be an issue for you on an SSD, even if there is
> some, right?
>
>
> ------------------------------
>
> Message: 4
> Date: Wed, 28 Oct 2020 17:08:03 -0700
> From: Matt Graham <mhgraham at crow202.org>
> To: <plug-discuss at lists.phxlinux.org>
> Subject: Re: swap file vs swap partition
> Message-ID: <064f92165a42d6f88a3430b42a5211f6 at crow202.org>
> Content-Type: text/plain; charset=UTF-8; format=flowed
>
> On 2020-10-28 16:24, Steve Litt via PLUG-discuss wrote:
> > On Wed, 28 Oct 2020 13:43:22 -0700
> > Bob Elzer via PLUG-discuss <plug-discuss at lists.phxlinux.org> wrote:
> >> The biggest difference is, files can become fragmented while
> >> partitions don't.
> > I had no idea there was such a thing as a Linux swap file. I guess
> > that's a recent thing.
>
> You could use a file as swap space in the early 2000s. I remember
> doing that on a few machines then.
>
> > If my partition file becomes fragmented, is there a way for me
> > to defragment it?
>
> Probably not. However, file fragmentation is not generally a problem
> on modern machines because disks and CPUs are much faster than they were
> in 1998. If you use ext4 and have a disk that's less than 10 years old
> and less than 95% full, you will not notice anything. /swapfile on my
> laptop has 11 extents and it doesn't seem to have any problems.
>
> --
> Crow202 Blog: http://crow202.org/wordpress
> There is no Darkness in Eternity
> But only Light too dim for us to see.
>
>
> ---------------------------------------------------------------------------------
> PLUG-discuss mailing list - PLUG-discuss at lists.phxlinux.org
> To subscribe, unsubscribe, or to change your mail settings:
> https://lists.phxlinux.org/mailman/listinfo/plug-discuss



-- 
A mouse trap, placed on top of your alarm clock, will prevent you from
rolling over and going back to sleep after you hit the snooze button.

Stephen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.phxlinux.org/pipermail/plug-discuss/attachments/20201029/1abc21e3/attachment.html>


More information about the PLUG-discuss mailing list