View: 7594|Reply: 4

OrangePi PC2 UASP (usb) support and samba tuning

[Copy link]

1

threads

2

posts

29

credits

Novice

Rank: 1

credits
29
Published in 2017-3-19 19:27:56 | Show all floors |Read mode
Hello,

I am using the 0.9.2 debian for orangepi and with some tuning I 've managed to achieve speeds of ~ 30 MB/s in a Samba-shared hdd drive (both read and write). Can you please add support for UASP instead of the current crappy usb protocol, so that we can get even higher speeds? Since the H5 cpu is quite powerful, there would be a great potential in this board as a NAS. Is it also possible to increase the max frequency beyond 1.01 GHz (I know it requires some effort, but I am not experienced enough to implement that).
Thank you in advance!!

For Samba tuning, you can add the following lines in /etc/samba/smb.conf

socket options = IPTOS_LOWDELAY SO_RCVBUF=131072 SO_SNDBUF=131072 TCP_NODELAY
min receivefile size = 2048
use sendfile = true
aio read size = 2048
aio write size = 2048
write cache size = 1024000
read raw = yes
write raw = yes
getwd cache = yes
oplocks = yes
max xmit = 32768
dead time = 15
large readwrite = yes


All credit goes to  https://www.arm-blog.com/samba-f ... er-transfer-speeds/  for the great explanation.
I was almost able to DOUBLE my speeds (from ~ 15 MB/s) after editing my smb.conf file!!!

9

threads

634

posts

4429

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
4429
Published in 2017-3-19 23:58:34 | Show all floors
For UASP you need a modern kernel.

https://www.armbian.com/orange-pi-pc2/

0

threads

21

posts

74

credits

Registered member

Rank: 2

credits
74
Published in 2017-3-20 17:16:02 | Show all floors
Don't use that old and broken vendor kernel.

  • With mainline kernel you have the following advantages:
  • CPU clockspeeds at up to 1.3GHz (important since Samba acts single threaded!)
  • You can use UASP with an appropriate enclosure
  • You'll soon be able to use the Micro USB (OTG) port as a full host port so all you need to connect to superiour Xunlong NAS Expansion board (JMS578) is a Micro USB to USB cable
  • You can use btrfs with transparent file compression (mount options: noatime,nodiratime,compress=lzo)
  • You can use Armbian and adjust CPU affinity easily


Some more Samba tuning tips: https://forum.armbian.com/index. ... t&comment=27876

Real world SMB performance can double with appropriate software

1

threads

2

posts

29

credits

Novice

Rank: 1

credits
29
 Author| Published in 2017-3-25 17:50:41 | Show all floors
Hi and thank you for the response!!

Now my question is, since I am new in the platform, where can I find the mainline kernel (preferably update from my current kernel). Do you mean Armbian ubuntu? I will anyways give it a try. And yes, I noticed that samba tends to be single-threaded, since the total cpu usage was actually <50% while transferring files.

9

threads

634

posts

4429

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
4429
Published in 2017-3-25 22:46:16 | Show all floors
where can I find the mainline kernel (preferably update from my current kernel). Do you mean Armbian ubuntu?


No upgrade, no support and no alternatives at the moment:
https://dl.armbian.com/orangepipc2/
You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list