Cheng10 post at 2017-3-19 19:27:56

OrangePi PC2 UASP (usb) support and samba tuning

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 tohttps://www.arm-blog.com/samba-finetuning-for-better-transfer-speeds/for the great explanation.
I was almost able to DOUBLE my speeds (from ~ 15 MB/s) after editing my smb.conf file!!!

igorpec post at 2017-3-19 23:58:34

For UASP you need a modern kernel.

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

kaiser post at 2017-3-20 17:16:02

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.php?/topic/3821-bananapi-network-performance-problem/&do=findComment&comment=27876

Real world SMB performance can double with appropriate software :)

Cheng10 post at 2017-3-25 17:50:41

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.

igorpec post at 2017-3-25 22:46:16

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/
page: [1]
View full version: OrangePi PC2 UASP (usb) support and samba tuning