I created a little NAS on my Pi4: 3 M.2 SSDs connected via SATA-USB-Enclosure to a powered USB hub which is connected to one of the Pi4's USB3 ports. On those SSDs a RAID5 is installed and it is accessible from the outside via SMB (read-only) and SSH (read-write), This works quite fine.
One thing I do not really understand is that the write performance when doing backups from my windows PC varies in the copy process. What I do is using a PowerShell script for copying VeraCrypt volumes, i.e. a few multi-gigabyte-files. For the actual copying I use this line:
This gives me output on the console, indicating the current transfer speed. And here I see the speed varying severely. Normally it starts at around 19000kB/s, then goes down to around 110 kB/s and then the speed increases again. Depending on the file size the copy process ends in the middle of the increasing phase, e.g. at 2000 kB/s for a smaller file or 3000 kB/s for a medium sized file and 10000 kB/s for a huge file.
Code: Select all
pscp -sftp -pw <password> $_srcFilePath $_sshFilePath
This is perfectly reproducible.
I wonder where this comes from. I know the Raspi4 has some trouble with USB3 connected drives but it is my understanding that this causes constantly degraded access speed. The proposed quirk I did not yet try out.
The source of the data is my laptop, which is connected to the router via WIFI. The Raspi is connected to the router via ethernet/cable. The laptop does not have an ethernet port, WIFI is the only available network connection. Maybe WiFi is the limiting factor?
I thought about trying workin locally on the Raspi, i.e. copying a huge file onto the RAID from a local source (e.g. SD-card). However the normal copy command does not yield intermediate speed information, as pscp in powershell does, so that is not really helpful here.
Any ideas how I could debug deeper here?
Thanks in advance