Bananian

Slow Read and Write Speeds with SATA connection

21 4588
Hi Steve,

I have a similar problem (see Armbian-Forum or LeMaker-Forum).

I run a BPi and a WD Red 3TB HDD, connected to sata. Using iozone with 2GB filesize I get 10 MB/s write and 20 MB/s read speed. You reach 20 MB/s for both.

In my Armbian-Thread a User run the same test with his Olimex Lime 2 board (nearly the same tp BPi) and a WD Red 1TB HDD. He reaches 40 MB/s write and 100 MB/s read speed.

So, in my opinion there should be something wrong with the sata performance on my and also your system. But at the moment, I don't know which steps to do next.

Maybe someone has a good hint?

Thanks,
Michael

MichaGue replied at Wed Oct 14, 2015 09:28
Hi Steve,

I have a similar problem (see Armbian-Forum or LeMaker-Forum).

Michael,

Hoping for the same thing. In the meantime - How do I make sure the test I'm doing with iozone is testing the drive I have mounted at sda1 and not the sdcard?

Steve

Hi Steve,

open two terminals.

Terminal one - test your drive:
  1. iozone -a -y 512k -q 1024K -s 2000m -g 2000m -i 0 -i1
Copy the Code


Terminal two - see cpu usage and which drive is tested:
  1. iostat -x 20 -m
Copy the Code


If you do not already have iostat installed, just type:
  1. apt-get install sysstat
Copy the Code


Best regards,
Michael

Edited by MichaGue at Sat Oct 17, 2015 02:21

You can stop iostat using STRG+C.

If you want to change your working directory to your harddisk do the next steps.

See, which drives are installed:
  1. ls /dev/ | grep sd
Copy the Code


In my case, I want to mount sda1:
  1. mkdir /media/hdd
  2. mount /dev/sda1 /media/hdd
Copy the Code


Now you can switch to your hdd:
  1. cd /media/hdd
Copy the Code


Start there iozone.

Sorry for the delay, I've been traveling for a while and just got back to this. Just ran the test on the external drive.

Here's the results of iozone:

  1. silver  iozone -a -y 512k -q 1024K -s 2000m -g 2000m -i 0 -i1
  2.         Iozone: Performance Test of File I/O
  3.                 Version $Revision: 3.429 $
  4.                 Compiled for 32 bit mode.
  5.                 Build: linux

  6.         Contributors:William Norcott, Don Capps, Isom Crawford, Kirby Collins
  7.                      Al Slater, Scott Rhine, Mike Wisner, Ken Goss
  8.                      Steve Landherr, Brad Smith, Mark Kelly, Dr. Alain CYR,
  9.                      Randy Dunlap, Mark Montague, Dan Million, Gavin Brebner,
  10.                      Jean-Marc Zucconi, Jeff Blomberg, Benny Halevy, Dave Boone,
  11.                      Erik Habbinga, Kris Strecker, Walter Wong, Joshua Root,
  12.                      Fabrice Bacchella, Zhenghua Xue, Qin Li, Darren Sawyer,
  13.                      Vangel Bojaxhi, Ben England, Vikentsi Lapa.

  14.         Run began: Sun Oct 25 11:42:40 2015

  15.         Auto Mode
  16.         Using Minimum Record Size 512 kB
  17.         Using Maximum Record Size 1024 kB
  18.         File size set to 2048000 kB
  19.         Using maximum file size of 2048000 kilobytes.
  20.         Command line used: iozone -a -y 512k -q 1024K -s 2000m -g 2000m -i 0 -i1
  21.         Output is in kBytes/sec
  22.         Time Resolution = 0.000001 seconds.
  23.         Processor cache size set to 1024 kBytes.
  24.         Processor cache line size set to 32 bytes.
  25.         File stride size set to 17 * record size.
  26.                                                               random    random     bkwd    record    stride
  27.               kB  reclen    write  rewrite    read    reread    read     write     read   rewrite      read   fwrite frewrite    fread  freread
  28.          2048000     512    38635    37537   124794   133551
  29.          2048000    1024    38304    38371   135404   138342

  30. iozone test complete.
Copy the Code


And some of the results from iostat:

  1. avg-cpu:  %user   %nice %system %iowait  %steal   %idle
  2.           24.94    0.00   46.69   22.36    0.00    6.01

  3. Device:         rrqm/s   wrqm/s     r/s     w/s    rMB/s    wMB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
  4. sda               3.95     0.10  787.95   14.80    97.54     7.19   267.19    14.66   25.76    1.07 1340.24   1.01  81.45
  5. mmcblk0           0.00     0.00    0.20    0.05     0.00     0.00    35.20     0.00    8.00   10.00    0.00   2.00   0.05

  6. avg-cpu:  %user   %nice %system %iowait  %steal   %idle
  7.           16.11    0.00   54.83   26.82    0.00    2.24

  8. Device:         rrqm/s   wrqm/s     r/s     w/s    rMB/s    wMB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
  9. sda              24.25     2.30  826.30   10.85   102.86     4.91   263.66    19.25   14.89    1.01 1072.40   0.97  81.05
  10. mmcblk0           0.00     0.00    0.25    1.50     0.00     0.01    12.11     0.01    6.57    0.00    7.67   0.57   0.10

  11. avg-cpu:  %user   %nice %system %iowait  %steal   %idle
  12.            4.43    0.00   24.59   66.99    0.00    3.99

  13. Device:         rrqm/s   wrqm/s     r/s     w/s    rMB/s    wMB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
  14. sda               4.30     1.25    1.00   73.15     0.14    36.11  1001.06   139.54 1884.24  155.00 1907.88  13.49 100.00
  15. mmcblk0           0.30     0.00    4.50    0.70     0.16     0.00    63.15     0.02    3.85    3.78    4.29   1.83   0.95

  16. avg-cpu:  %user   %nice %system %iowait  %steal   %idle
  17.           12.28    0.00   26.39   58.51    0.00    2.81

  18. Device:         rrqm/s   wrqm/s     r/s     w/s    rMB/s    wMB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
  19. sda               6.25     1.15    6.65   71.55     0.16    35.13   924.31   139.92 1786.03  203.76 1933.09  12.79 100.00
  20. mmcblk0           0.00     0.00    0.40    0.35     0.00     0.00    15.47     0.00    3.33    3.75    2.86   2.00   0.15

  21. avg-cpu:  %user   %nice %system %iowait  %steal   %idle
  22.           14.93    0.00   22.67   55.02    0.00    7.38

  23. Device:         rrqm/s   wrqm/s     r/s     w/s    rMB/s    wMB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
  24. sda               2.85     1.00    4.05   71.40     0.08    35.18   957.22   125.06 1717.06  156.54 1805.58  12.99  98.00
  25. mmcblk0           0.00     0.00    2.00    1.45     0.03     0.01    27.48     0.01    3.48    1.25    6.55   1.30   0.45

  26. avg-cpu:  %user   %nice %system %iowait  %steal   %idle
  27.            4.23    0.00   19.98   47.56    0.00   28.22

  28. Device:         rrqm/s   wrqm/s     r/s     w/s    rMB/s    wMB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
  29. sda               0.00     0.50    0.00   73.90     0.00    36.70  1017.06   112.49 1485.72    0.00 1485.72  13.36  98.75
  30. mmcblk0           0.00     0.00    0.00    0.05     0.00     0.00     8.00     0.00    0.00    0.00    0.00   0.00   0.00

  31. avg-cpu:  %user   %nice %system %iowait  %steal   %idle
  32.            8.32    0.00   20.03   46.60    0.00   25.05

  33. Device:         rrqm/s   wrqm/s     r/s     w/s    rMB/s    wMB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
  34. sda               0.00     0.55    0.15   73.45     0.00    36.45  1014.33   110.08 1483.17  106.67 1485.98  13.45  99.00
  35. mmcblk0           0.00     0.00    0.05    1.15     0.00     0.01    10.00     0.00    1.67    0.00    1.74   0.83   0.10

  36. avg-cpu:  %user   %nice %system %iowait  %steal   %idle
  37.           13.75    0.00   38.80   29.88    0.00   17.57

  38. Device:         rrqm/s   wrqm/s     r/s     w/s    rMB/s    wMB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
  39. sda               0.10     0.15  598.25   31.60    74.79    15.56   293.76    38.46   70.63    0.89 1390.97   1.40  88.40
  40. mmcblk0           0.00     0.00    0.10    1.20     0.00     0.01     9.85     0.01    5.00    0.00    5.42   0.77   0.10
Copy the Code


Again, I don't know how to interpret these results - what are good numbers, what are bad, what do they mean? So any help is appreciated.

In use, I am getting about 7 MB/s up and about 10-15 MB/s down over Samba share.

Thanks!

stevelambert replied at Sun Oct 25, 2015 13:36
Sorry for the delay, I've been traveling for a while and just got back to this. Just ran the test on ...

Iozone test looks okay and you are testing the right drive. For my opinion the hdd is not the problem.

Have you tested the network transfer using iperf?

Are Could you post a snapshot of
  1. cat /proc/interrupts
Copy the Code



I ran the iperf tests.

Here is the server - my macbook pro.

  1. iperf -s
  2. ------------------------------------------------------------
  3. Server listening on TCP port 5001
  4. TCP window size:  128 KByte (default)
  5. ------------------------------------------------------------
  6. [  4] local 192.168.1.53 port 5001 connected with 192.168.1.60 port 52428
  7. [ ID] Interval       Transfer     Bandwidth
  8. [  4]  0.0-10.2 sec   140 MBytes   115 Mbits/sec
  9. [  4] local 192.168.1.53 port 5001 connected with 192.168.1.60 port 52449
  10. [  4]  0.0-10.2 sec   142 MBytes   117 Mbits/sec
Copy the Code


Here is the client, the Banana Pi

  1. iperf -c 192.168.1.53
  2. ------------------------------------------------------------
  3. Client connecting to 192.168.1.53, TCP port 5001
  4. TCP window size: 21.0 KByte (default)
  5. ------------------------------------------------------------
  6. [  3] local 192.168.1.60 port 52428 connected with 192.168.1.53 port 5001
  7. [ ID] Interval       Transfer     Bandwidth
  8. [  3]  0.0-10.0 sec   140 MBytes   117 Mbits/sec
  9. ➜  ~  iperf -c 192.168.1.53
  10. ------------------------------------------------------------
  11. Client connecting to 192.168.1.53, TCP port 5001
  12. TCP window size: 21.0 KByte (default)
  13. ------------------------------------------------------------
  14. [  3] local 192.168.1.60 port 52449 connected with 192.168.1.53 port 5001
  15. [ ID] Interval       Transfer     Bandwidth
  16. [  3]  0.0-10.1 sec   142 MBytes   118 Mbits/sec
Copy the Code


Here it is the other way around

Banana Pro as server

  1. iperf -s
  2. ------------------------------------------------------------
  3. Server listening on TCP port 5001
  4. TCP window size: 85.3 KByte (default)
  5. ------------------------------------------------------------
  6. [  4] local 192.168.1.60 port 5001 connected with 192.168.1.53 port 62520
  7. [ ID] Interval       Transfer     Bandwidth
  8. [  4]  0.0-10.0 sec   186 MBytes   156 Mbits/sec
  9. [  5] local 192.168.1.60 port 5001 connected with 192.168.1.53 port 62521
  10. [  5]  0.0-10.0 sec   184 MBytes   154 Mbits/sec
Copy the Code


MacBook Pro as client

  1. iperf -c 192.168.1.60
  2. ------------------------------------------------------------
  3. Client connecting to 192.168.1.60, TCP port 5001
  4. TCP window size:  129 KByte (default)
  5. ------------------------------------------------------------
  6. [  4] local 192.168.1.53 port 62521 connected with 192.168.1.60 port 5001
  7. [ ID] Interval       Transfer     Bandwidth
  8. [  4]  0.0-10.0 sec   184 MBytes   154 Mbits/sec
Copy the Code


And here is the interrupts

  1. cat /proc/interrupts
  2.             CPU0       CPU1
  3. 29:   39623120   30567748       GIC  arch_timer
  4. 30:          0          0       GIC  arch_timer
  5. 32:          0          0       GIC  axp_mfd
  6. 33:          7          0       GIC  serial
  7. 37:         11          0       GIC  RemoteIR
  8. 39:    6881656          0       GIC  sunxi-i2c.0
  9. 40:          0          0       GIC  sunxi-i2c.1
  10. 41:          0          0       GIC  sunxi-i2c.2
  11. 54:          0          0       GIC  timer0
  12. 55:         12          0       GIC  aw_clock_event
  13. 56:          6          0       GIC  sunxi-rtc alarm
  14. 59:          0          0       GIC  dma_irq
  15. 60:          0          0       GIC  sunxi-gpio
  16. 64:   12315063          0       GIC  sunxi-mmc
  17. 67:          0          0       GIC  sunxi-mmc
  18. 71:          0          0       GIC  ehci_hcd:usb1
  19. 72:          0          0       GIC  ehci_hcd:usb3
  20. 76:   72435031          0       GIC  sunxi lcd0
  21. 77:          0          0       GIC  sunxi lcd1
  22. 78:          0          0       GIC  g2d
  23. 79:   36217486          0       GIC  sunxi scaler0
  24. 80:          0          0       GIC  sunxi scaler1
  25. 88:    1777692          0       GIC  sw_ahci
  26. 92:          0          0       GIC  ace_dev
  27. 96:          0          0       GIC  ohci_hcd:usb2
  28. 97:          0          0       GIC  ohci_hcd:usb4
  29. 117:  199438933          0       GIC  eth0
  30. 120:          0          0       GIC  sunxi-i2c.3
  31. IPI0:          0          0  Timer broadcast interrupts
  32. IPI1:   13945845   19528161  Rescheduling interrupts
  33. IPI2:          0          0  Function call interrupts
  34. IPI3:        784       1570  Single function call interrupts
  35. IPI4:          0          0  CPU stop interrupts
  36. IPI5:          0          0  CPU backtrace
  37. Err:          0
Copy the Code

Hi Steve,

bandwidth is really slow. It should be possible to reach around 900MBit/s (BPi => Notebook) and around 500 MBit/s (Notebook => BPi). If you have a closer look at your interrupts you see the answer. BPi has two cores (CPU0, CPU1), but at the moment CPU1 does nothing.

I would suggest to switch from bananian to armbian, also a debian image. Armbian comes with a lot of performance tuning from scratch. You will get it http://www.armbian.com here. Download Image for BPi and test again.

Best regards,
Michael

MichaGue replied at Thu Oct 29, 2015 09:06
Hi Steve,

bandwidth is really slow. It should be possible to reach around 900MBit/s (BPi => Noteboo ...

Hm, before I go to the trouble, is there a way to upgrade from bananian to armbian? Or do I have to write a new sdcard and re-install/reconfigure everything?



You can do the configuration in bananian mentioned here: http://forum.lemaker.org/forum.p ... amp;page=1#pid29072

But I would switch to armbian.

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

Points Rules