Date: Sun, 16 Jun 2024 08:40:09 -0600 From: Warner Losh <imp@bsdimp.com> To: FreeBSD FS <freebsd-fs@freebsd.org> Subject: Re: swap at beginning or end of ssd disk? Message-ID: <CANCZdfrscUK3Jw=0MwtdG2Ye1S-EHaZUzQ1LgzQWvcmNST1APQ@mail.gmail.com> In-Reply-To: <Zm726nrKQ_GmgIIj@int21h> References: <Zm726nrKQ_GmgIIj@int21h>
next in thread | previous in thread | raw e-mail | index | archive | help
--00000000000005c9fa061b02d4e2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Jun 16, 2024, 8:30=E2=80=AFAM 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. > Doesn't matter, but make it at least 1mb aligned. This advice will change in the future to 4 or 16mb, so it wouldn't hurt to do that now. Looks like you've done that. If the size of the ssd can change (new ssd disks, fancy ones, etc), the beginning is better. Warner The partition table looks like this right now > > # gpart show da0 > =3D> 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=3D1777 = 0 > 0 > /dev/label/growfs_swap none swap sw 0 > 0 > md none swap sw,late,file=3D/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? > -- > > --00000000000005c9fa061b02d4e2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"auto"><div><br><br><div class=3D"gmail_quote"><div dir=3D"ltr" = class=3D"gmail_attr">On Sun, Jun 16, 2024, 8:30=E2=80=AFAM void <<a href= =3D"mailto:void@f-m.fm">void@f-m.fm</a>> wrote:<br></div><blockquote cla= ss=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;pa= dding-left:1ex">Should the swap partition(s) be installed at the start or t= he <br> end of the (ssd) disk? Or does it matter? The filesystem is ufs.<br></block= quote></div></div><div dir=3D"auto"><br></div><div dir=3D"auto">Doesn't= matter, but make it at least 1mb aligned. This advice will change in the f= uture to 4 or 16mb, so it wouldn't hurt to do that now. Looks like you&= #39;ve done that.=C2=A0</div><div dir=3D"auto"><br></div><div dir=3D"auto">= If the size of the ssd can change (new ssd disks, fancy ones, etc), the beg= inning is better.</div><div dir=3D"auto"><br></div><div dir=3D"auto">Warner= </div><div dir=3D"auto"><br></div><div dir=3D"auto"><div class=3D"gmail_quo= te"><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-lef= t:1px #ccc solid;padding-left:1ex"> The partition table looks like this right now<br> <br> # gpart show da0<br> =3D>=C2=A0 =C2=A0 =C2=A0 =C2=A0 63=C2=A0 1953525105=C2=A0 da0=C2=A0 MBR= =C2=A0 (932G)<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A063=C2=A0 =C2=A0 =C2=A0 =C2=A0 1985= =C2=A0 =C2=A0 =C2=A0 =C2=A0- free -=C2=A0 (993K)<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A02048=C2=A0 =C2=A0 =C2=A0 102400=C2= =A0 =C2=A0 1=C2=A0 fat32lba=C2=A0 [active]=C2=A0 (50M)<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0104448=C2=A0 1953420720=C2=A0 =C2= =A0 2=C2=A0 freebsd=C2=A0 (931G)<br> <br> # cat /etc/fstab<br> # Custom /etc/fstab for FreeBSD embedded images<br> /dev/ufs/rootfs=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ufs=C2=A0 =C2=A0 =C2=A0rw,noatime=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 1=C2=A0 =C2=A0 =C2=A0 =C2=A01<br> /dev/msdosfs/EFI=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /bo= ot/efi=C2=A0 =C2=A0 =C2=A0 =C2=A0msdosfs rw,noatime=C2=A0 =C2=A0 =C2=A0 0= =C2=A0 =C2=A0 =C2=A0 =C2=A00<br> tmpfs=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/= tmp=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 tmpfs=C2=A0 =C2=A0rw,mode=3D17= 77=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0=C2=A0 =C2=A0 =C2=A0 =C2=A00<b= r> /dev/label/growfs_swap=C2=A0 none=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = swap=C2=A0 =C2=A0 sw=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 0=C2=A0 =C2=A0 =C2=A0 =C2=A00<br> md=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 none=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 swap=C2=A0 =C2=A0 sw,late= ,file=3D/usr/swap0 0=C2=A0 =C2=A0 =C2=A0 =C2=A00<br> <br> I plan on saving the disk image onto another machine first, re-partitioning= the ssd<br> then copying back the freebsd part of the image. The purpose is to eliminat= e growfs_swap<br> and the md based swap. I'm thinking partition-based swap will be quicke= r even on ssd.<br> <br> Is this correct?<br> -- <br> <br> </blockquote></div></div></div> --00000000000005c9fa061b02d4e2--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfrscUK3Jw=0MwtdG2Ye1S-EHaZUzQ1LgzQWvcmNST1APQ>