NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
chadwixk
Dec 31, 2022Aspirant
Copy Speed Test Results to USB 3.0 Drive w/ SSD - why so slow?
NAS: RN102 I need to copy off about 3TB of data...I know not a ton, but was curious to test various copy methods to see which was fastest and just to learn a little more in the process. SOURC...
StephenB
Dec 31, 2022Guru - Experienced User
chadwixk wrote:I see how to quote you're entire reply, but I don't know how to break up the quote to then insert my replies...curious how if you don't mind...so bear with my formatting below to mimic this...well I could use the raw html editing, but that would take a while...and I'm assuming there is an easier way to do this how you did in your replies
You can delete stuff out of the quote, and you can quote more than once. There are some situations where the forum software misbehaves - when that happens I work around the issue using the html model in the expanded toolbar.
One thing that can't be quoted is inserted code - </> in the toolbar. Netgear changed the way that works a couple months ago, and introduced a bug. ( Marc_V , JeraldM : it would be very nice if that was fixed!).
chadwixk wrote:I'm not a hardware or linux guy (more a microsoft web dev), so not sure if I'm interpreting these properly, but CPU and Mem or not at 100%, but maybe they are effectively at 100%, limiting throughput?
These numbers can be hard to interpret. In your case, the load average is quite high (over 4). That suggests that you are CPU bound.
chadwixk wrote:
Thank you StephenB for your time in responding and helping me learn and investigate this.
This was in response to:
ssh > cp: 18 MB/s
cp -r -u -v "/data/Videos/2022/12/2022-12-20-063917.mkv" "/media/USB_HDD_7/Videos/2022/12/"
Just curious why this one was surprising to you...because it was also ssh and 2.5x the speed of rsync?
Surprisingly slow.
FWIW, I don't have a comparable NMVE drive to what you have. My RN102 is for testing only, and has two 1 TB Seagate Ironwolf drives in it. When I copy a ~1 GB file between two shares, I see
root@RN102:/data/Pictures# rsync -P /data/Videos/test.avi /data/Pictures
test.avi
944,136,192 100% 20.34MB/s 0:00:44 (xfr#1, to-chk=0/1)
root@RN102:/data/Pictures#
and
root@RN102:/data/Pictures# rsync -P --checksum-choice="None" /data/Videos/test.avi /data/Pictures
test.avi
944,136,192 100% 31.15MB/s 0:00:28 (xfr#1, to-chk=0/1)
root@RN102:/data/Pictures#
So noticeably faster with --checksum-choice.
cp is faster:
root@RN102:/data/Pictures# time cp /data/Videos/test.avi /data/Pictures
real 0m12.461s
user 0m0.030s
sys 0m7.330s
root@RN102:/data/Pictures#
Doing the math on the total times, I get 70 MB/sec for cp throughput.
Testing the read speed with cp, I see this
root@RN102:/data/Pictures# time cp /data/Videos/test.avi /dev/null
real 0m5.359s
user 0m0.020s
sys 0m3.400s
root@RN102:/data/Pictures#
Computed throughput here works out to about 160 MB/sec.
FWIW, dd read speed depends on the block size:
root@RN102:/data/Pictures# time dd if=/data/Pictures/test.avi of=/dev/null
2097152+0 records in
2097152+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 15.5109 s, 69.2 MB/s
real 0m15.536s
user 0m2.120s
sys 0m11.180s
root@RN102:/data/Pictures# time dd if=/data/Pictures/test.avi of=/dev/null bs=1M
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 5.7195 s, 188 MB/s
real 0m5.727s
user 0m0.040s
sys 0m3.920s
The first test uses a default block size (512 bytes), the second uses 1M.
dd write speed similarly depends on block size (and is much slower for the 512 byte size).
root@RN102:/data/Pictures# time dd if=/dev/zero of=/data/Pictures/test.avi bs=512 count=2097152
2097152+0 records in
2097152+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 82.2124 s, 13.1 MB/s
real 1m22.276s
user 0m2.610s
sys 1m9.120s
root@RN102:/data/Pictures#
root@RN102:/data/Pictures# time dd if=/dev/zero of=/data/Pictures/test.avi bs=1M count=1024
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 9.21715 s, 116 MB/s
real 0m9.263s
user 0m0.030s
sys 0m5.700s
root@RN102:/data/Pictures#
I don't know what block size cp is using on the NAS, but I can approximately match the cp speed with a block size of 1M in dd. (Actually any block size over 128k gives me about 70 MB/s).
root@RN102:/data/Pictures# time dd if=/data/Videos/test.avi of=/data/Pictures/test.avi bs=1M
900+1 records in
900+1 records out
944136192 bytes (944 MB, 900 MiB) copied, 13.7353 s, 68.7 MB/s
real 0m13.744s
user 0m0.030s
sys 0m6.930s
root@RN102:/data/Pictures#
rsync appears to be using 128K (which is the max block size you can specify with -B). But still much slower than cp (or dd).
Sandshark
Jan 01, 2023Sensei
Your NAS is also quite limited in RAM, so Linux cannot assign as many read/write buffers as it might want to. I'm not sure if it's a big contributor, but it's surely a factor.
Related Content
NETGEAR Academy
Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!