Low performance for file reads due to BufSize as 64k

Today, when I tried to archive some APKs to another local directory (at the same drive with “filesystem”, for testing), I noticed that Kopia 0.13.0 could not read/write the disk at full speed, just 20~40MB/s and 100% active for the HDD, it has the ability to 130MB/s.
In the FileActivityWatch, I noticed that kopia.exe read 2300 times for an 150MB file, this seems to be overly trivial, and OpenHashTab seems to do only 50~200 reads.

I noticed that the read length is 65536 in Process Monitor, and then find the “BufSize” in “internal\iocopy\iocopy.go”. I think the 64 KiB is small too, which is bad for HDD and other performance. After I change it to 1024*1024 (1 MiB), reads were reduced as expected and performance improved. I guess this needs to be changed and some measurements, such as 4 MiB or bigger be better?
In addition, even if I add it to 1 MiB, it’s still 100% active and not at full speed (about 40~80MB/s), I don’t know why.

1 Like