Hi,
I have a nvme SSD (CAZ-82512-Q11 NVMe LITEON 512GB) on debian stable
(bulleye now).
For a long time, I suffer poor I/O performances which slow down a lot of
tasks (apt upgrade when unpacking for example).
I am now trying to fix this issue.
Using fstrim seems to restore speed. There are always many GiB which are
reduced :
# fstrim -v /
/ : 236,7 GiB (254122389504 octets) réduits
then, directly after :
# fstrim -v /
/ : 0 B (0 octets) réduits
but few minutes later, there are already 1.2 Gib to trim again :
# fstrim -v /
/ : 1,2 GiB (1235369984 octets) réduits
/Is it a good idea to trim, if yes how (and how often)?/
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.
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]
The percentage given by iotop (time the thread/process spent while
swapping in and while waiting on I/O) is often high.
I do not know what to do for kworker and if it is a normal behavior. For
jdb2, I have read it is filesystem (ext4 here) journal.
I added the "noatime" option to /etc/fstab / line but it does not seem
to reduce the number of access.
Regards,
Pierre
P-S: If triming it is needed for ssd, why debian do not trim by default?