Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #238978

Re: nvme SSD and poor performance

From Jochen Spieker <ml@well-adjusted.de>
Newsgroups linux.debian.user
Subject Re: nvme SSD and poor performance
Date 2021-08-18 22:00 +0200
Message-ID <CNzTb-7vx-1@gated-at.bofh.it> (permalink)
References <CN4cG-3pJ-25@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

Pierre Willaime:
> 
> Using fstrim seems to restore speed. There are always many GiB which are
> reduced :
> 
> 	#  fstrim -v /
> 	/ : 236,7 GiB (254122389504 octets) réduits

This is probably the total amount of unused space on that SSD. The first
fstrim run after a reboot always trims all free space, as far as I
understand. After that, only space that was freed since the last fstrim
run will be trimmed.

> then, directly after :
> 
> 	#  fstrim -v /
> 	/ : 0 B (0 octets) réduits

See above, this is expected.

> but few minutes later, there are already 1.2 Gib to trim again :
> 
> 	#  fstrim -v /
> 	/ : 1,2 GiB (1235369984 octets) réduits

It is odd that something wrote and deleted 1.2 GB in "a few minutes". I
would run iotop to see what process is responsible.

> /Is it a good idea to trim, if yes how (and how often)?/

See the other answers. Usually once per week is enough, but that assumes
that the free space is not overwritten and freed again several times
each day.

On the other hand, personally I have never felt a difference in
performance before and after an fstrim run.

> Some people use fstrim as a cron job, some other add "discard" option to the
> /etc/fstab / line. I do not know what is the best if any. I also read
> triming frequently could reduce the ssd life.

Stay away from the "discard" option and do not worry about SSD life.
Even with heavy usage you should not exceed the expected lifetime
writes. Do worry about data loss in general and create a viable backup
strategy, independent of the storage medium (or service) that you are
using.

> I also noticed many I/O access from jbd2 and kworker such as :
> 
> 	# iotop -bktoqqq -d .5
> 	11:11:16     364 be/3 root        0.00 K/s    7.69 K/s  0.00 % 23.64 %
> [jbd2/nvme0n1p2-]
> 	11:11:16       8 be/4 root        0.00 K/s    0.00 K/s  0.00 % 25.52 %
> [kworker/u32:0-flush-259:0]

jbd2 is the journalling service of the filesystem and makes sure that
your filesystem does not become corrupt in case of power failures. 

kworkers are general purpose kernel threads doing kernel stuff, for
example disk I/O. Seeing these is not a problem in itself.

> 

-- 
I spend money without thinking on products and clothes that I believe
will enhance my social standing.
[Agree]   [Disagree]
                 <http://archive.slowlydownward.com/NODATA/data_enter2.html>

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

nvme SSD and poor performance Pierre Willaime <pierre.willaime@univ-lorraine.fr> - 2021-08-17 12:10 +0200
  Re: nvme SSD and poor performance Dan Ritter <dsr@randomstring.org> - 2021-08-17 14:10 +0200
    Re: nvme SSD and poor performance Pierre Willaime <pierre.willaime@univ-lorraine.fr> - 2021-08-17 15:20 +0200
      Re: nvme SSD and poor performance Dan Ritter <dsr@randomstring.org> - 2021-08-17 16:10 +0200
      Re: nvme SSD and poor performance David Christensen <dpchrist@holgerdanske.com> - 2021-08-18 00:30 +0200
        Re: nvme SSD and poor performance Pierre Willaime <pierre.willaime@univ-lorraine.fr> - 2021-08-20 11:00 +0200
          Re: nvme SSD and poor performance Christian Britz <cbritz@t-online.de> - 2021-08-20 17:50 +0200
            Re: nvme SSD and poor performance Tixy <tixy@yxit.co.uk> - 2021-08-20 19:40 +0200
          Re: nvme SSD and poor performance Linux-Fan <Ma_Sys.ma@web.de> - 2021-08-20 19:20 +0200
          Re: nvme SSD and poor performance "Alexander V. Makartsev" <avbetev@gmail.com> - 2021-08-20 19:50 +0200
            Re: nvme SSD and poor performance Pierre Willaime <pierre.willaime@univ-lorraine.fr> - 2021-08-23 10:50 +0200
              Re: nvme SSD and poor performance "Alexander V. Makartsev" <avbetev@gmail.com> - 2021-08-23 14:10 +0200
                Re: nvme SSD and poor performance piorunz <piorunz@gmx.com> - 2021-08-23 14:20 +0200
          Re: nvme SSD and poor performance David Christensen <dpchrist@holgerdanske.com> - 2021-08-21 04:10 +0200
  Re: nvme SSD and poor performance Linux-Fan <Ma_Sys.ma@web.de> - 2021-08-17 15:40 +0200
    Re: nvme SSD and poor performance Marco Möller <talby@debianlists.mobilxpress.net> - 2021-08-17 16:10 +0200
      Re: nvme SSD and poor performance piorunz <piorunz@gmx.com> - 2021-08-20 18:30 +0200
        Re: nvme SSD and poor performance Marco Möller <talby@debianlists.mobilxpress.net> - 2021-08-20 19:20 +0200
          Re: nvme SSD and poor performance piorunz <piorunz@gmx.com> - 2021-08-20 20:10 +0200
    Re: nvme SSD and poor performance Christian Britz <cbritz@t-online.de> - 2021-08-17 17:30 +0200
      Re: nvme SSD and poor performance Linux-Fan <Ma_Sys.ma@web.de> - 2021-08-17 17:40 +0200
  Re: nvme SSD and poor performance Stefan Monnier <monnier@iro.umontreal.ca> - 2021-08-17 17:00 +0200
  Re: nvme SSD and poor performance Jochen Spieker <ml@well-adjusted.de> - 2021-08-18 22:00 +0200
    Re: nvme SSD and poor performance Anssi Saari <as@sci.fi> - 2021-08-19 08:10 +0200
      Re: nvme SSD and poor performance Sven Hartge <sven@svenhartge.de> - 2021-08-21 15:00 +0200

csiph-web