Discussion

Sata vs Usb hard disk

24 23411
Phi___  
Post Last Edited by Phi___ at 2014-6-8 02:14

Post Last Edited by Phi___ at 2014-6-8 02:13

Hi,
I do a little test to measure the hard disk speed :
- first configuration, the hd is on the sata connector
- the second, the hd is on usb connector
The hd is the same in both case, and I transfert a file from a local web site over a gigabit network.
He is formated in ext4.

The test in sata mode :
  1. root@Bananapi:/mnt/dd# wget http://192.168.0.225/2013-02-09-wheezy-raspbian.zip
  2. --2023-04-18 07:03:39--  http://192.168.0.225/2013-02-09-wheezy-raspbian.zip
  3. Connecting to 192.168.0.225:80... connected.
  4. HTTP request sent, awaiting response... 200 OK
  5. Length: 493587826 (471M) [application/zip]
  6. Saving to: `2013-02-09-wheezy-raspbian.zip.5'

  7. 100%[============================================================================================>] 493,587,826 23.9M/s   in 21s     

  8. 2023-04-18 07:04:00 (22.3 MB/s) - `2013-02-09-wheezy-raspbian.zip.5' saved [493587826/493587826]
  9.                                                                                                                                                                                                                   
  10. root@Bananapi:/mnt/dd# wget http://192.168.0.225/2013-02-09-wheezy-raspbian.zip
  11. --2023-04-18 07:04:27--  http://192.168.0.225/2013-02-09-wheezy-raspbian.zip                                                                                                                                       
  12. Connecting to 192.168.0.225:80... connected.                                                                                                                                                                       
  13. HTTP request sent, awaiting response... 200 OK                                                                                                                                                                     
  14. Length: 493587826 (471M) [application/zip]                                                                                                                                                                        
  15. Saving to: `2013-02-09-wheezy-raspbian.zip.6'                                                                                                                                                                     
  16.                                                                                                                                                                                                                   
  17. 100%[============================================================================================>] 493,587,826 23.5M/s   in 22s      
  18.                                                                                                                                                                                                                   
  19. 2023-04-18 07:04:49 (21.3 MB/s) - `2013-02-09-wheezy-raspbian.zip.6' saved [493587826/493587826]                                                                                                                  
  20.                                                                                                                                                                                                                   
  21. root@Bananapi:/mnt/dd# wget http://192.168.0.225/2013-02-09-wheezy-raspbian.zip
  22. --2023-04-18 07:05:50--  http://192.168.0.225/2013-02-09-wheezy-raspbian.zip
  23. Connecting to 192.168.0.225:80... connected.
  24. HTTP request sent, awaiting response... 200 OK
  25. Length: 493587826 (471M) [application/zip]
  26. Saving to: `2013-02-09-wheezy-raspbian.zip.7'

  27. 100%[============================================================================================>] 493,587,826 19.8M/s   in 23s     

  28. 2023-04-18 07:06:12 (20.9 MB/s) - `2013-02-09-wheezy-raspbian.zip.7' saved [493587826/493587826]

  29. root@Bananapi:/mnt/dd# wget http://192.168.0.225/2013-02-09-wheezy-raspbian.zip
  30. --2023-04-18 07:06:20--  http://192.168.0.225/2013-02-09-wheezy-raspbian.zip
  31. Connecting to 192.168.0.225:80... connected.
  32. HTTP request sent, awaiting response... 200 OK
  33. Length: 493587826 (471M) [application/zip]
  34. Saving to: `2013-02-09-wheezy-raspbian.zip.8'

  35. 100%[============================================================================================>] 493,587,826 23.4M/s   in 20s     

  36. 2023-04-18 07:06:41 (23.2 MB/s) - `2013-02-09-wheezy-raspbian.zip.8' saved [493587826/493587826]

  37. root@Bananapi:/mnt/dd# wget http://192.168.0.225/2013-02-09-wheezy-raspbian.zip
  38. --2023-04-18 07:06:43--  http://192.168.0.225/2013-02-09-wheezy-raspbian.zip
  39. Connecting to 192.168.0.225:80... connected.
  40. HTTP request sent, awaiting response... 200 OK
  41. Length: 493587826 (471M) [application/zip]
  42. Saving to: `2013-02-09-wheezy-raspbian.zip.9'

  43. 100%[============================================================================================>] 493,587,826 23.7M/s   in 21s     

  44. 2023-04-18 07:07:04 (22.2 MB/s) - `2013-02-09-wheezy-raspbian.zip.9' saved [493587826/493587826]

  45. root@Bananapi:/mnt/dd#
Copy the Code
the test in usb :
  1. root@Bananapi:/mnt/dd# wget http://192.168.0.225/2013-02-09-wheezy-raspbian.zip
  2. --2018-11-13 02:07:45--  http://192.168.0.225/2013-02-09-wheezy-raspbian.zip
  3. Connecting to 192.168.0.225:80... connected.
  4. HTTP request sent, awaiting response... 200 OK
  5. Length: 493587826 (471M) [application/zip]
  6. Saving to: `2013-02-09-wheezy-raspbian.zip.10'

  7. 100%[============================================================================================>] 493,587,826 22.3M/s   in 21s     

  8. 2018-11-13 02:08:06 (22.6 MB/s) - `2013-02-09-wheezy-raspbian.zip.10' saved [493587826/493587826]

  9. root@Bananapi:/mnt/dd# wget http://192.168.0.225/2013-02-09-wheezy-raspbian.zip
  10. --2018-11-13 02:08:11--  http://192.168.0.225/2013-02-09-wheezy-raspbian.zip
  11. Connecting to 192.168.0.225:80... connected.
  12. HTTP request sent, awaiting response... 200 OK
  13. Length: 493587826 (471M) [application/zip]
  14. Saving to: `2013-02-09-wheezy-raspbian.zip.11'

  15. 100%[============================================================================================>] 493,587,826 21.1M/s   in 21s     

  16. 2018-11-13 02:08:32 (22.0 MB/s) - `2013-02-09-wheezy-raspbian.zip.11' saved [493587826/493587826]

  17. root@Bananapi:/mnt/dd# wget http://192.168.0.225/2013-02-09-wheezy-raspbian.zip
  18. --2018-11-13 02:08:37--  http://192.168.0.225/2013-02-09-wheezy-raspbian.zip
  19. Connecting to 192.168.0.225:80... connected.
  20. HTTP request sent, awaiting response... 200 OK
  21. Length: 493587826 (471M) [application/zip]
  22. Saving to: `2013-02-09-wheezy-raspbian.zip.12'

  23. 100%[============================================================================================>] 493,587,826 23.8M/s   in 21s     

  24. 2018-11-13 02:08:58 (22.4 MB/s) - `2013-02-09-wheezy-raspbian.zip.12' saved [493587826/493587826]

  25. root@Bananapi:/mnt/dd# wget http://192.168.0.225/2013-02-09-wheezy-raspbian.zip
  26. --2018-11-13 02:09:00--  http://192.168.0.225/2013-02-09-wheezy-raspbian.zip
  27. Connecting to 192.168.0.225:80... connected.
  28. HTTP request sent, awaiting response... 200 OK
  29. Length: 493587826 (471M) [application/zip]
  30. Saving to: `2013-02-09-wheezy-raspbian.zip.13'

  31. 100%[============================================================================================>] 493,587,826 21.3M/s   in 21s     

  32. 2018-11-13 02:09:21 (22.4 MB/s) - `2013-02-09-wheezy-raspbian.zip.13' saved [493587826/493587826]

  33. root@Bananapi:/mnt/dd# wget http://192.168.0.225/2013-02-09-wheezy-raspbian.zip
  34. --2018-11-13 02:09:26--  http://192.168.0.225/2013-02-09-wheezy-raspbian.zip
  35. Connecting to 192.168.0.225:80... connected.
  36. HTTP request sent, awaiting response... 200 OK
  37. Length: 493587826 (471M) [application/zip]
  38. Saving to: `2013-02-09-wheezy-raspbian.zip.14'

  39. 100%[============================================================================================>] 493,587,826 20.5M/s   in 26s     

  40. 2018-11-13 02:09:52 (18.0 MB/s) - `2013-02-09-wheezy-raspbian.zip.14' saved [493587826/493587826]

  41. root@Bananapi:/mnt/dd#
Copy the Code


Did you use the method through downloading a file to test the HDD wirte speed? If the download speed would limit the HDD wrtie/read speed?

Phi___  
Maybe, the downloading limits the write speed. I download the file through my local netword (gigabit network) from a web server. I don't know if the network limits the speed but I don't think. I test the hd in usb mode on a another computer and I write to 55 MB/s.

Post Last Edited by tony_zhang at 2014-6-9 02:37

Did you try the dd command to test the speed? such as:
  1. dd if=/dev/zero of=/dev/sdXX bs=1M count=4096
Copy the Code
??

Reply 3# Phi___

I test dd command. My HDD is ntfs format.
  1. pi@bananapi /media/000CD28900059367 $ sudo dd if=/dev/zero of=/dev/sda1 bs=1M count=4096
  2. 4096+0 records in
  3. 4096+0 records out
  4. 4294967296 bytes (4.3 GB) copied, 100.837 s, 42.6 MB/s
Copy the Code
If you use the ext3 or ext4 format, it will be faster.

Phi___  
Ok, I didn't think to this way.
The result in Sata mode with ext4 fs  :
  1. root@Bananapi:/mnt/dd# dd if=/dev/zero of=/dev/sda1 bs=1M count=4096
  2. 4096+0 records in
  3. 4096+0 records out
  4. 4294967296 bytes (4.3 GB) copied, 103.006 s, 41.7 MB/s
  5. root@Bananapi:/mnt/dd#
Copy the Code
and in Usb mode with ext4 fs :
  1. root@Bananapi:~# dd if=/dev/zero of=/dev/sda1 bs=1M count=4096
  2. 4096+0 records in
  3. 4096+0 records out
  4. 4294967296 bytes (4.3 GB) copied, 198.053 s, 21.7 MB/s
  5. root@Bananapi:~#
Copy the Code

Reply  Phi___

I test dd command. My HDD is ntfs format.If you use the ext3 or ext4 format, it will ...
tony_zhang Posted at 2014-6-9 02:50



   
Hi Tony, I like to know the ub speed vs sata speed in ntfs format, the record if it in sata?

I check it is in sata. The usb speed is a little slow.

http://en.wikipedia.org/wiki/USB
From the Wiki..
USB 2.0 was released in April 2000 (now called "Hi-Speed"), adding higher maximum signaling rate of 480 Mbit/s (due to bus access constraints the effective throughput is limited to 35 MB/s or 280 Mbit/s),

I had a laptop that maxed out at about 20MB/sec to a hard drive and that was all it got. Not sure how anyone could get 55 MB/s. That seems like SATA or USB3 or maybe its 55Mb/sec and not 55MB/sec?

Other thoughts.. The USB to SATA device can also limit the interaction with the drive.
Also 41.7 MB/s seems about right for SATA on large continuous writes but depends on the drive. The trick is do NOT measure a hard drive speed on short burst reads or writes. You need to copy something like a GB or greater to really measure the drive performance.

You have to log in before you can reply Login | Sign Up

Points Rules