From nobody Sun Jun 16 14:40:09 2024 X-Original-To: freebsd-fs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W2Fzs22xbz5NvQk for ; Sun, 16 Jun 2024 14:40:25 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W2Fzr35zhz4DNm for ; Sun, 16 Jun 2024 14:40:24 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20230601.gappssmtp.com header.s=20230601 header.b=VDBVQ0Am; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::52b) smtp.mailfrom=wlosh@bsdimp.com Received: by mail-pg1-x52b.google.com with SMTP id 41be03b00d2f7-6e7b121be30so2538026a12.1 for ; Sun, 16 Jun 2024 07:40:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1718548821; x=1719153621; darn=freebsd.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=VlKIabYFQywqARBkM/hDs3JSzILzAuAV2f00LlXr/p4=; b=VDBVQ0Am5AvDVBTPI9RgpEtKU1vvtS478IABx40EKPBfZk+Lhr8oTQrxmkPsdsbBUL Y7BXikJ/ZqtcMEiCIhgd/oQjiqnDe5QEm2S+J5oftcdX5TfOg59ddaJmxTpKVq7msntk uANcJZe/lyVFujG1kpxRmp2XbXdTlsSUx/Pk21Ct2sAE92uCO/Nai2auB0vfhZtu7iT1 JxpLd9whKjB9ybAm3bkleUMOS4Z/qcqZkVTCU2S9dxvE+6KjW982fyhmw/Jl6iI52Ygv vYucB17OYUp3DR9BfivudpNNXb8hUSdMWZdf6d1fDkcxC5whgvRfL+xBdmf/mIGZRNiH DtYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718548821; x=1719153621; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=VlKIabYFQywqARBkM/hDs3JSzILzAuAV2f00LlXr/p4=; b=xPF11LEt598oHPcBdHjJF1Vhf3Cri01DRg/D0/qK3Ecda9TNp1LA1UCK1kv8lZiqHF zVjh81vAjgSxypjLbHs/NeEcM9CsxjiShL5fzZADBIiZVafzP+vJ/WBLELOwMspf2mT7 qpI64WZBb53kvk4xZJSaMmN/r5X2LvRIg5boTMr4BMv2NbI57Gh30IYzaIXwDn4/Pi55 mF3lcq/BTSWNZc1lbzVSFPVgYxFJXjM0sqacJiaoG/LMr0CE703ry+CabHdlCLw5Bvdv vZ5Oxe8TxZHQylPfQLLW97q0xkGPIy/zaBHbQDUfLYet1QAURKO58Rk5Y2l26Mx+EBoY xN5Q== X-Gm-Message-State: AOJu0YzHf/Aj/DJBY6lq9TlsZbqEfpsws9xwo9BBitHEOZqa5wrdUR6G fid8nRdRyFpnq+5F07ll6Kuh5Z337QWjMlCjAatTxrN1YA7ICi4/+CsASFVhKloyrNFEJezq6VB mVTKpyEibfISlKKGDS/UgSnBhNgOUb1vT28zq2vpyNO+G/us1U4U= X-Google-Smtp-Source: AGHT+IFoKSKhEMAgciM9Fzpm8ItjoyZ8zC2fmDvHXR9ZxOu2402VCaHKIN8mIThrNzz1MHQ9/ateUDK7tOPVTQ7y/jg= X-Received: by 2002:a05:6a20:394b:b0:1b8:3fc6:ab84 with SMTP id adf61e73a8af0-1bae841e705mr7218567637.58.1718548821289; Sun, 16 Jun 2024 07:40:21 -0700 (PDT) List-Id: Filesystems List-Archive: https://lists.freebsd.org/archives/freebsd-fs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-fs@FreeBSD.org MIME-Version: 1.0 References: In-Reply-To: From: Warner Losh Date: Sun, 16 Jun 2024 08:40:09 -0600 Message-ID: Subject: Re: swap at beginning or end of ssd disk? To: FreeBSD FS Content-Type: multipart/alternative; boundary="00000000000005c9fa061b02d4e2" X-Spamd-Bar: - X-Spamd-Result: default: False [-1.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; SUBJECT_ENDS_QUESTION(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.98)[-0.982]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20230601.gappssmtp.com:s=20230601]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; RCPT_COUNT_ONE(0.00)[1]; R_SPF_NA(0.00)[no SPF record]; RCVD_COUNT_ONE(0.00)[1]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; MISSING_XM_UA(0.00)[]; DMARC_NA(0.00)[bsdimp.com]; MLMMJ_DEST(0.00)[freebsd-fs@freebsd.org]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::52b:from]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; FROM_HAS_DN(0.00)[]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-fs@freebsd.org]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20230601.gappssmtp.com:+] X-Rspamd-Queue-Id: 4W2Fzr35zhz4DNm --00000000000005c9fa061b02d4e2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Jun 16, 2024, 8:30=E2=80=AFAM void 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


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 t= he
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 f= uture to 4 or 16mb, so it wouldn't hurt to do that now. Looks like you&= #39;ve done that.=C2=A0

= If the size of the ssd can change (new ssd disks, fancy ones, etc), the beg= inning is better.

Warner=

The partition table looks like this right now

# gpart show da0
=3D>=C2=A0 =C2=A0 =C2=A0 =C2=A0 63=C2=A0 1953525105=C2=A0 da0=C2=A0 MBR= =C2=A0 (932G)
=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)
=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)
=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)

# cat /etc/fstab
# Custom /etc/fstab for FreeBSD embedded images
/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
/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
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 /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
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

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 eliminat= e growfs_swap
and the md based swap. I'm thinking partition-based swap will be quicke= r even on ssd.

Is this correct?
--

--00000000000005c9fa061b02d4e2--