From nobody Thu Dec 07 15:25:37 2023 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 4SmJ4j1slkz538y2 for ; Thu, 7 Dec 2023 15:25:41 +0000 (UTC) (envelope-from SRS0=aNgP=HS=klop.ws=ronald-lists@realworks.nl) Received: from smtp-relay-int.realworks.nl (smtp-relay-int.realworks.nl [194.109.157.24]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4SmJ4h3HWBz4MVC for ; Thu, 7 Dec 2023 15:25:40 +0000 (UTC) (envelope-from SRS0=aNgP=HS=klop.ws=ronald-lists@realworks.nl) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=klop.ws header.s=rw2 header.b=TpjVnxmf; spf=pass (mx1.freebsd.org: domain of "SRS0=aNgP=HS=klop.ws=ronald-lists@realworks.nl" designates 194.109.157.24 as permitted sender) smtp.mailfrom="SRS0=aNgP=HS=klop.ws=ronald-lists@realworks.nl"; dmarc=pass (policy=quarantine) header.from=klop.ws Date: Thu, 7 Dec 2023 16:25:37 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=klop.ws; s=rw2; t=1701962737; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=firszJfizSsaUywyzqMp6ei5QMWEaG2GxO5e65bFSHc=; b=TpjVnxmfgoJ0y8uFIp58xgs705ondBYnqLFBtOYafVAI34lkEUfleS3r8KzRmNBfHcjcTF KLVMqPDNI3i9POmcpHYKCD8vfHIBbGQNMPk2bW+kAAXo8YlgqPQd6ttjGg7+zjHUrNLaJb p9rGvtruAVatV7hU6Em7rclRvLQzOsXGFz6Ck1CnhXJoM/dpTTu8tzmtBo65Ribj1ONLaF s2Q1+PWUnc0jX51af/e1pTe9a9NTH+lpzQf1R7OYk7TSXFzYgP8WPiiKk0OxOlkv6be5T1 XMPKhrOMttrw1GqTTE+7jdZcEMKrrBnlDfxHeyUl73YRDEm6MH6IyoUFhghfWQ== From: Ronald Klop To: void Cc: freebsd-fs@freebsd.org Message-ID: <1001525509.209637.1701962737772@localhost> In-Reply-To: <66097626.208187.1701962504337@localhost> References: <66097626.208187.1701962504337@localhost> Subject: Re: periodic trim for ufs2 ssds 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 Content-Type: multipart/alternative; boundary="----=_Part_209636_1570173428.1701962737770" X-Mailer: Realworks (681.40) Importance: Normal X-Priority: 3 (Normal) X-Spamd-Result: default: False [-3.20 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[klop.ws,quarantine]; MID_RHS_NOT_FQDN(0.50)[]; FORGED_SENDER(0.30)[ronald-lists@klop.ws,SRS0=aNgP=HS=klop.ws=ronald-lists@realworks.nl]; R_SPF_ALLOW(-0.20)[+ip4:194.109.157.0/24]; R_DKIM_ALLOW(-0.20)[klop.ws:s=rw2]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; MLMMJ_DEST(0.00)[freebsd-fs@freebsd.org]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_TO(0.00)[f-m.fm]; RCVD_COUNT_ZERO(0.00)[0]; ARC_NA(0.00)[]; DKIM_TRACE(0.00)[klop.ws:+]; RCPT_COUNT_TWO(0.00)[2]; FROM_HAS_DN(0.00)[]; HAS_X_PRIO_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; ASN(0.00)[asn:3265, ipnet:194.109.0.0/16, country:NL]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_NEQ_ENVFROM(0.00)[ronald-lists@klop.ws,SRS0=aNgP=HS=klop.ws=ronald-lists@realworks.nl] X-Rspamd-Queue-Id: 4SmJ4h3HWBz4MVC X-Spamd-Bar: --- ------=_Part_209636_1570173428.1701962737770 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Van: Ronald Klop Datum: donderdag, 7 december 2023 16:21 Aan: void CC: freebsd-fs@freebsd.org Onderwerp: Re: periodic trim for ufs2 ssds > > > Van: void > Datum: donderdag, 7 december 2023 15:40 > Aan: freebsd-fs@freebsd.org > Onderwerp: Re: periodic trim for ufs2 ssds >> >> On Thu, Dec 07, 2023 at 07:20:10AM -0700, Warner Losh wrote: >> >> >You need to tunefs that on and it will happen as you go. There is no way to >> >batch this up to do it in the background. But there's no advantage to >> >trimming a block multiple times... :). >> >> ok, thanks. >> >> (I should have mentioned 14-stable amd64 context) >> >> I booted single-user then ran: fsck -y /dev/ada0s1a >> fsck_ffs -E /dev/ada0s1a >> tunefs -t /dev/ada0s1a >> fsck_ffs -E /dev/ada0s1a >> >> then booted multiuser >> >> will console/messages or some other log show when it runs? >> smartctl(8) makes no mention of trim. >> -- >> >> >> >> > > > A tool like "gstat -d" will show columns for deletion which means trim. > > Regards, > Ronald. > This can give you some info too. $ sysctl -a | grep trim <118>Creating and/or trimming log files. kern.cam.da.1.trim_ticks: 0 kern.cam.da.1.trim_goal: 0 kern.cam.da.1.trim_lbas: 0 kern.cam.da.1.trim_ranges: 0 kern.cam.da.1.trim_count: 0 kern.cam.da.0.trim_ticks: 0 kern.cam.da.0.trim_goal: 0 kern.cam.da.0.trim_lbas: 75835864 kern.cam.da.0.trim_ranges: 62293 kern.cam.da.0.trim_count: 57020 ... Regards, Ronald. ------=_Part_209636_1570173428.1701962737770 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit

Van: Ronald Klop <ronald-lists@klop.ws>
Datum: donderdag, 7 december 2023 16:21
Aan: void <void@f-m.fm>
CC: freebsd-fs@freebsd.org
Onderwerp: Re: periodic trim for ufs2 ssds

 

Van: void <void@f-m.fm>
Datum: donderdag, 7 december 2023 15:40
Aan: freebsd-fs@freebsd.org
Onderwerp: Re: periodic trim for ufs2 ssds

On Thu, Dec 07, 2023 at 07:20:10AM -0700, Warner Losh wrote:

>You need to tunefs that on and it will happen as you go. There is no way to
>batch this up to do it in the background. But there's no advantage to
>trimming a block multiple times... :).

ok, thanks.

(I should have mentioned 14-stable amd64 context)

I booted single-user then ran: fsck -y /dev/ada0s1a
fsck_ffs -E /dev/ada0s1a
tunefs -t /dev/ada0s1a
fsck_ffs -E /dev/ada0s1a

then booted multiuser

will console/messages or some other log show when it runs?
smartctl(8) makes no mention of trim.
-- 
 



A tool like "gstat -d" will show columns for deletion which means trim.

Regards,
Ronald.
 
This can give you some info too.

$ sysctl -a | grep trim
<118>Creating and/or trimming log files.
kern.cam.da.1.trim_ticks: 0
kern.cam.da.1.trim_goal: 0
kern.cam.da.1.trim_lbas: 0
kern.cam.da.1.trim_ranges: 0
kern.cam.da.1.trim_count: 0
kern.cam.da.0.trim_ticks: 0
kern.cam.da.0.trim_goal: 0
kern.cam.da.0.trim_lbas: 75835864
kern.cam.da.0.trim_ranges: 62293
kern.cam.da.0.trim_count: 57020
...

Regards,
Ronald.
  ------=_Part_209636_1570173428.1701962737770--