Pierre Willaime wrote: > 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.
The first question is, how slow is this storage? Here is a good article on using fio: https://arstechnica.com/gadgets/2020/02/how-fast-are-your-disks-find-out-the-open-source-way-with-fio/ > 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 That's normal. > but few minutes later, there are already 1.2 Gib to trim again : > > # fstrim -v / > / : 1,2 GiB (1235369984 octets) réduits That's high but not impossible. > /Is it a good idea to trim, if yes how (and how often)?/ I trim in a cron job once per week on high activity systems and once per month on lower activity systems. > 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. These are the kernel processes responsible for writing to disk. > I added the "noatime" option to /etc/fstab / line but it does not seem to > reduce the number of access. It does, but not much more than the Debian default. Test your drive's speed, then come back with the results. -dsr-