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>
signature.asc
Description: PGP signature