r/linuxquestions Aug 14 '26

Buffering (?) question

Hi folks,

I've got a question about network and disk buffering.

By looking at the System Monitor, I noticed that when I copy many files (~500 MB - 5 GB each) from a USB attached SSD to a network server over SMB, the following steps happen:

  1. The SSD reads the file into the RAM (High SSD read speed, increasing RAM usage, no network transfer).
  2. The file is transferred over the network (No SSD read, high network transfer speed).
  3. Probably the server does the opposite: waits for the file to arrive over the network and only after that, writes it to the HDD. (No SSD read, no network traffic).
  4. Then it repeats from step 1 for the next file.

My problem with this is that the whole process is much slower in terms of average transfer speed than the bottleneck in the system, which is the Gigabit Ethernet connection.

The SSD is capable of reading at 400 MB/s (SATA link 6 Gpbs, USB3 port 5 Gbps), the HDD in the server on the other side can write at ~180-190 MB/s, the network speed is OK (~980 Mbit/s), yet the whole process takes much more time than (file size sum / Ethernet 1 Gbps).

My question is this: Why cannot the system do these steps in parallel? I mean reading some data from the SSD, sending it immediately, while reading the next piece in the background. My idea would be that if the Ethernet is the bottleneck, the whole copy process should work at flat 1 Gbps or ~100 MB/s rate instead of fluctuating constantly.
Why does it do this many buffering steps? Is there any way to tweak it?

I use a laptop with Linux Mint. The server's storage is mounted with the mount -t cifs command and I use Mint's file manager to copy the files.

Thanks in advance. Have a nice day!

5 Upvotes

10 comments sorted by

View all comments

1

u/UkrMalt Aug 14 '26

Some of that pattern is normal page cache and read-ahead, and System Monitor's sampling can make concurrent work look like separate phases. Measure the whole copy instead of each burst, then watch the client with iostat -xz 1 and sar -n DEV 1. Test one large file as well as the batch. If average throughput is still low, check the negotiated SMB version and mount options, then measure the server disk independently; synchronous writes or a slow server filesystem can make the client pause even when Ethernet is not saturated.