-1
I experience very slow eSATA performance. Around 5 mb/s on a disk that easily handles 150-200 mb/s. Do I need to enable some setting or module in order to speed it up? The disk is a 4 TB disk and the computer is an HP MicroServer. Kernel is 3.2.0-4-amd64.
Update:
Distribution is Debian Lenny.
I have measured using dd if=/dev/zero of=/mnt/foo and if=/mnt/somebigfile.tar.gz of=/dev/null. I have tried various block sizes for dd as well as oflag=direct and iflag=direct.
Both read and write are slow. However, I am most concerned about writes as this disk was supposed to be used for backup...
Update:
I have done some more performance testing with dd. Here are the results:
(root@corvina) (14-08-17 22:40:29) (P:0 L:2) [0]
~ # alias drop-all-caches [R0 J0 L:0.70 1.13 1.35 U:3+11:29 pts/4 2122H]
drop-all-caches='sync ; echo 3 > /proc/sys/vm/drop_caches'
(root@corvina) (14-08-17 22:40:39) (P:0 L:2) [0]
~ # hdparm -Tt /dev/sda [R0 J0 L:0.60 1.10 1.33 U:3+11:29 pts/4 2123H]
/dev/sda:
Timing cached reads: 2970 MB in 2.00 seconds = 1484.76 MB/sec
Timing buffered disk reads: 528 MB in 3.01 seconds = 175.37 MB/sec
(root@corvina) (14-08-17 22:40:59) (P:0 L:2) [0]
~ # drop-all-caches; time dd if=/dev/zero of=/mnt/zero.dat bs=8k count=100k; time sync
102400+0 records in
102400+0 records out
838860800 bytes (839 MB) copied, 1,35067 s, 621 MB/s
dd if=/dev/zero of=/mnt/zero.dat bs=8k count=100k 0,03s user 1,32s system 91% cpu 1,485 total
sync 0,00s user 0,01s system 0% cpu 8,002 total
(root@corvina) (14-08-17 22:41:57) (P:0 L:2) [0]
~ # rm -vf /mnt/zero.dat [R0 J0 L:0.57 0.93 1.25 U:3+11:30 pts/4 2125H]
removed `/mnt/zero.dat'
(root@corvina) (14-08-17 22:42:28) (P:0 L:2) [0]
~ # drop-all-caches; time dd if=/dev/zero of=/mnt/zero.dat bs=8k count=1000k; time sync
1024000+0 records in
1024000+0 records out
8388608000 bytes (8,4 GB) copied, 68,5064 s, 122 MB/s
dd if=/dev/zero of=/mnt/zero.dat bs=8k count=1000k 0,41s user 22,31s system 33% cpu 1:08,58 total
sync 0,00s user 0,01s system 0% cpu 14,465 total
(root@corvina) (14-08-17 22:43:52) (P:0 L:2) [0]
~ # drop-all-caches; time dd if=/dev/zero of=/mnt/zero.dat bs=8k count=1000k oflag=direct; time sync
1024000+0 records in
1024000+0 records out
8388608000 bytes (8,4 GB) copied, 184,3 s, 45,5 MB/s
dd if=/dev/zero of=/mnt/zero.dat bs=8k count=1000k oflag=direct 0,79s user 109,24s system 59% cpu 3:04,62 total
sync 0,00s user 0,01s system 2% cpu 0,289 total
(root@corvina) (14-08-17 22:47:59) (P:0 L:2) [0]
~ # drop-all-caches; time dd of=/dev/null if=/mnt/zero.dat 16384000+0 records in
16384000+0 records out
8388608000 bytes (8,4 GB) copied, 82,3752 s, 102 MB/s
dd of=/dev/null if=/mnt/zero.dat 8,13s user 33,21s system 50% cpu 1:22,44 total
(root@corvina) (14-08-17 22:49:58) (P:0 L:2) [0]
~ # drop-all-caches; time dd of=/dev/null if=/mnt/zero.dat bs=8k
1024000+0 records in
1024000+0 records out
8388608000 bytes (8,4 GB) copied, 82,0298 s, 102 MB/s
dd of=/dev/null if=/mnt/zero.dat bs=8k 0,76s user 19,02s system 24% cpu 1:22,18 total
(root@corvina) (14-08-17 22:51:31) (P:0 L:2) [0]
~ # drop-all-caches; time dd of=/dev/null if=/mnt/zero.dat bs=8k iflag=direct
1024000+0 records in
1024000+0 records out
8388608000 bytes (8,4 GB) copied, 157,355 s, 53,3 MB/s
dd of=/dev/null if=/mnt/zero.dat bs=8k iflag=direct 0,88s user 85,48s system 54% cpu 2:37,42 total
These numbers do not look like what I got earlier at all. It is pretty late here, so I have to go to sleep. I hope I will be able to investigate this further on Tuesday.
You need to include how you measured the throughput for it to be at all meaningful. Did you read or write (their speed are usually very different)? Did you
dd if=/dev/random
(would be limited to the speed of/dev/random
generation)? Did you copy a file from and to the same disk? Did you use some closed source tool which doesn't explain any of its numbers? – l0b0 – 2014-08-15T07:13:48.957eSATA performance is an issue for a lot of people, so I think this is a relevant question. @Thomas: please provide some more information on your Linux distribution and hardware (the Debina/Ubuntu package lsscsi might come in handy here). – agtoever – 2014-08-15T07:46:29.757
You are testing '/mnt/zero.dat', which is on your root partition (internal hd). Mount your esata first ('sudo mount /dev/sdc /mnt/esatadisk' or use the directory created by the automounter) and then test that disk ('... of=/mnt/esatadisk/zero.dat') – agtoever – 2014-08-18T06:16:37.453