0

I'm currently running into an issue where writing files is causing insanely high pressure on the I/O side:

It goes so far that the system even stalls for a few seconds then writes a bit, stalls again, then write, and so on until it finishes finally. Looks like if a file is within 1GB it writes ok (seems like there is a cache) but once it goes above that the stalling begins.

System is a Mini-PC with: Intel N100 NVME SSD 512GB (fully encrypted) 16GB RAM Ubuntu 22.04.2 LTS

Nothing really fancy but it shouldn't be doing that in my opinion.

Tried the following:

  1. Already found out that the SSD (or controller) manufacturer is MAXIO, low-end stuff probably.
  2. dd if=/dev/zero of=diskbench bs=1M count=1024 conv=fdatasync -> Ended up with 30-40mbit (quite bad for an SSD) and some stalls

I'm kinda lost here as I don't really know how to troubleshoot this any further.

Any hint is appreciated. Thank you!

5
  • Have you checked your drive for smart errors?
    – DavidPostill
    Commented May 14, 2023 at 11:49
  • 1
    Does the OS send TRIM commands? How much free space has SSD available? Is the SSD allowed idle time or written to continuously? Writes is where the Achilles heel is for NAND flash based drives. Commented May 14, 2023 at 12:49
  • Do you get the same problem without encryption? What are the CPU temperatures when this lag spike happens? The N100 is not a particularly powerful processor.
    – Mokubai
    Commented May 14, 2023 at 13:19
  • Could you share exact model of the SSD so we may be able to determine some characteristics that may be relevant? Commented May 14, 2023 at 15:52
  • Smart is not showing anything of concern, CPU temp. neither (50-60 °C). Running the TRIM command "fstrim / -v" shows a lot of GB getting worked on and afterwards the write speeds are ok (~200MB/s before ~30MB/s) and stalls are gone. Shouldn't the OS take care of TRIM though? For now I'm running the trim command before running the rest of the bash script to avoid those stalls.
    – neik
    Commented May 16, 2023 at 10:48

0

You must log in to answer this question.

Browse other questions tagged .