Extremely inconsistent disk performance

From: Kevin Oberman <rkoberman_at_gmail.com>
Date: Wed, 13 Oct 2021 23:14:01 UTC
I have a Lenovo laptop (L15) that is running 13-STABLE. I've been using it
for about a year and it has always had strange and often slow disk
performance, but I attributed this to the hard drive. Recently I added an
SSD to the unit. It is an NVMe  PDIe M.2 from Sabrent. Thi did not affect
the problem.

First, using dd to copy a full partition to an external drive runs at or
the speed of the external drive. This would indicate that the issue is not
a hardware issue. When I either read in or write out the memory when
pausing a VM, I see sudden changes in transfer rate. It may start at 200
MBs and abruptly drop to 20. It usually remains low for anywhere from 15
seconds to several minutes and then jump back to 200. It usually starts at
the high speed, but not always. The low speed may be anywhere from 1.5 to
30 MBs. Probably once every 5-10 times, it loads the entire 20 GB without
slowdown. Load times range from about 25 seconds to 7 minutes. The low end
is pretty consistent but the high end varies quite a bit but is usually
under 5 minutes.

I have seen similar but less repeatable behavior in other disk heavy
operations like packing or unpacking a tar file.

Any idea what may be going on? Any tests I can perform? SMART shows no
errors or other issues.

I have another issue that may be related involving CPU frequency that I
will report on separately.
--
FreeBSD ptavv 13.0-STABLE FreeBSD 13.0-STABLE #1
stable/13-n246941-20f96f21556: Tue Aug 24 20:48:52 PDT 2021
root@ptavv:/usr/obj/usr/src/amd64.amd64/sys/GENERIC.4BSD
 amd64


Kevin Oberman, Part time kid herder and retired Network Engineer
E-mail: rkoberman@gmail.com
PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683