Please select To the mobile version | Continue to access the desktop computer version

OrangePi

 Login            
 Register            
Search
Hot search: orangepi
View: 2853|Reply: 4

OrangePi PC2 UASP (usb) support and samba tuning

[Copy link]

1

Threads

2

Posts

29

Credits

Novice

Rank: 1

Credits
29
Post time 2017-3-19 19:27:56 | Show all posts |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

4283

Credits

Moderator

Rank: 7Rank: 7Rank: 7

Credits
4283
Post time 2017-3-19 23:58:34 | Show all posts
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
Post time 2017-3-20 17:16:02 | Show all posts
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| Post time 2017-3-25 17:50:41 | Show all posts
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

4283

Credits

Moderator

Rank: 7Rank: 7Rank: 7

Credits
4283
Post time 2017-3-25 22:46:16 | Show all posts
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 have to log in before you can reply Login | Register

Points Rules

Archiver|Mobile edition|Darkroom|OrangePi En ( 粤ICP备14086627号-2

2020-7-4 17:18 GMT+8 , Processed in 0.029515 second(s), 22 queries .

Powered by Discuz! X3.2

© 2014-2015 orangepibbs en.

Quick Reply To Top Return to the list