From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id BC00A1581EE for ; Sat, 22 Mar 2025 21:38:57 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id A516134338C for ; Sat, 22 Mar 2025 21:38:57 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 20A471104BA; Sat, 22 Mar 2025 21:37:53 +0000 (UTC) Received: from black.elm.relay.mailchannels.net (black.elm.relay.mailchannels.net [23.83.212.19]) (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) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id E616A1103B8 for ; Sat, 22 Mar 2025 21:37:51 +0000 (UTC) X-Sender-Id: thundermail|x-authsender|confabulate@kintzios.com Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 2509816169D; Sat, 22 Mar 2025 21:37:51 +0000 (UTC) Received: from mailclean11.thundermail.uk (trex-3.trex.outbound.svc.cluster.local [100.124.167.123]) (Authenticated sender: thundermail) by relay.mailchannels.net (Postfix) with ESMTPA id B870B161816 for ; Sat, 22 Mar 2025 21:37:49 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1742679470; a=rsa-sha256; cv=none; b=SewQHrM6zAjNIilfXF920tykf5b8cnCgjgsBoiefAztKrEPyxGHEK9g5GOiCuWBx7MogPC 06jzVcUPDXR6et/dzrhn8ffM/i1yLnJT6wyITnZA2vEV4wizJB3frouEBOivitlYfpjBwg /auUrz79++P78lslJTCn0YHhBEqnApwq7uH6v1MFJlQSBlIXUMBfX4TdQJQySgFpz7zJpn pXmlbRbUnRC/9h60NuzPdO/aky4ZMQPMOhhAVFwivpEyxw0ac+WWhLd+vs69UPL4Zoi7la XT8lBvNkfpJgyDv/ceZPjarcxcWQ1hXko2qj0OgsCFkv6tjnqm/pxMVNMhX7Jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1742679470; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=G/h4lpvk0Q/SKktk4G6EvxTT+SOJD+x1txn0PcwyTJk=; b=ZpBYEfcYRxRW+7+FjZM92P0ojnz4ou02nEprgwcvYkMqTuhWLTuJ8dfD7S/Eyghgw67/E0 A3xKVy2cTlnLfNpb060bfGyBOtmNb7dcIXEfyZBn6W7Dc2iXn/eHTdOfLyYK1YDo9OH+1h xX6h0Ney10WU1BV1pSsr+ivxHw4dEqF0FyLLVOWpJdaClgp/QQZ11msq9eqLP7iVOdYmXE jU8A+2l8ud1OLT2SV2Pnpii+eza4Vu0nz3JEHW0xEP+mqODCc1ypjlruZIKGDX3JE7uThU qBJ0vZXzG93KCgPpVBrHKJScIMm6qntw8YRKJHEs47kd+n74MhO1Vjw3OHYKjw== ARC-Authentication-Results: i=1; rspamd-86bb47f4f6-d9j4h; auth=pass smtp.auth=thundermail smtp.mailfrom=confabulate@kintzios.com X-Sender-Id: thundermail|x-authsender|confabulate@kintzios.com X-MC-Relay: Neutral X-MC-Copy: stored-urls X-MailChannels-SenderId: thundermail|x-authsender|confabulate@kintzios.com X-MailChannels-Auth-Id: thundermail X-Trouble-Absorbed: 1240d198179d4182_1742679470455_196407690 X-MC-Loop-Signature: 1742679470455:3842092523 X-MC-Ingress-Time: 1742679470455 Received: from mailclean11.thundermail.uk (mailclean11.thundermail.uk [149.255.60.66]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.124.167.123 (trex/7.0.2); Sat, 22 Mar 2025 21:37:50 +0000 Received: from cloud238.thundercloud.uk (cloud238.thundercloud.uk [149.255.62.116]) by mailclean11.thundermail.uk (Postfix) with ESMTPS id DF3F01E0005 for ; Sat, 22 Mar 2025 21:37:47 +0000 (GMT) Received: from rogueboard.localnet (230.3.169.217.in-addr.arpa [217.169.3.230]) (Authenticated sender: confabulate@kintzios.com) by cloud238.thundercloud.uk (Postfix) with ESMTPSA id 07658D33D4 for ; Sat, 22 Mar 2025 21:37:45 +0000 (GMT) Authentication-Results: cloud238.thundercloud.uk; spf=pass (sender IP is 217.169.3.230) smtp.mailfrom=confabulate@kintzios.com smtp.helo=rogueboard.localnet Received-SPF: pass (cloud238.thundercloud.uk: connection is authenticated) From: Michael To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] What are common SSDs does and don'ts. Date: Sat, 22 Mar 2025 21:37:37 +0000 Message-ID: <3275233.5fSG56mABF@rogueboard> In-Reply-To: References: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart6035698.MhkbZ0Pkbq"; micalg="pgp-sha256"; protocol="application/pgp-signature" X-PPP-Message-ID: <174267946620.3323260.9342978272179738972@cloud238.thundercloud.uk> X-PPP-Vhost: kintzios.com X-Rspamd-Action: no action X-Rspamd-Server: mailclean11 X-Spamd-Result: default: False [-1.51 / 999.00]; SIGNED_PGP(-2.00)[]; MID_RHS_NOT_FQDN(0.50)[]; ONCE_RECEIVED(0.20)[]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; MX_GOOD(-0.01)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_ALL(0.00)[]; DMARC_POLICY_ALLOW(0.00)[kintzios.com,none]; FROM_HAS_DN(0.00)[]; FUZZY_RATELIMITED(0.00)[rspamd.com]; REPLYTO_DOM_NEQ_TO_DOM(0.00)[]; ARC_NA(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; MISSING_XM_UA(0.00)[]; ASN(0.00)[asn:34931, ipnet:149.255.60.0/22, country:GB]; MIME_TRACE(0.00)[0:+,1:+,2:~]; TO_DN_NONE(0.00)[]; REPLYTO_ADDR_EQ_FROM(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; PREVIOUSLY_DELIVERED(0.00)[gentoo-user@lists.gentoo.org]; R_DKIM_NA(0.00)[]; NEURAL_HAM(-0.00)[-0.994]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(0.00)[+mx]; HAS_REPLYTO(0.00)[confabulate@kintzios.com] X-Rspamd-Queue-Id: DF3F01E0005 X-Archives-Salt: 048ca190-d1f1-4080-b147-5cf40a12dfac X-Archives-Hash: 120cf80e428f73d2fb8a728287033909 --nextPart6035698.MhkbZ0Pkbq Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8"; protected-headers="v1" From: Michael To: gentoo-user@lists.gentoo.org Reply-To: confabulate@kintzios.com Subject: Re: [gentoo-user] What are common SSDs does and don'ts. Date: Sat, 22 Mar 2025 21:37:37 +0000 Message-ID: <3275233.5fSG56mABF@rogueboard> In-Reply-To: References: MIME-Version: 1.0 On Saturday, 22 March 2025 18:50:48 Greenwich Mean Time Dale wrote: > Howdy, > > As most know from other threads, I have a couple external m.2 NVME SSD > drives thingys. As of today, I now have a Crucial 480GB and 1TB and a > Samsung 1TB drive. I also have a Samsung 1TB m.2 in my main rig for the > OS. I read some things ages ago about these things when they first came > out and people were still learning about what to do and not do with > them. At the time there was a lot of confusion as they were new and > people were testing options. I figure by now, it is fairly well known > what not to do with these things and what should be done to make them > perform well and last longer. So, I have questions but also feel free > to share other info as well that would be good to know. I plan to make > a cheat sheet out of the info. > > First, for mount options. Should I have any mount options included in > fstab for the OS m.2 in my main rig? Yes, noatime Also, depending on your filesystem choice you could benefit from compression. For more esoteric formatting on RAID arrays and assuming the necessary information is provided by the OEM, read here about block erase size: https://wiki.gentoo.org/wiki/SSD Finally, consider TRIM being run on a cron job, or better use something like the SSDcronTRIM script once a month to decide and execute fstrim if needed. NOTE: With LUKS encrypted partitions you have to pay particular care - TRIM can compromise the security of your data and LUKS devs warn about it. However, on a drive with a lot of re-write ops you will at some point need/ want to run fstrim. In this case you'll have to run cryptsetup with '--allow- discards', before you run fstrim. > Also, for the external USB mounted > ones, should I put mount options somewhere for those? If so, since > there is no fstab entries, where would I put those options? Some I use > the automount tool built into KDE. You can create udev rules to apply any options you need, but I don't know what options may be applied by default by udev. Bear in mind, preferred mount options depend not only on the filesystem, but also on the USB controller and its ability to process SCSI commands (e.g. dumb UFDs Vs smart(er) UAS). > Now to add more questions. I'm sure running shred, dd, wipe and other > similar commands would shorten the life of one of these things. Is > there other things I should avoid doing that is common on spinning rust > drives? Are there any other don'ts I should be aware of? With older SSDs you may need to leave some spare capacity unused (overprovisioning). Modern SSDs apply firmware based overprovisioning transparently to the user, and you are going to be filling them up relentlessly you should be able to increase the overprovisioning amount by using the OEM's utility software, or hdparm. https://www.thomas-krenn.com/en/wiki/SSD_Over-provisioning_using_hdparm Personally, I just leave some non-partitioned space more as a force of habit than need. > Are there things I should do on occasion that will make them perform > better, last longer or both? Keep in mind, some may only be mounted > with USB. That may limit some options. So far, the m.2 enclosure I use > allows SMART to get info at least. Oh, what info does SMART give that I > should keep a eye on for failures or problems? I also installed a > package that includes the nvme command. I'm not real sure what to do > with that thing, yet. o_o You probably want to alter the cache path for your browser from the SSD drive to your RAM (tmpfs), especially if you have a lot of RAM. Consider the same for any configurable applications which are caching heavily. Also, if you use swap, then use zswap to reduce the amount written to the disk. > Now that I have a few of these things, I don't want to do something that > lets the smoke out. O_O Oh, links to good info would also be OK. > > Thanks. > > Dale > > :-) :-) You wouldn't go wrong by starting with these two pages: https://wiki.gentoo.org/wiki/NVMe https://wiki.gentoo.org/wiki/SSD --nextPart6035698.MhkbZ0Pkbq Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEXqhvaVh2ERicA8Ceseqq9sKVZxkFAmffLaEACgkQseqq9sKV Zxnl9BAAzN3j2Kb58yMxX+0hqZ//gAGYeP7RVDy3p2TKXYiaEzahLpUvypcvLe/G SmEy/SIqbJtEgwUdu6RvtfUhZfYUAcUexIcCk4EeAPCK6j5oatS6rndcbPsJbzJ0 nexMzxSBOrhD+b7/gm9qxxoeh/DtBQAPftzVJ/XqXmK0PgFzHR+h6VSHovRa0v37 LlYFxy4g2Em5YDYzQueZ8uDDvfvLUBOHkB6vRVBxvq3sb875b6GzBpPn/cVgRIm7 gQXrF8nBs4WfHG6AURQRB1ANbqAJtLdcJVA/93UOtqZcMOIJNHf2OSfhDYT2eF87 Me1CN/xksHZK9TVNGmAfDfl0DjB8Nl0tAV5rPWFeFZ2CHGQtVWwTJmKhKxbhfw+b cGm3VqUGQVe1ePkSijFgRNCTYahxRpIiXjcMUzO+gNUMNCyo4K+BBm7lcuG0cdjX rj3nVcrq0SwY8hu4uvZ11zvoYLIGQqXp7ePyTd4jch9ad5rUIEezwh+45HoLtjBf unt/z8CnmwpELQzoEDGF9GZCb2BLJTTHqDWeKh3KzbPX60pH2xx1wQwbYr2a0azQ YUwWr4L88xv2ZcKz3M3FFZC7A8Habk9foTZnMPOE3Ene5xcHDqKvl369SVvq5Vg3 s1dvzAHaOgv2xb0urafyIJxqkUptKc9ULWPK/pSHmwgjpfOCgjs= =CGgp -----END PGP SIGNATURE----- --nextPart6035698.MhkbZ0Pkbq--