From nobody Sun Jun 16 14:41:20 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 4W2G1B02Y1z5NvWQ for ; Sun, 16 Jun 2024 14:41:34 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pg1-x529.google.com (mail-pg1-x529.google.com [IPv6:2607:f8b0:4864:20::529]) (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 4W2G192KWjz4DVq for ; Sun, 16 Jun 2024 14:41:33 +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=As+2gkZW; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::529) smtp.mailfrom=wlosh@bsdimp.com Received: by mail-pg1-x529.google.com with SMTP id 41be03b00d2f7-6e3741519d7so2508200a12.2 for ; Sun, 16 Jun 2024 07:41:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1718548891; x=1719153691; 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=l2+SsacjKpFFPS/qToHxB6s8aVYh8YLLyVBtsJbM3q0=; b=As+2gkZWd/h/W9ZzMBJc2wmebO2OQdC+0LlWwJOkQ0afFZZbII8JyeXiQE5WsCwC9S xWYntxn9SDav4ZvCnk+/AokhCWO5sdrL7CIw5xbAREYpu+NQkRGofbmtxJxw5uHeDclv 5Ff6O+nyFSaq2p1tvZ0uTosbY95kBa14hLECKVQYFkKVOj1qEYWTLkBrWxBLAsnWm33P T1Z5uMwZ3ytHdWIQZyqzQic7TQK0VbGOAdNVg0apqTR/64DWRQ5Glxhmio2UV8AGopbL 4xhQH8oCasZeXJ5Z4SLE4a/w36sLqTmaVZ8YDB9xDnGYJ1oqYJHi0zRHrzVHlKGQbqG3 q42g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718548891; x=1719153691; 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=l2+SsacjKpFFPS/qToHxB6s8aVYh8YLLyVBtsJbM3q0=; b=pOQsVvrBqfYfwfKd8Cg9SklmpFl7NHUDCGIvgayleahwps40SzEM1loEa6NmUcJZcq QD1c8RrPC0+t5Dl1KVLOFsovLqjK6g1jJ2JELFp7cqApl+ZVjizj1Bh138UxqGSnMG95 OOnECK8p2J1DWpHCpVCLdRalxlTwMFKbB9dHAwsiHZX31w87jZyZ8+i47XzAdycaTqYf BWY8j2evW46x1Ql7SDxe3oF6yFTOuD80WR2iNmaa9cWfgoS750G4JjbQVkcXhWS/5az8 xvL9VK5cb+JKFK3sIb9PfSAxn4Wld4ZTHE7X05STEWn/sE/dla1OVjfxpU8E+BgzOFII nLCQ== X-Gm-Message-State: AOJu0YyG9ks4I9IJJvoWbsiah084/t7oe+K8VWw/nuWCKpV30rVjnzXm cPiz01+/kOoANnDIEXmJ11F0dV1MxWQVzyfJcsGHRIde2chK/2eMeQrkwkA2lGjacuZSuuwO7l/ m7fbHpCbN3ChKyH5ZfPIRJxAGz17+hBjOJwJcxfWlcZgmw/DvfWk= X-Google-Smtp-Source: AGHT+IHN1FJx9/D/bv8DHY+oihU7A0s8sIrYdXji3RJFao2zr5rcXMrABrjyWVj9a7RHbGzpMlH2maUYECla1BvCEPc= X-Received: by 2002:a05:6a20:3d89:b0:1b7:edea:e36 with SMTP id adf61e73a8af0-1bae7ecebe1mr8189700637.22.1718548891252; Sun, 16 Jun 2024 07:41:31 -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:41:20 -0600 Message-ID: Subject: Re: swap at beginning or end of ssd disk? To: FreeBSD FS Content-Type: multipart/alternative; boundary="000000000000315ad2061b02d817" 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::529: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: 4W2G192KWjz4DVq --000000000000315ad2061b02d817 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. > > 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? > Forgot to answer this: yes. It's a smidge faster and does not have the potential for deadlock. Warner > --000000000000315ad2061b02d817 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.

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?

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

Warner

<= div class=3D"gmail_quote">

--000000000000315ad2061b02d817--