Thank you for your donation


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
(Solved) - Improve network speed over lan
26th Oct, 2016, 01:13 AM
Post: #1
(Solved) - Improve network speed over lan
Hello,

I use my RPi2 as a network drive to access music/movies and save backups via SMB. Since the Rpi2 with 100Mbit-Lan and USB2 speed is very limited, for me therefore counts every bit/s.
With Raspbian and other distributions i always get a network speed of about 11-12MB/s(read/write) over SMB, with xbian however only 8-9MB/s(read) and 4-5MB/s(write).
Because as i said for me every bit/s counts, i wanted to switch to a Gbit-lan adapter. Since everything runs over a single USB controller, i expected no huge speedup, but with Raspbian or OSMC i reach a speed of 16MB/s(read) and 12-13MB/s(write) over SMB with the Adapter. With Xbian unfortunately i get again only asignificantly lower speed of 12MB/s(read) and 6-7MB/s(write):
XBian:

http://fs5.directupload.net/images/161025/yl52hnp4.png
OSMC:

http://fs5.directupload.net/images/161025/jbe8mqtl.png
-i testet the Speed with a fresh isntalled Xbian on a sandisk ultra 32GB SD Card.
-The values in the test are based on the informations of the Windows Explorer when reading and writing a 2Gb large ISO file (film) on the external HDD (ntfs)
-With my USB stick (ext4) the speeds ar minimally higher, but the ratio are the same.
-Is noticeable that with xbian at the start sometimes the reading speeds is as high as with OSMC (12MB/s) but after a while it breaks down to 8MB/s (like you cann see at the picture of Xian-write-100Mbit)
-same result with overclocking to 1100 Mhz

My Enviromet:
-PC and RPi2 connectet via Lan with my Gbit-Router (Unitmedian) an Cat6 cable.
-PC: I5 with Gbit-Lan and SSD (Windows 10).
-Hard Disks Pi2: Western Digital 4TB My Book-USB3-ntfs / SanDisk Extreme-USB3-ext4
-Sd Card Pi2: SanDisk Ultra 32GB

My question is now, does someone knows what the lower speeds with Xbian lie and is there a possibility to increase the network speed? (At least the same speed as with Raspbian or OSMC should be possible i think?)


Grettings,
H.
Find all posts by this user
Quote this message in a reply
26th Oct, 2016, 10:15 PM
Post: #2
RE: Improve network speed over lan
I tried to reproduce your issue but having no issue here.

Getting always read/write speed of 11.2MB/s +/- 0.3MB/s, but I do not have Windows for testing, samba share was mounted by my Cubieboard2 (1GHz dualcore ARM v7 powered) home server (100MBit/s network). Tested ext4 and ntfs fs, ntfs is a bit slower than ext4, but only marginal.

So my question, how do you mount your external disk?

Make sure that you do not use sync and use big_writes option when mounting external drive.

If big_writes is omitted, I get write speed of 7 MB/s on ntfs, so this option is really necessary
Find all posts by this user
Quote this message in a reply
27th Oct, 2016, 12:22 AM
Post: #3
RE: Improve network speed over lan
Hello Nachteile,

i didn´t mount it by myself, i put it on the USB port an it works. (In the Xbian setting automount is activated (by default) and my only change was to anable "shares schuld be world writeable")

But it semme you are on the right way,
after i disable the "mount with sync option" at "XBian - XBMC - USB - plug&play", the writespeed goes up to 8-9MB/s (before 4-5MB/s) and is now on the same level as readspeed Smile
But i can´t find any option to enable big_writes, can you tell me how i can enable this option?

Grettings,

H.
Find all posts by this user
Quote this message in a reply
27th Oct, 2016, 12:30 AM (This post was last modified: 27th Oct, 2016 12:31 AM by Nachteule.)
Post: #4
RE: Improve network speed over lan
Ok, I see. You are using functionality of package xbian-package-usbmount

To configure mount options, please look into file /etc/usbmount/usbmount.conf

(variable MOUNTOPTIONS and FS_MOUNTOPTIONS)

In case of ntfs mounts, big_writes option is already enabled but sync option is usually set by default
Find all posts by this user
Quote this message in a reply
27th Oct, 2016, 01:11 AM
Post: #5
RE: Improve network speed over lan
Thank you for your quick response Smile

i´ve checked the file /etc/usbmount/usbmount.conf, and as you say big_writes option is enabled for ntfs.
So this does not seem to be my problem with the lower networkspeed, i now got 8-9MB/s for read/write.
Strage that you have the same speed with Xbian as I get with other distributions (11-12MB/s).
Do you still have any idea why it could be? (my Xbian is freshly installed and no other things installed or added in Kodi).

I have now tested the network speed with the tool LAN Speed Test:(500MB)

but the transmission values change only minimal.
Only for smale files the speed will increases for reading:(10MB)
Find all posts by this user
Quote this message in a reply
27th Oct, 2016, 03:09 AM (This post was last modified: 27th Oct, 2016 03:27 AM by Nachteule.)
Post: #6
RE: Improve network speed over lan
(27th Oct, 2016 01:11 AM)Harald654 Wrote:  Do you still have any idea why it could be? (my Xbian is freshly installed and no other things installed or added in Kodi).

Unfortunately not. Yesterday I looked for Samba tweaks, but all tweaks I found are enabled per default or already set in smb.conf

Now I was just reconfiguring my notebook a bit (connected to GBit switch instead of WLAN) and started my pretty old W7/32bit in VMware workstation.

Here is my result of reading from XBian's external disk over network:



This was copy from ntfs fs

Writing is a bit slower, getting 11,1MB/sec average

Find all posts by this user
Quote this message in a reply
27th Oct, 2016, 03:30 AM
Post: #7
RE: Improve network speed over lan
different SD card maybe?

~~~~>>>Please always follow rules and read before you post<<<~~~~
Find all posts by this user
Quote this message in a reply
27th Oct, 2016, 03:32 AM
Post: #8
RE: Improve network speed over lan
@rikardo1979

Nope, only read/write to external 4TB WD disk, not SD card
Find all posts by this user
Quote this message in a reply
27th Oct, 2016, 03:38 AM
Post: #9
RE: Improve network speed over lan
@Harald654
Did you already test raw read/write speed from/to external disk?

Terminal

root@xbian:/home/xbian/storage/test# fdisk -l /dev/sdb

Disk /dev/sdb: 698.7 GiB, 750153367552 bytes, 1465143296 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xfe2dc593

Device Boot Start End Sectors Size Id Type
/dev/sdb1 2048 206847 204800 100M 7 HPFS/NTFS/exFAT
/dev/sdb2 206848 205012079 204805232 97.7G 7 HPFS/NTFS/exFAT
/dev/sdb3 * 205012080 205172729 160650 78.5M 83 Linux
/dev/sdb4 205172736 1465147391 1259974656 600.8G f W95 Ext'd (LBA)
/dev/sdb5 205174784 1465147391 1259972608 600.8G 8e Linux LVM

root@xbian:/home/xbian/storage/test# dd if=/dev/sdb of=/dev/null bs=1M count=1024
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 35.7181 s, 30.1 MB/s
root@xbian:/home/xbian/storage/test# dd if=/dev/zero of=2G bs=1M count=2048
2048+0 records in
2048+0 records out
2147483648 bytes (2.1 GB) copied, 64.9729 s, 33.1 MB/s
root@xbian:/home/xbian/storage/test#
Find all posts by this user
Quote this message in a reply
27th Oct, 2016, 04:26 AM
Post: #10
RE: Improve network speed over lan
(27th Oct, 2016 03:32 AM)Nachteule Wrote:  @rikardo1979

Nope, only read/write to external 4TB WD disk, not SD card

I meant system (XBian) is on different SD card Wink different HW gives different results?

~~~~>>>Please always follow rules and read before you post<<<~~~~
Find all posts by this user
Quote this message in a reply
27th Oct, 2016, 04:29 AM
Post: #11
RE: Improve network speed over lan
Ok, you're right.

But having absolutely no idea what culprit could be
Find all posts by this user
Quote this message in a reply
27th Oct, 2016, 04:35 AM
Post: #12
RE: Improve network speed over lan
me too Smile I just guessing as usual Tongue

~~~~>>>Please always follow rules and read before you post<<<~~~~
Find all posts by this user
Quote this message in a reply
27th Oct, 2016, 06:02 AM
Post: #13
RE: Improve network speed over lan
i also test it with my old laptop with Win7, but still the same speed.

Heres the result of the raw test: (my HDD is a little bit faster than yours Tongue)
Terminal
xbian@xbian /media/MyBook $ sudo fdisk -l /dev/sda1

Disk /dev/sda1: 3.7 TiB, 4000751550464 bytes, 976745984 sectors
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x69205244

Device Boot Start End Sectors Size Id Type
/dev/sda1p1 ? 218129509 1920119918 1701990410 6.3T 72 unknown
/dev/sda1p2 ? 729050177 1273024900 543974724 2T 74 unknown
/dev/sda1p3 ? 168653938 168653938 0 0B 65 Novell Netware 386
/dev/sda1p4 2692939776 2692991410 51635 201.7M 0 Empty

Partition table entries are not in disk order.
xbian@xbian /media/MyBook $ sudo dd if=/dev/sda1 of=/dev/null bs=1M count=1024
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 35.3758 s, 30.4 MB/s
xbian@xbian /media/MyBook $ sudo dd if=/dev/zero of=2G bs=1M count=2048
2048+0 records in
2048+0 records out
2147483648 bytes (2.1 GB) copied, 62.9152 s, 34.1 MB/s

@rikardo1979:
I installed quickly Xbina on the SD card wich i used for the test with OSMC, but still get the same speed of 8-9MB/s.

If anybody read this theard with an RPI2, can you plese test your SMB speed and give a feedback Smile
(so we know the problem is only with me)
Find all posts by this user
Quote this message in a reply
27th Oct, 2016, 06:29 AM
Post: #14
RE: Improve network speed over lan
Quote:Heres the result of the raw test: (my HDD is a little bit faster than yours Tongue)

I can live with that (this is my oldest in use hd (Samsung 750GB) I plugged into an older WD MyBook box, just for testing) Smile

You have funny disk partition on your disk. Never seen before
Find all posts by this user
Quote this message in a reply
27th Oct, 2016, 07:06 AM
Post: #15
RE: Improve network speed over lan
i cant follow you, what did you mean? "media/MyBook"?Dodgy

But i have good (and strange) news!
I take a look at the samba settings of OSMC:
Terminal
[global]

# If you require a fully custom smb.conf create smb-local.conf instead of editing smb.conf so your
# configuration will not be overwritten by samba upgrades. You can use smb.conf as a template by
# copying it to smb-local.conf then removing the config file line below in the new file. If you only
# need to add some additional shares see smb-shares.conf below for a simpler way to do this.

config file = /etc/samba/smb-local.conf

workgroup = WORKGROUP
security=user
follow symlinks = yes
wide links = no
unix extensions = no
lock directory = /var/cache/samba
load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes
log level = 1
map to guest = bad user
usershare template share = automount template

read raw = Yes
write raw = Yes
strict locking = no
min receivefile size = 16384
use sendfile = true
aio read size = 2048
aio write size = 2048
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=131072 SO_SNDBUF=131072

[osmc]
browsable = yes
read only = no
valid users = osmc
path = /home/osmc
comment = OSMC Home Directory

[automount template]
browseable = yes
-valid = no
valid users = osmc
path = %P
hide files = /$RECYCLE.BIN/System Volume Information/desktop.ini/thumbs.db/

# Add custom shares in smb-shares.conf instead of editing smb.conf so they will not be
# overwritten by samba updates. You can only add new shares to smb-shares.conf, not change
# the default shares or global options. If you need full control see smb-local.conf above.

include = /etc/samba/smb-shares.conf

and simply import/change a few things in xbian (without knowing what I do)IdeaBig Grin
original:
Terminal
# DO NOT EDIT THIS FILE. FOR ADDITIONAL SETTINGS OR SHARES DEFINITION
# USE 'net' (man net).

[global]
server string = XBIAN
guest ok = yes
security = user
socket options = TCP_NODELAY SO_RCVBUF=65535 SO_SNDBUF=65535
registry shares = yes
syslog = 0
map to guest = bad user
workgroup = WORKGROUP
bind interfaces only = No
encrypt passwords = true
log level = 0
# smb ports = 445
unix extensions = No
wide links = yes

include = /etc/samba/user.conf
include = /etc/samba/shares.conf
my new version:
Terminal
# DO NOT EDIT THIS FILE. FOR ADDITIONAL SETTINGS OR SHARES DEFINITION
# USE 'net' (man net).

[global]
server string = XBIAN
guest ok = yes
security = user
socket options = TCP_NODELAY SO_RCVBUF=65535 SO_SNDBUF=65535
registry shares = yes
syslog = 0
map to guest = bad user
workgroup = WORKGROUP
bind interfaces only = No
encrypt passwords = true
log level = 0
# smb ports = 445
unix extensions = No
wide links = no

read raw = Yes
write raw = Yes
strict locking = no
min receivefile size = 16384
use sendfile = true
aio read size = 2048
aio write size = 2048
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=131072 SO_SNDBUF=131072






include = /etc/samba/user.conf
include = /etc/samba/shares.conf

result:

SmileSmileSmile

edit: i found a link that may be explained
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: