* On 2021 29 Sep 09:47 -0500, Reco wrote:
>       Hi.
> 
> On Wed, Sep 29, 2021 at 07:59:50AM -0500, Nate Bargmann wrote:
> > A test run with KDE Plasma shows that performance is acceptable even
> > with EXT4 as the file system.  I now have some SanDisk Ultra Fit flash
> > drives arriving in 128GB capacity (overkill, oh well).  I am now
> > considering what file system would be proper to use in this case.
> 
> A plain ext4 with the 'discard' mount option will do just fine.

From the ext4(5) man page:

       discard/nodiscard
              Controls whether ext4 should issue discard/TRIM commands to  the
              underlying  block  device when blocks are freed.  This is useful
              for SSD devices and sparse/thinly‐provisioned LUNs,  but  it  is
              off by default until sufficient testing has been done.

LUN?  That's new to me.  Let's see[1]:

"In computer storage, a logical unit number, or LUN, is a number used to
identify a logical unit, which is a device addressed by the SCSI
protocol or by Storage Area Network protocols that encapsulate SCSI,
such as Fibre Channel or iSCSI."

On this desktop I run a cron job twice a month that runs fstrim(8) that
its man page states:

       Running fstrim frequently, or even using mount -o discard, might  nega‐
       tively affect the lifetime of poor‐quality SSD devices.  For most desk‐
       top and server systems a sufficient trimming frequency is once a  week.
       Note  that  not all devices support a queued trim, so each trim command
       incurs a performance penalty on whatever else might be  trying  to  use
       the disk at the time.

That leads me to think that discard could be problematic on some
devices.  Does a USB flash drive fall into that category?  I've no
problem using anacron to run an fstrim(8) job every so often if discard
is thought to be too aggressive.

> > I understand that the journal can be disabled when using EXT4 to save
> > writes which is probably fine (this system will be non-critical).
> 
> It's possible to do, but it is not needed that much.
> If you're trying to conserve drive's resources - just write less on it.
> I.e. redirecting .xsession-errors to /dev/null, removing that annoying
> /var/log/journal directory, adding a good set of filters to rsyslog,
> etc.
> 
> For instance, this low-cost SSD that I use in my laptop endured about
> 1.8 Tb writes over 3.5 year usage, and shows no signs of degradation.

Presumably there is a difference between an SSD which expects a lot of
writes and a USB flash drive that expects relatively few by comparison
used in the role of an SSD/HDD, not?

- Nate

[1] https://en.wikipedia.org/wiki/Logical_unit_number
-- 
"The optimist proclaims that we live in the best of all
possible worlds.  The pessimist fears this is true."
Web: https://www.n0nb.us
Projects: https://github.com/N0NB
GPG fingerprint: 82D6 4F6B 0E67 CD41 F689 BBA6 FB2C 5130 D55A 8819

Attachment: signature.asc
Description: PGP signature

Reply via email to