Date: Thu, 15 Feb 2024 20:33:03 -0800 From: Kevin Oberman <rkoberman@gmail.com> To: Ordinary Bit <ordinarybit@proton.me> Cc: "freebsd-questions@FreeBSD.org" <freebsd-questions@freebsd.org>, "freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org> Subject: Re: newfs TRIM flag device support Message-ID: <CAN6yY1v8HPir%2BMBdm7Ki11hhqA-u7WF_0iOEqFr6G9Yxn_3tnA@mail.gmail.com> In-Reply-To: <zBjNO8pJgkvHeMFBa74-f89m7IO_mgcHccwonGg0sZNJtDds49EICbFezJwbGJYnQDSVEI_tm3vCG4pjpdwiNyAtfF9lYfAn9znBR2I0AMQ=@proton.me> References: <zBjNO8pJgkvHeMFBa74-f89m7IO_mgcHccwonGg0sZNJtDds49EICbFezJwbGJYnQDSVEI_tm3vCG4pjpdwiNyAtfF9lYfAn9znBR2I0AMQ=@proton.me>
next in thread | previous in thread | raw e-mail | index | archive | help
--0000000000004b7edd0611783ede Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Feb 15, 2024 at 7:19=E2=80=AFPM Ordinary Bit <ordinarybit@proton.me= > wrote: > > Hi, > > I'm reading the newfs manual https://man.freebsd.org/cgi/man.cgi?newfs(8) > to be able to know about the TRIM flag. In the manual under -t parameter, > it mentioned about "underlying device support", what exactly is this > device? Is it the host (for example, Raspberry Pi SD/eMMC host reader) or > the SD/eMMC card (controller) or both? > > *-t* Turn on the TRIM enable flag. If enabled, and if the u= nderly- > ing device supports the BIO_DELETE command, the file system > will send a delete request to the underlying device for each > freed block. The trim enable flag is typically set for flash- > memory devices to reduce write amplification which reduces wear > on write-limited flash-memory and often improves long-term per- > formance. Thinly provisioned storage also benefits by return- > ing unused blocks to the global pool. > > BR, > orbit > > TRIM is for SSDs. It is tied to the drive, but the controller or system. I think Linux enables it automatically, but I'm not sure. In the context of the description above, the drive is the device. --=20 Kevin Oberman, Part time kid herder and retired Network Engineer E-mail: rkoberman@gmail.com PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683 --0000000000004b7edd0611783ede Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr"><div class=3D"gmail_default" style=3D"fon= t-family:tahoma,sans-serif;font-size:small">On Thu, Feb 15, 2024 at 7:19=E2= =80=AFPM Ordinary Bit <<a href=3D"mailto:ordinarybit@proton.me">ordinary= bit@proton.me</a>> wrote:</div></div><div class=3D"gmail_quote"><blockqu= ote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px= solid rgb(204,204,204);padding-left:1ex"><div style=3D"font-family:Arial,s= ans-serif;font-size:14px"><br></div><div style=3D"font-family:Arial,sans-se= rif;font-size:14px;color:rgb(0,0,0);background-color:rgb(255,255,255)">Hi,<= /div><div style=3D"font-family:Arial,sans-serif;font-size:14px;color:rgb(0,= 0,0);background-color:rgb(255,255,255)"><br></div><div style=3D"font-family= :Arial,sans-serif;font-size:14px;color:rgb(0,0,0);background-color:rgb(255,= 255,255)">I'm reading the newfs manual=C2=A0<span><span><a rel=3D"noref= errer nofollow noopener" href=3D"https://man.freebsd.org/cgi/man.cgi?newfs(= 8)" target=3D"_blank">https://man.freebsd.org/cgi/man.cgi?newfs(8)</a></spa= n> to be able to know about the TRIM flag. In the manual under -t parameter= , it mentioned about "underlying device support", what exactly is= this device? Is it the host (for example, Raspberry Pi SD/eMMC host reader= ) or the SD/eMMC card (controller) or both?</span></div><div style=3D"font-= family:Arial,sans-serif;font-size:14px;color:rgb(0,0,0);background-color:rg= b(255,255,255)"><span><pre>=C2=A0 =C2=A0 =C2=A0 =C2=A0<b>-t</b>=C2=A0 =C2= =A0 =C2=A0 Turn =C2=A0on the TRIM enable flag.=C2=A0 If enabled, and if the= underly- =C2=A0 =C2=A0 =C2=A0 ing device supports the BIO_DELETE =C2=A0command, = =C2=A0the =C2=A0file system =C2=A0 =C2=A0 =C2=A0 will =C2=A0send =C2=A0a =C2=A0delete request to the = underlying device for each =C2=A0 =C2=A0 =C2=A0 freed block.=C2=A0 The trim enable flag is typically= set for flash- =C2=A0 =C2=A0 =C2=A0 memory devices to reduce write amplification which r= educes wear =C2=A0 =C2=A0 =C2=A0 on write-limited flash-memory and often improves lon= g-term per- =C2=A0 =C2=A0 =C2=A0 formance. =C2=A0 Thinly provisioned storage also ben= efits by return- =C2=A0 =C2=A0 =C2=A0 ing unused blocks to the global pool.<br><br><span s= tyle=3D"font-family:Arial,sans-serif;background-color:rgb(255,255,255)"><sp= an>BR,<br>orbit</span></span><br></pre></span></div></blockquote><div><br><= /div><div style=3D"font-family:tahoma,sans-serif;font-size:small" class=3D"= gmail_default">TRIM is for SSDs. It is tied to the drive, but the controlle= r or system. I think Linux enables it automatically, but I'm not sure. = In the context of the description above, the drive is the device.<br></div>= </div><span class=3D"gmail_signature_prefix">-- </span><br><div dir=3D"ltr"= class=3D"gmail_signature"><div dir=3D"ltr"><div><div dir=3D"ltr"><div><div= dir=3D"ltr"><div><div dir=3D"ltr">Kevin Oberman, Part time kid herder and = retired Network Engineer<br>E-mail: <a href=3D"mailto:rkoberman@gmail.com" = target=3D"_blank">rkoberman@gmail.com</a><br></div><div>PGP Fingerprint: D0= 3FB98AFA78E3B78C1694B318AB39EF1B055683</div></div></div></div></div></div><= /div></div></div> --0000000000004b7edd0611783ede--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAN6yY1v8HPir%2BMBdm7Ki11hhqA-u7WF_0iOEqFr6G9Yxn_3tnA>