Speed of copying big file from samba server plummets

I was wathcing a movie located on my Home Server today, and all of a sudden, it became stuttering.I suspected it was MPV‘s fault, so I tried another media player, unfortunately, it wasn’t. So, I decided to copy the movie to my local machine first. During the process I noticed something odd:

copying speed plummets

My home network speed is 1Gbps, which means the copying speed should be somewhere around 120Mb. And it was starting at 115Mb, then plummeted quickly.

What was going on, was my newly bought HardDrive is failing? I ssh to my Home Server and copy the exact same file to another HardDrive and it worked ok, so I ruled out the possiblity of faulty HardDrive and went for googling, I tried every means I found and nothing worked!

Seems that I had to figure out the solution on my own, so I ran iotop when copying.

iotop screenshot

Well, that didn’t make any sense to me because my HardDrive is Mechanical, concurrent reads force magnetic arm go back and forth leads to a lower throughput. So I decided to dial it down and see if it solves the problem. I found this setting after some diggings:

1
2
[global]
aio max threads = 1

After restarting smb service, I got these:

copying speed after

iotop after

Finally, the problem was solved. Not sure it’s a bug or feature…

Compartir Comentarios