Re: swap at beginning or end of ssd disk?

From: Warner Losh <imp_at_bsdimp.com>
Date: Sun, 16 Jun 2024 14:41:20 UTC
On Sun, Jun 16, 2024, 8:30 AM void <void@f-m.fm> wrote:

> Should the swap partition(s) be installed at the start or the
> end of the (ssd) disk? Or does it matter? The filesystem is ufs.
>
> The partition table looks like this right now
>
> # gpart show da0
> =>        63  1953525105  da0  MBR  (932G)
>            63        1985       - free -  (993K)
>            2048      102400    1  fat32lba  [active]  (50M)
>            104448  1953420720    2  freebsd  (931G)
>
> # cat /etc/fstab
> # Custom /etc/fstab for FreeBSD embedded images
> /dev/ufs/rootfs         /               ufs     rw,noatime              1
>      1
> /dev/msdosfs/EFI                /boot/efi       msdosfs rw,noatime      0
>      0
> tmpfs                   /tmp            tmpfs   rw,mode=1777            0
>      0
> /dev/label/growfs_swap  none            swap    sw                      0
>      0
> md                      none            swap    sw,late,file=/usr/swap0 0
>      0
>
> I plan on saving the disk image onto another machine first,
> re-partitioning the ssd
> then copying back the freebsd part of the image. The purpose is to
> eliminate growfs_swap
> and the md based swap. I'm thinking partition-based swap will be quicker
> even on ssd.
>
> Is this correct?
>

Forgot to answer this: yes. It's a smidge faster and does not have the
potential for deadlock.

Warner


>