Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Dec 2023 16:25:37 +0100 (CET)
From:      Ronald Klop <ronald-lists@klop.ws>
To:        void <void@f-m.fm>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: periodic trim for ufs2 ssds
Message-ID:  <1001525509.209637.1701962737772@localhost>
In-Reply-To: <66097626.208187.1701962504337@localhost>
References:  <ZXHTAIPnrEOq4iaV@int21h> <CANCZdfoWixZy9uPeOimd%2BeTSOmaUT%2B5mbfFC0rynriXzHJ3Bmg@mail.gmail.com> <ZXHZbxCAuVJtKVgo@int21h> <66097626.208187.1701962504337@localhost>

next in thread | previous in thread | raw e-mail | index | archive | help
------=_Part_209636_1570173428.1701962737770
Content-Type: text/plain; charset=us-ascii; format=flowed
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
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<html><head></head><body><br>
<p><strong>Van:</strong> Ronald Klop &lt;ronald-lists@klop.ws&gt;<br>
<strong>Datum:</strong> donderdag, 7 december 2023 16:21<br>
<strong>Aan:</strong> void &lt;void@f-m.fm&gt;<br>
<strong>CC:</strong> freebsd-fs@freebsd.org<br>
<strong>Onderwerp:</strong> Re: periodic trim for ufs2 ssds</p>

<blockquote style="padding-right: 0px; padding-left: 5px; margin-left: 5px; border-left: #000000 2px solid; margin-right: 0px">
<div class="MessageRFC822Viewer" id="P">
<div class="MultipartAlternativeViewer">
<div class="TextHTMLViewer" id="P.P.P">&nbsp;
<p><strong>Van:</strong> void &lt;void@f-m.fm&gt;<br>
<strong>Datum:</strong> donderdag, 7 december 2023 15:40<br>
<strong>Aan:</strong> freebsd-fs@freebsd.org<br>
<strong>Onderwerp:</strong> Re: periodic trim for ufs2 ssds</p>

<blockquote style="padding-right: 0px; padding-left: 5px; margin-left: 5px; border-left: #000000 2px solid; margin-right: 0px">
<div class="MessageRFC822Viewer" id="P">
<div class="TextPlainViewer" id="P.P">On Thu, Dec 07, 2023 at 07:20:10AM -0700, Warner Losh wrote:<br>
<br>
&gt;You need to tunefs that on and it will happen as you go. There is no way to<br>
&gt;batch this up to do it in the background. But there's no advantage to<br>
&gt;trimming a block multiple times... :).<br>
<br>
ok, thanks.<br>
<br>
(I should have mentioned 14-stable amd64 context)<br>
<br>
I booted single-user then ran: fsck -y /dev/ada0s1a<br>
fsck_ffs -E /dev/ada0s1a<br>
tunefs -t /dev/ada0s1a<br>
fsck_ffs -E /dev/ada0s1a<br>
<br>
then booted multiuser<br>
<br>
will console/messages or some other log show when it runs?<br>
smartctl(8) makes no mention of trim.<br>
--&nbsp;<br>
&nbsp;</div>

<hr></div>
</blockquote>
<br>
<br>
A tool like "gstat -d" will show columns for deletion which means trim.<br>
<br>
Regards,<br>
Ronald.<br>
&nbsp;</div>
</div>
</div>
</blockquote>
This can give you some info too.<br>
<br>
$ sysctl -a | grep trim<br>
&lt;118&gt;Creating and/or trimming log files.<br>
kern.cam.da.1.trim_ticks: 0<br>
kern.cam.da.1.trim_goal: 0<br>
kern.cam.da.1.trim_lbas: 0<br>
kern.cam.da.1.trim_ranges: 0<br>
kern.cam.da.1.trim_count: 0<br>
kern.cam.da.0.trim_ticks: 0<br>
kern.cam.da.0.trim_goal: 0<br>
kern.cam.da.0.trim_lbas: 75835864<br>
kern.cam.da.0.trim_ranges: 62293<br>
kern.cam.da.0.trim_count: 57020<br>
...<br>
<br>
Regards,<br>
Ronald.<br>
&nbsp;</body></html>
------=_Part_209636_1570173428.1701962737770--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1001525509.209637.1701962737772>