orcunbaslak
Posts: 12
Joined: Wed Mar 29, 2017 8:41 pm

Network Speed Issues & Samba NAS

Wed Jun 20, 2018 7:39 am

Hello,

I'm trying to use my Raspberry Pi 3 as a NAS at home.
My harddrive is NTFS and I successfully configures ntfs-3g driver and mounted it.

Here's my fstab configuration.

Code: Select all

proc            /proc           proc    defaults          0       0
PARTUUID=8e7f860e-01  /boot           vfat    defaults          0       2
PARTUUID=8e7f860e-02  /               ext4    defaults,noatime  0       1
/dev/sda1       /media/MainBackup       auto,noatime,big_writes 0       0
# a swapfile is not a swap partition, no line here
#   use  dphys-swapfile swap[on|off]  for that
When I read/write file to NTFS; My CPU's not going over %20 percent so NTFS speed is not an issue.

I've installed a 1000Gbit ethernet on USB2.0 port.

Code: Select all

[email protected]:~ $ sudo mii-tool eth1
eth1: negotiated 1000baseT-FD flow-control, link ok
...and ethtool output on eth1

Code: Select all

[email protected]:~ $ ethtool eth1
Settings for eth1:
	Supported ports: [ TP MII ]
	Supported link modes:   10baseT/Half 10baseT/Full
	                        100baseT/Half 100baseT/Full
	                        1000baseT/Half 1000baseT/Full
	Supported pause frame use: No
	Supports auto-negotiation: Yes
	Advertised link modes:  10baseT/Half 10baseT/Full
	                        100baseT/Half 100baseT/Full
	                        1000baseT/Full
	Advertised pause frame use: Symmetric Receive-only
	Advertised auto-negotiation: Yes
	Link partner advertised link modes:  10baseT/Half 10baseT/Full
	                                     100baseT/Half 100baseT/Full
	                                     1000baseT/Half 1000baseT/Full
	Link partner advertised pause frame use: No
	Link partner advertised auto-negotiation: Yes
	Speed: 1000Mb/s
	Duplex: Full
	Port: MII
	PHYAD: 32
	Transceiver: internal
	Auto-negotiation: on
Cannot get wake-on-lan settings: Operation not permitted
	Current message level: 0x00007fff (32767)
			       drv probe link timer ifdown ifup rx_err tx_err tx_queued intr tx_done rx_status pktdata hw wol
	Link detected: yes
It's registered as Gigabit ethernet. So I should be able to utilize the max speed USB2.0 bus offers (Around 480mbit)

I've configured Samba as well and It's running perfectly. Here's the smb.conf file.

Code: Select all

#
# Sample configuration file for the Samba suite for Debian GNU/Linux.
#
#
# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options most of which 
# are not shown in this example
#
# Some options that are often worth tuning have been included as
# commented-out examples in this file.
#  - When such options are commented with ";", the proposed setting
#    differs from the default Samba behaviour
#  - When commented with "#", the proposed setting is the default
#    behaviour of Samba but the option is considered important
#    enough to be mentioned here
#
# NOTE: Whenever you modify this file you should run the command
# "testparm" to check that you have not made any basic syntactic 
# errors. 

#======================= Global Settings =======================

[global]

## Browsing/Identification ###

# Change this to the workgroup/NT-domain name your Samba server will part of
   workgroup = WORKGROUP

# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable its WINS Server
#   wins support = no

# WINS Server - Tells the NMBD components of Samba to be a WINS Client
# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
;   wins server = w.x.y.z

# This will prevent nmbd to search for NetBIOS names through DNS.
   dns proxy = no

#### Networking ####

# The specific set of interfaces / networks to bind to
# This can be either the interface name or an IP address/netmask;
# interface names are normally preferred
;   interfaces = 127.0.0.0/8 eth0

# Only bind to the named interfaces and/or networks; you must use the
# 'interfaces' option above to use this.
# It is recommended that you enable this feature if your Samba machine is
# not protected by a firewall or is a firewall itself.  However, this
# option cannot handle dynamic or non-broadcast interfaces correctly.
;   bind interfaces only = yes



#### Debugging/Accounting ####

# This tells Samba to use a separate log file for each machine
# that connects
   log file = /var/log/samba/log.%m

# Cap the size of the individual log files (in KiB).
   max log size = 1000

# If you want Samba to only log through syslog then set the following
# parameter to 'yes'.
#   syslog only = no

# We want Samba to log a minimum amount of information to syslog. Everything
# should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
# through syslog you should set the following parameter to something higher.
   syslog = 0

# Do something sensible when Samba crashes: mail the admin a backtrace
   panic action = /usr/share/samba/panic-action %d


####### Authentication #######

# Server role. Defines in which mode Samba will operate. Possible
# values are "standalone server", "member server", "classic primary
# domain controller", "classic backup domain controller", "active
# directory domain controller". 
#
# Most people will want "standalone sever" or "member server".
# Running as "active directory domain controller" will require first
# running "samba-tool domain provision" to wipe databases and create a
# new domain.
   server role = standalone server

# If you are using encrypted passwords, Samba will need to know what
# password database type you are using.  
   passdb backend = tdbsam

   obey pam restrictions = yes

# This boolean parameter controls whether Samba attempts to sync the Unix
# password with the SMB password when the encrypted SMB password in the
# passdb is changed.
   unix password sync = yes

# For Unix password sync to work on a Debian GNU/Linux system, the following
# parameters must be set (thanks to Ian Kahan <<[email protected]> for
# sending the correct chat script for the passwd program in Debian Sarge).
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .

# This boolean controls whether PAM will be used for password changes
# when requested by an SMB client instead of the program listed in
# 'passwd program'. The default is 'no'.
   pam password change = yes

# This option controls how unsuccessful authentication attempts are mapped
# to anonymous connections
   map to guest = bad user

########## Domains ###########

#
# The following settings only takes effect if 'server role = primary
# classic domain controller', 'server role = backup domain controller'
# or 'domain logons' is set 
#

# It specifies the location of the user's
# profile directory from the client point of view) The following
# required a [profiles] share to be setup on the samba server (see
# below)
;   logon path = \\%N\profiles\%U
# Another common choice is storing the profile in the user's home directory
# (this is Samba's default)
#   logon path = \\%N\%U\profile

# The following setting only takes effect if 'domain logons' is set
# It specifies the location of a user's home directory (from the client
# point of view)
;   logon drive = H:
#   logon home = \\%N\%U

# The following setting only takes effect if 'domain logons' is set
# It specifies the script to run during logon. The script must be stored
# in the [netlogon] share
# NOTE: Must be store in 'DOS' file format convention
;   logon script = logon.cmd

# This allows Unix users to be created on the domain controller via the SAMR
# RPC pipe.  The example command creates a user account with a disabled Unix
# password; please adapt to your needs
; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u

# This allows machine accounts to be created on the domain controller via the 
# SAMR RPC pipe.  
# The following assumes a "machines" group exists on the system
; add machine script  = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u

# This allows Unix groups to be created on the domain controller via the SAMR
# RPC pipe.  
; add group script = /usr/sbin/addgroup --force-badname %g

############ Misc ############

# Using the following line enables you to customise your configuration
# on a per machine basis. The %m gets replaced with the netbios name
# of the machine that is connecting
;   include = /home/samba/etc/smb.conf.%m

# Some defaults for winbind (make sure you're not using the ranges
# for something else.)
;   idmap uid = 10000-20000
;   idmap gid = 10000-20000
;   template shell = /bin/bash

# Setup usershare options to enable non-root users to share folders
# with the net usershare command.

# Maximum number of usershare. 0 (default) means that usershare is disabled.
;   usershare max shares = 100

# Allow users who've been granted usershare privileges to create
# public shares, not just authenticated ones
   usershare allow guests = yes

log level = 1 
socket options = TCP_NODELAY SO_RCVBUF=65536 SO_SNDBUF=65536
read raw = yes 
write raw = yes 
max xmit = 65535 
dead time = 15
getwd cache = yes

#======================= Share Definitions =======================

[homes]
   comment = Home Directories
   browseable = no

# By default, the home directories are exported read-only. Change the
# next parameter to 'no' if you want to be able to write to them.
   read only = yes

# File creation mask is set to 0700 for security reasons. If you want to
# create files with group=rw permissions, set next parameter to 0775.
   create mask = 0700

# Directory creation mask is set to 0700 for security reasons. If you want to
# create dirs. with group=rw permissions, set next parameter to 0775.
   directory mask = 0700

# By default, \\server\username shares can be connected to by anyone
# with access to the samba server.
# The following parameter makes sure that only "username" can connect
# to \\server\username
# This might need tweaking when using external authentication schemes
   valid users = %S

# Un-comment the following and create the netlogon directory for Domain Logons
# (you need to configure Samba to act as a domain controller too.)
;[netlogon]
;   comment = Network Logon Service
;   path = /home/samba/netlogon
;   guest ok = yes
;   read only = yes

# Un-comment the following and create the profiles directory to store
# users profiles (see the "logon path" option above)
# (you need to configure Samba to act as a domain controller too.)
# The path below should be writable by all users so that their
# profile directory may be created the first time they log on
;[profiles]
;   comment = Users profiles
;   path = /home/samba/profiles
;   guest ok = no
;   browseable = no
;   create mask = 0600
;   directory mask = 0700

# Uncomment to allow remote administration of Windows print drivers.
# You may need to replace 'lpadmin' with the name of the group your
# admin users are members of.
# Please note that you also need to set appropriate Unix permissions
# to the drivers directory for these users to have write rights in it
;   write list = root, @lpadmin

[MainBackup]
comment = Main Backup
path = /media/MainBackup
valid users = @users
force group = users
create nask = 0660
directory mask = 0771
read only = no
But the problem is my transfer speeds are at 85mbit or below. Here's an iperf output.

iPerf - Raspberry as server

Code: Select all

[email protected]:~ $ iperf -s -i 1
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
[  4] local 192.168.1.100 port 5001 connected with 192.168.1.4 port 50179
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0- 1.0 sec  10.7 MBytes  89.4 Mbits/sec
[  4]  1.0- 2.0 sec  10.6 MBytes  89.1 Mbits/sec
[  4]  2.0- 3.0 sec  10.6 MBytes  89.1 Mbits/sec
[  4]  3.0- 4.0 sec  10.7 MBytes  89.8 Mbits/sec
[  4]  4.0- 5.0 sec  10.7 MBytes  89.7 Mbits/sec
[  4]  5.0- 6.0 sec  10.6 MBytes  89.1 Mbits/sec
[  4]  6.0- 7.0 sec  10.6 MBytes  89.1 Mbits/sec
[  4]  7.0- 8.0 sec  10.6 MBytes  89.1 Mbits/sec
[  4]  8.0- 9.0 sec  10.6 MBytes  89.2 Mbits/sec
[  4]  9.0-10.0 sec  10.6 MBytes  89.0 Mbits/sec
[  4]  0.0-10.1 sec   107 MBytes  89.2 Mbits/sec
iPerf - Raspberry as client

Code: Select all

[email protected]:~ $ iperf -c 192.168.1.4 -i 1
------------------------------------------------------------
Client connecting to 192.168.1.4, TCP port 5001
TCP window size: 43.8 KByte (default)
------------------------------------------------------------
[  3] local 192.168.1.100 port 39784 connected with 192.168.1.4 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0- 1.0 sec  8.50 MBytes  71.3 Mbits/sec
[  3]  1.0- 2.0 sec  8.25 MBytes  69.2 Mbits/sec
[  3]  2.0- 3.0 sec  8.12 MBytes  68.2 Mbits/sec
[  3]  3.0- 4.0 sec  8.25 MBytes  69.2 Mbits/sec
[  3]  4.0- 5.0 sec  8.12 MBytes  68.2 Mbits/sec
[  3]  5.0- 6.0 sec  8.25 MBytes  69.2 Mbits/sec
[  3]  6.0- 7.0 sec  8.38 MBytes  70.3 Mbits/sec
[  3]  7.0- 8.0 sec  8.25 MBytes  69.2 Mbits/sec
[  3]  8.0- 9.0 sec  8.12 MBytes  68.2 Mbits/sec
[  3]  9.0-10.0 sec  8.12 MBytes  68.2 Mbits/sec
[  3]  0.0-10.0 sec  82.4 MBytes  69.1 Mbits/sec
I noticed a difference in TCP window sizes as well.

However my internet connection is around 90mbit.

Code: Select all

[email protected]:~ $ speedtest-cli
Retrieving speedtest.net configuration...
Testing from Turksat Uydu-Net Internet (176.240.122.130)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by D-SMART (Istanbul) [0.99 km]: 86.633 ms
Testing download speed................................................................................
Download: 90.44 Mbit/s
Testing upload speed......................................................................................................
Upload: 2.80 Mbit/s
I know it's not relevant but that's an extra info.

What's holding the system back from fully utilizing the USB2.0 bus speed at Gigabit ethernet?

BR,

epoch1970
Posts: 1925
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: Network Speed Issues & Samba NAS

Wed Jun 20, 2018 11:13 am

Do you have 2 interfaces on the same 192.168.1.0 network?
In this case with Raspbian (linux in general) by default traffic passes through the interface with highest priority, i.e. lowest "metric" in your routing table.
Type "route -n" and look at the metric column. 0 is max priority, the higher the metric the lower the priority.
I imagine the built-in ethernet interface is set with the highest priority (metric around 200), as per default on Raspbian. 85/90 mpbs is the perf the built-in fast ethernet adapter on Pi 3 would give.

Disconnect the built-in ethernet and you should see transfer speed improve and reach 180/200 mbps.
If that works, set a metric option in dhcpcd.conf to give eth1 (USB) priority over eth0. Something like "metric 1" should do it. With this you could have both interfaces connected and use the USB link by default when it is there.

Otherwise you'd want to setup a routing policy per interface ("advanced routing") but that is more complex and metric should do.
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

orcunbaslak
Posts: 12
Joined: Wed Mar 29, 2017 8:41 pm

Re: Network Speed Issues & Samba NAS

Thu Jun 21, 2018 8:19 pm

There is only one interface is connected and running. Just one ethernet cable.

Does that still count? Do u need me to disable eth0?

epoch1970
Posts: 1925
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: Network Speed Issues & Samba NAS

Thu Jun 21, 2018 10:06 pm

No, disregard my comment.
If you have a single interface active, that interface is USB giga ethernet, you should see a speed of about 200mbps.
Either the host you're talking to is set to 100mbps, or a switch in between is, or else you should try using another USB adapter.

Which chipset does this adapter use?
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

orcunbaslak
Posts: 12
Joined: Wed Mar 29, 2017 8:41 pm

Re: Network Speed Issues & Samba NAS

Fri Jun 22, 2018 1:29 pm

Here's me lsusb output.

Code: Select all

[email protected]:~ $ lsusb
Bus 001 Device 004: ID 2357:0601
Bus 001 Device 005: ID 0bc2:3312 Seagate RSS LLC SRD00F2 Expansion Desktop Drive (STBV)
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
[email protected]:~ $
...and here is ifconfig eth1 output.

Code: Select all

[email protected]:~ $ ifconfig eth1
eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.100  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::afc8:2462:829f:1f23  prefixlen 64  scopeid 0x20<link>
        ether 18:d6:c7:11:27:80  txqueuelen 1000  (Ethernet)
        RX packets 908020  bytes 599892651 (572.1 MiB)
        RX errors 0  dropped 3229  overruns 0  frame 0
        TX packets 415452  bytes 550936665 (525.4 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
But there is something I'd like you to pay attention. Here's the iperf3 output.

Code: Select all

[email protected]:~ $ iperf3 -c 192.168.1.4 -i 1
Connecting to host 192.168.1.4, port 5201
[  4] local 192.168.1.100 port 43756 connected to 192.168.1.4 port 5201
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-1.00   sec  8.49 MBytes  71.2 Mbits/sec   20   36.8 KBytes
[  4]   1.00-2.00   sec  8.12 MBytes  68.1 Mbits/sec   20   42.4 KBytes
[  4]   2.00-3.00   sec  8.40 MBytes  70.5 Mbits/sec   19   41.0 KBytes
[  4]   3.00-4.00   sec  8.22 MBytes  68.9 Mbits/sec   22   49.5 KBytes
[  4]   4.00-5.00   sec  8.32 MBytes  69.8 Mbits/sec   22   48.1 KBytes
[  4]   5.00-6.00   sec  8.40 MBytes  70.5 Mbits/sec   27   36.8 KBytes
[  4]   6.00-7.00   sec  8.42 MBytes  70.6 Mbits/sec   19   49.5 KBytes
[  4]   7.00-8.00   sec  8.14 MBytes  68.3 Mbits/sec   28   35.4 KBytes
[  4]   8.00-9.00   sec  8.34 MBytes  69.9 Mbits/sec   19   50.9 KBytes
[  4]   9.00-10.00  sec  8.05 MBytes  67.5 Mbits/sec   21   35.4 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec  82.9 MBytes  69.5 Mbits/sec  217             sender
[  4]   0.00-10.00  sec  82.8 MBytes  69.4 Mbits/sec                  receiver

iperf Done.
[email protected]:~ $ iperf3 -c 192.168.1.4 -i 1 -R
Connecting to host 192.168.1.4, port 5201
Reverse mode, remote host 192.168.1.4 is sending
[  4] local 192.168.1.100 port 43760 connected to 192.168.1.4 port 5201
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec  10.8 MBytes  90.7 Mbits/sec
[  4]   1.00-2.00   sec  10.6 MBytes  89.0 Mbits/sec
[  4]   2.00-3.00   sec  10.9 MBytes  91.4 Mbits/sec
[  4]   3.00-4.00   sec  11.1 MBytes  93.0 Mbits/sec
[  4]   4.00-5.00   sec  11.2 MBytes  94.1 Mbits/sec
[  4]   5.00-6.00   sec  11.2 MBytes  94.1 Mbits/sec
[  4]   6.00-7.00   sec  11.2 MBytes  94.1 Mbits/sec
[  4]   7.00-8.00   sec  11.2 MBytes  94.1 Mbits/sec
[  4]   8.00-9.00   sec  11.2 MBytes  94.1 Mbits/sec
[  4]   9.00-10.00  sec  11.2 MBytes  94.1 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-10.00  sec   112 MBytes  93.7 Mbits/sec                  sender
[  4]   0.00-10.00  sec   112 MBytes  93.7 Mbits/sec                  receiver

iperf Done.
When raspberry is uploading to my mac; It encounters a speedloss and retries. But in the opposite direction it can reach 95mbit.

My raspberry pi is connected to Mikrotik RB2011. From it; It's connected to Ubnt 5Ghz wireless router and then my Mac. But I don't think that's the issue. Attached you can see that Mikrotik also notiated a full-duplex 1Gbps connection. I believe there is an issue with the kernel or some sort of configuration. That's not normal.
Attachments
GBPSLink.jpg
GBPSLink.jpg (164.87 KiB) Viewed 809 times

fruitoftheloom
Posts: 17248
Joined: Tue Mar 25, 2014 12:40 pm

Re: Network Speed Issues & Samba NAS

Fri Jun 22, 2018 1:39 pm

orcunbaslak wrote:
Fri Jun 22, 2018 1:29 pm
Here's me lsusb output.

Code: Select all

[email protected]:~ $ lsusb
Bus 001 Device 004: ID 2357:0601
Bus 001 Device 005: ID 0bc2:3312 Seagate RSS LLC SRD00F2 Expansion Desktop Drive (STBV)
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
[email protected]:~ $
...and here is ifconfig eth1 output.

Code: Select all

[email protected]:~ $ ifconfig eth1
eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.100  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::afc8:2462:829f:1f23  prefixlen 64  scopeid 0x20<link>
        ether 18:d6:c7:11:27:80  txqueuelen 1000  (Ethernet)
        RX packets 908020  bytes 599892651 (572.1 MiB)
        RX errors 0  dropped 3229  overruns 0  frame 0
        TX packets 415452  bytes 550936665 (525.4 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
But there is something I'd like you to pay attention. Here's the iperf3 output.

Code: Select all

[email protected]:~ $ iperf3 -c 192.168.1.4 -i 1
Connecting to host 192.168.1.4, port 5201
[  4] local 192.168.1.100 port 43756 connected to 192.168.1.4 port 5201
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-1.00   sec  8.49 MBytes  71.2 Mbits/sec   20   36.8 KBytes
[  4]   1.00-2.00   sec  8.12 MBytes  68.1 Mbits/sec   20   42.4 KBytes
[  4]   2.00-3.00   sec  8.40 MBytes  70.5 Mbits/sec   19   41.0 KBytes
[  4]   3.00-4.00   sec  8.22 MBytes  68.9 Mbits/sec   22   49.5 KBytes
[  4]   4.00-5.00   sec  8.32 MBytes  69.8 Mbits/sec   22   48.1 KBytes
[  4]   5.00-6.00   sec  8.40 MBytes  70.5 Mbits/sec   27   36.8 KBytes
[  4]   6.00-7.00   sec  8.42 MBytes  70.6 Mbits/sec   19   49.5 KBytes
[  4]   7.00-8.00   sec  8.14 MBytes  68.3 Mbits/sec   28   35.4 KBytes
[  4]   8.00-9.00   sec  8.34 MBytes  69.9 Mbits/sec   19   50.9 KBytes
[  4]   9.00-10.00  sec  8.05 MBytes  67.5 Mbits/sec   21   35.4 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec  82.9 MBytes  69.5 Mbits/sec  217             sender
[  4]   0.00-10.00  sec  82.8 MBytes  69.4 Mbits/sec                  receiver

iperf Done.
[email protected]:~ $ iperf3 -c 192.168.1.4 -i 1 -R
Connecting to host 192.168.1.4, port 5201
Reverse mode, remote host 192.168.1.4 is sending
[  4] local 192.168.1.100 port 43760 connected to 192.168.1.4 port 5201
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec  10.8 MBytes  90.7 Mbits/sec
[  4]   1.00-2.00   sec  10.6 MBytes  89.0 Mbits/sec
[  4]   2.00-3.00   sec  10.9 MBytes  91.4 Mbits/sec
[  4]   3.00-4.00   sec  11.1 MBytes  93.0 Mbits/sec
[  4]   4.00-5.00   sec  11.2 MBytes  94.1 Mbits/sec
[  4]   5.00-6.00   sec  11.2 MBytes  94.1 Mbits/sec
[  4]   6.00-7.00   sec  11.2 MBytes  94.1 Mbits/sec
[  4]   7.00-8.00   sec  11.2 MBytes  94.1 Mbits/sec
[  4]   8.00-9.00   sec  11.2 MBytes  94.1 Mbits/sec
[  4]   9.00-10.00  sec  11.2 MBytes  94.1 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-10.00  sec   112 MBytes  93.7 Mbits/sec                  sender
[  4]   0.00-10.00  sec   112 MBytes  93.7 Mbits/sec                  receiver

iperf Done.
When raspberry is uploading to my mac; It encounters a speedloss and retries. But in the opposite direction it can reach 95mbit.

My raspberry pi is connected to Mikrotik RB2011. From it; It's connected to Ubnt 5Ghz wireless router and then my Mac. But I don't think that's the issue. Attached you can see that Mikrotik also notiated a full-duplex 1Gbps connection. I believe there is an issue with the kernel or some sort of configuration. That's not normal.

The USB Ports and the Ethernet are connected to a LAN9514 Hub which is connected to a Single USB 2.0 BUS, so remove the USB Drive and test speed:

https://www.jeffgeerling.com/blogs/jeff ... networking
Adieu

orcunbaslak
Posts: 12
Joined: Wed Mar 29, 2017 8:41 pm

Re: Network Speed Issues & Samba NAS

Fri Jun 22, 2018 3:44 pm

Hello,

heres the output. Still the same.

lsusb

Code: Select all

[email protected]:~ $ lsusb
Bus 001 Device 004: ID 2357:0601
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
iperfs.

Code: Select all

[email protected]:~ $ iperf3 -c 192.168.1.4 -i 1
Connecting to host 192.168.1.4, port 5201
[  4] local 192.168.1.100 port 48804 connected to 192.168.1.4 port 5201
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-1.00   sec  8.51 MBytes  71.3 Mbits/sec   23   28.3 KBytes
[  4]   1.00-2.00   sec  8.25 MBytes  69.2 Mbits/sec   19   45.2 KBytes
[  4]   2.00-3.00   sec  8.34 MBytes  70.0 Mbits/sec   33   33.9 KBytes
[  4]   3.00-4.00   sec  8.11 MBytes  68.0 Mbits/sec   28   33.9 KBytes
[  4]   4.00-5.00   sec  8.23 MBytes  69.1 Mbits/sec   21   50.9 KBytes
[  4]   5.00-6.00   sec  8.32 MBytes  69.8 Mbits/sec   30   52.3 KBytes
[  4]   6.00-7.00   sec  7.66 MBytes  64.2 Mbits/sec   27   48.1 KBytes
[  4]   7.00-8.00   sec  7.96 MBytes  66.8 Mbits/sec   26   33.9 KBytes
[  4]   8.00-9.00   sec  8.07 MBytes  67.7 Mbits/sec   21   49.5 KBytes
[  4]   9.00-10.00  sec  8.28 MBytes  69.4 Mbits/sec   19   36.8 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec  81.7 MBytes  68.6 Mbits/sec  247             sender
[  4]   0.00-10.00  sec  81.6 MBytes  68.4 Mbits/sec                  receiver

iperf Done.
[email protected]:~ $ iperf3 -c 192.168.1.4 -i 1 -R
Connecting to host 192.168.1.4, port 5201
Reverse mode, remote host 192.168.1.4 is sending
[  4] local 192.168.1.100 port 48808 connected to 192.168.1.4 port 5201
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec  11.4 MBytes  95.2 Mbits/sec
[  4]   1.00-2.00   sec  11.2 MBytes  94.1 Mbits/sec
[  4]   2.00-3.00   sec  11.2 MBytes  94.1 Mbits/sec
[  4]   3.00-4.00   sec  11.2 MBytes  94.1 Mbits/sec
[  4]   4.00-5.00   sec  11.1 MBytes  93.1 Mbits/sec
[  4]   5.00-6.00   sec  11.2 MBytes  94.2 Mbits/sec
[  4]   6.00-7.00   sec  11.2 MBytes  94.0 Mbits/sec
[  4]   7.00-8.00   sec  11.2 MBytes  94.1 Mbits/sec
[  4]   8.00-9.00   sec  11.2 MBytes  94.2 Mbits/sec
[  4]   9.00-10.00  sec  11.2 MBytes  94.1 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-10.00  sec   113 MBytes  95.0 Mbits/sec                  sender
[  4]   0.00-10.00  sec   113 MBytes  94.6 Mbits/sec                  receiver

iperf Done.
Any other ideas?

fruitoftheloom
Posts: 17248
Joined: Tue Mar 25, 2014 12:40 pm

Re: Network Speed Issues & Samba NAS

Fri Jun 22, 2018 3:54 pm

orcunbaslak wrote:
Fri Jun 22, 2018 3:44 pm
Hello,

heres the output. Still the same.

lsusb

Code: Select all

[email protected]:~ $ lsusb
Bus 001 Device 004: ID 2357:0601
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
iperfs.

Code: Select all

[email protected]:~ $ iperf3 -c 192.168.1.4 -i 1
Connecting to host 192.168.1.4, port 5201
[  4] local 192.168.1.100 port 48804 connected to 192.168.1.4 port 5201
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-1.00   sec  8.51 MBytes  71.3 Mbits/sec   23   28.3 KBytes
[  4]   1.00-2.00   sec  8.25 MBytes  69.2 Mbits/sec   19   45.2 KBytes
[  4]   2.00-3.00   sec  8.34 MBytes  70.0 Mbits/sec   33   33.9 KBytes
[  4]   3.00-4.00   sec  8.11 MBytes  68.0 Mbits/sec   28   33.9 KBytes
[  4]   4.00-5.00   sec  8.23 MBytes  69.1 Mbits/sec   21   50.9 KBytes
[  4]   5.00-6.00   sec  8.32 MBytes  69.8 Mbits/sec   30   52.3 KBytes
[  4]   6.00-7.00   sec  7.66 MBytes  64.2 Mbits/sec   27   48.1 KBytes
[  4]   7.00-8.00   sec  7.96 MBytes  66.8 Mbits/sec   26   33.9 KBytes
[  4]   8.00-9.00   sec  8.07 MBytes  67.7 Mbits/sec   21   49.5 KBytes
[  4]   9.00-10.00  sec  8.28 MBytes  69.4 Mbits/sec   19   36.8 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec  81.7 MBytes  68.6 Mbits/sec  247             sender
[  4]   0.00-10.00  sec  81.6 MBytes  68.4 Mbits/sec                  receiver

iperf Done.
[email protected]:~ $ iperf3 -c 192.168.1.4 -i 1 -R
Connecting to host 192.168.1.4, port 5201
Reverse mode, remote host 192.168.1.4 is sending
[  4] local 192.168.1.100 port 48808 connected to 192.168.1.4 port 5201
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec  11.4 MBytes  95.2 Mbits/sec
[  4]   1.00-2.00   sec  11.2 MBytes  94.1 Mbits/sec
[  4]   2.00-3.00   sec  11.2 MBytes  94.1 Mbits/sec
[  4]   3.00-4.00   sec  11.2 MBytes  94.1 Mbits/sec
[  4]   4.00-5.00   sec  11.1 MBytes  93.1 Mbits/sec
[  4]   5.00-6.00   sec  11.2 MBytes  94.2 Mbits/sec
[  4]   6.00-7.00   sec  11.2 MBytes  94.0 Mbits/sec
[  4]   7.00-8.00   sec  11.2 MBytes  94.1 Mbits/sec
[  4]   8.00-9.00   sec  11.2 MBytes  94.2 Mbits/sec
[  4]   9.00-10.00  sec  11.2 MBytes  94.1 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-10.00  sec   113 MBytes  95.0 Mbits/sec                  sender
[  4]   0.00-10.00  sec   113 MBytes  94.6 Mbits/sec                  receiver

iperf Done.
Any other ideas?

https://www.pcsuggest.com/install-rtl8153-driver-linux/
Adieu

drgeoff
Posts: 8438
Joined: Wed Jan 25, 2012 6:39 pm

Re: Network Speed Issues & Samba NAS

Fri Jun 22, 2018 6:33 pm

There are known issues, being worked on but not yet solved, with the 3B+ ethernet. Set aside some time to have a slow, careful read of viewtopic.php?f=63&t=208512

epoch1970
Posts: 1925
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: Network Speed Issues & Samba NAS

Fri Jun 22, 2018 9:27 pm

drgeoff wrote:
Fri Jun 22, 2018 6:33 pm
There are known issues, being worked on but not yet solved, with the 3B+ ethernet. Set aside some time to have a slow, careful read of viewtopic.php?f=63&t=208512
This is not a 3B+, it's a giga USB adapter. (From TP-Link apparently...)
It looks like the OP is missing a mandatory network driver (the lsusb output is missing the network device itself).
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

orcunbaslak
Posts: 12
Joined: Wed Mar 29, 2017 8:41 pm

Re: Network Speed Issues & Samba NAS

Fri Jun 22, 2018 11:03 pm

Hello,

Thank you for the nice comment.

Code: Select all

[email protected]:/etc/modprobe.d $ sudo lshw -c network
  *-network:0
       description: Wireless interface
       physical id: 2
       logical name: wlan0
       serial: b8:27:eb:70:3f:7a
       capabilities: ethernet physical wireless
       configuration: broadcast=yes driver=brcmfmac driverversion=7.45.98.38 firmware=01-e58d219f multicast=yes wireless=IEEE 802.11
  *-network:1
       description: Ethernet interface
       physical id: 3
       logical name: eth1
       serial: 18:d6:c7:11:27:80
       size: 1Gbit/s
       capacity: 1Gbit/s
       capabilities: ethernet physical mii 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8152 driverversion=v2.10.00 (2018/03/16) duplex=full ip=192.168.1.100 link=yes multicast=yes port=MII speed=1Gbit/s
  *-network:2
       description: Ethernet interface
       physical id: 4
       logical name: eth0
       serial: b8:27:eb:25:6a:2f
       size: 10Mbit/s
       capacity: 100Mbit/s
       capabilities: ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=smsc95xx driverversion=22-Aug-2005 duplex=half firmware=smsc95xx USB 2.0 Ethernet link=no multicast=yes port=MII speed=10Mbit/s
I've successfully compiled and installed the driver. The driver has been loaded in kernel and working.

However the issue continues.

Code: Select all

[email protected]:/etc/modprobe.d $ iperf3 -c 192.168.1.4 -i 1
Connecting to host 192.168.1.4, port 5201
[  4] local 192.168.1.100 port 41696 connected to 192.168.1.4 port 5201
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-1.00   sec  8.16 MBytes  68.4 Mbits/sec   36   48.1 KBytes
[  4]   1.00-2.00   sec  7.88 MBytes  66.1 Mbits/sec   24   48.1 KBytes
[  4]   2.00-3.00   sec  7.93 MBytes  66.5 Mbits/sec   30   35.4 KBytes
[  4]   3.00-4.00   sec  7.56 MBytes  63.4 Mbits/sec   26   35.4 KBytes
[  4]   4.00-5.00   sec  8.42 MBytes  70.6 Mbits/sec   23   36.8 KBytes
[  4]   5.00-6.00   sec  8.05 MBytes  67.5 Mbits/sec   27   42.4 KBytes
[  4]   6.00-7.00   sec  7.97 MBytes  66.9 Mbits/sec   26   41.0 KBytes
[  4]   7.00-8.00   sec  7.93 MBytes  66.5 Mbits/sec   17   39.6 KBytes
[  4]   8.00-9.00   sec  8.25 MBytes  69.2 Mbits/sec   24   33.9 KBytes
[  4]   9.00-10.00  sec  7.82 MBytes  65.6 Mbits/sec   18   35.4 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec  80.0 MBytes  67.1 Mbits/sec  251             sender
[  4]   0.00-10.00  sec  79.8 MBytes  66.9 Mbits/sec                  receiver

iperf Done.
[email protected]:/etc/modprobe.d $ iperf3 -c 192.168.1.4 -i 1 -R
Connecting to host 192.168.1.4, port 5201
Reverse mode, remote host 192.168.1.4 is sending
[  4] local 192.168.1.100 port 41700 connected to 192.168.1.4 port 5201
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec  11.4 MBytes  95.3 Mbits/sec
[  4]   1.00-2.00   sec  11.2 MBytes  94.1 Mbits/sec
[  4]   2.00-3.00   sec  11.2 MBytes  94.1 Mbits/sec
[  4]   3.00-4.00   sec  11.2 MBytes  94.1 Mbits/sec
[  4]   4.00-5.00   sec  11.2 MBytes  94.2 Mbits/sec
[  4]   5.00-6.00   sec  11.2 MBytes  94.1 Mbits/sec
[  4]   6.00-7.00   sec  11.2 MBytes  94.1 Mbits/sec
[  4]   7.00-8.00   sec  11.2 MBytes  94.1 Mbits/sec
[  4]   8.00-9.00   sec  11.2 MBytes  94.1 Mbits/sec
[  4]   9.00-10.00  sec  11.2 MBytes  94.1 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-10.00  sec   113 MBytes  95.1 Mbits/sec                  sender
[  4]   0.00-10.00  sec   113 MBytes  95.1 Mbits/sec                  receiver

iperf Done.

orcunbaslak
Posts: 12
Joined: Wed Mar 29, 2017 8:41 pm

Re: Network Speed Issues & Samba NAS

Sun Jun 24, 2018 7:53 am

Here's an update. I tought maybe there is an issue with the OS itself and switched to Ubuntu Classic Server for Pi 3 16.04

Here's the uname

Code: Select all

[email protected]:~$ uname -a
Linux ubuntu 4.4.0-1086-raspi2 #94-Ubuntu SMP Wed Mar 14 09:29:41 UTC 2018 armv7l armv7l armv7l GNU/Linux
I first connected the 100Mbit ethernet adapter. All is working as intended.

Code: Select all

[email protected]:~$ iperf3 -c 192.168.1.4 -i 1
Connecting to host 192.168.1.4, port 5201
[  4] local 192.168.1.236 port 38220 connected to 192.168.1.4 port 5201
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-1.00   sec  11.1 MBytes  93.4 Mbits/sec    0    103 KBytes
[  4]   1.00-2.00   sec  11.2 MBytes  93.7 Mbits/sec    0    109 KBytes
[  4]   2.00-3.00   sec  11.2 MBytes  94.2 Mbits/sec    0    109 KBytes
[  4]   3.00-4.00   sec  11.2 MBytes  94.2 Mbits/sec    0    109 KBytes
[  4]   4.00-5.00   sec  11.2 MBytes  93.9 Mbits/sec    0    109 KBytes
[  4]   5.00-6.00   sec  11.3 MBytes  94.5 Mbits/sec    0    119 KBytes
[  4]   6.00-7.00   sec  11.2 MBytes  94.3 Mbits/sec    0    119 KBytes
[  4]   7.00-8.00   sec  11.3 MBytes  95.1 Mbits/sec    0    189 KBytes
[  4]   8.00-9.00   sec  11.2 MBytes  93.9 Mbits/sec    0    189 KBytes
[  4]   9.00-10.00  sec  11.1 MBytes  93.5 Mbits/sec    0    189 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec   112 MBytes  94.1 Mbits/sec    0             sender
[  4]   0.00-10.00  sec   112 MBytes  93.9 Mbits/sec                  receiver

iperf Done.
[email protected]:~$ iperf3 -c 192.168.1.4 -i 1 -R
Connecting to host 192.168.1.4, port 5201
Reverse mode, remote host 192.168.1.4 is sending
[  4] local 192.168.1.236 port 38224 connected to 192.168.1.4 port 5201
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec  11.3 MBytes  94.9 Mbits/sec
[  4]   1.00-2.00   sec  11.2 MBytes  94.1 Mbits/sec
[  4]   2.00-3.00   sec  11.2 MBytes  94.1 Mbits/sec
[  4]   3.00-4.00   sec  11.2 MBytes  94.1 Mbits/sec
[  4]   4.00-5.00   sec  11.2 MBytes  94.1 Mbits/sec
[  4]   5.00-6.00   sec  11.2 MBytes  94.1 Mbits/sec
[  4]   6.00-7.00   sec  11.2 MBytes  94.1 Mbits/sec
[  4]   7.00-8.00   sec  11.2 MBytes  94.1 Mbits/sec
[  4]   8.00-9.00   sec  11.2 MBytes  94.1 Mbits/sec
[  4]   9.00-10.00  sec  11.2 MBytes  94.1 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-10.00  sec   113 MBytes  95.0 Mbits/sec                  sender
[  4]   0.00-10.00  sec   113 MBytes  95.0 Mbits/sec                  receiver

iperf Done.
at this point 1000mbit ethernet card cannot be accessed due to driver issue I guess. I will post here once I'm done with the tests on gigabit port.

orcunbaslak
Posts: 12
Joined: Wed Mar 29, 2017 8:41 pm

Re: Network Speed Issues & Samba NAS

Sun Jun 24, 2018 8:26 am

Ok so while thinkin that the issue is with kernel or something; I found out that original 100mbps network adapter works perfectly on both linuxes (rasbian and ubuntu server).

Here's the output from original 100mbps ethernet driver.

Code: Select all

[email protected]:~ $ iperf3 -c 192.168.1.4 -i 1
Connecting to host 192.168.1.4, port 5201
[  4] local 192.168.1.101 port 34732 connected to 192.168.1.4 port 5201
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-1.00   sec  11.4 MBytes  95.2 Mbits/sec    0    115 KBytes
[  4]   1.00-2.00   sec  11.3 MBytes  94.4 Mbits/sec    0    127 KBytes
[  4]   2.00-3.00   sec  11.2 MBytes  94.2 Mbits/sec    0    127 KBytes
[  4]   3.00-4.00   sec  11.2 MBytes  94.3 Mbits/sec    0    134 KBytes
[  4]   4.00-5.00   sec  11.2 MBytes  94.1 Mbits/sec    0    134 KBytes
[  4]   5.00-6.00   sec  11.2 MBytes  93.8 Mbits/sec    0    158 KBytes
[  4]   6.00-7.00   sec  11.3 MBytes  94.4 Mbits/sec    0    158 KBytes
[  4]   7.00-8.00   sec  11.4 MBytes  95.6 Mbits/sec    0    250 KBytes
[  4]   8.00-9.00   sec  11.2 MBytes  94.2 Mbits/sec    0    250 KBytes
[  4]   9.00-10.00  sec  11.2 MBytes  94.1 Mbits/sec    0    250 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec   113 MBytes  94.4 Mbits/sec    0             sender
[  4]   0.00-10.00  sec   112 MBytes  94.1 Mbits/sec                  receiver

iperf Done.
[email protected]:~ $ iperf3 -c 192.168.1.4 -i 1 -R
Connecting to host 192.168.1.4, port 5201
Reverse mode, remote host 192.168.1.4 is sending
[  4] local 192.168.1.101 port 34736 connected to 192.168.1.4 port 5201
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec  11.3 MBytes  94.8 Mbits/sec
[  4]   1.00-2.00   sec  11.2 MBytes  94.1 Mbits/sec
[  4]   2.00-3.00   sec  11.2 MBytes  94.1 Mbits/sec
[  4]   3.00-4.00   sec  11.2 MBytes  94.1 Mbits/sec
[  4]   4.00-5.00   sec  11.2 MBytes  94.1 Mbits/sec
[  4]   5.00-6.00   sec  11.2 MBytes  94.1 Mbits/sec
[  4]   6.00-7.00   sec  11.2 MBytes  94.1 Mbits/sec
[  4]   7.00-8.00   sec  11.2 MBytes  94.1 Mbits/sec
[  4]   8.00-9.00   sec  11.2 MBytes  94.1 Mbits/sec
[  4]   9.00-10.00  sec  11.2 MBytes  94.1 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-10.00  sec   113 MBytes  95.0 Mbits/sec                  sender
[  4]   0.00-10.00  sec   113 MBytes  95.0 Mbits/sec                  receiver

iperf Done.
and here is the output from USB3.0 Gbit ethernet driver.

Code: Select all

[email protected]:~ $ iperf3 -c 192.168.1.4 -i 1
Connecting to host 192.168.1.4, port 5201
[  4] local 192.168.1.100 port 33230 connected to 192.168.1.4 port 5201
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-1.00   sec  8.26 MBytes  69.3 Mbits/sec   27   41.0 KBytes
[  4]   1.00-2.00   sec  8.34 MBytes  70.0 Mbits/sec   24   41.0 KBytes
[  4]   2.00-3.00   sec  8.13 MBytes  68.2 Mbits/sec   27   35.4 KBytes
[  4]   3.00-4.00   sec  8.16 MBytes  68.4 Mbits/sec   19   48.1 KBytes
[  4]   4.00-5.00   sec  8.37 MBytes  70.2 Mbits/sec   36   38.2 KBytes
[  4]   5.00-6.00   sec  7.70 MBytes  64.6 Mbits/sec   21   35.4 KBytes
[  4]   6.00-7.00   sec  8.07 MBytes  67.7 Mbits/sec   24   42.4 KBytes
[  4]   7.00-8.00   sec  8.22 MBytes  68.9 Mbits/sec   21   32.5 KBytes
[  4]   8.00-9.00   sec  7.87 MBytes  66.0 Mbits/sec   22   33.9 KBytes
[  4]   9.00-10.00  sec  7.84 MBytes  65.7 Mbits/sec   22   48.1 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec  80.9 MBytes  67.9 Mbits/sec  243             sender
[  4]   0.00-10.00  sec  80.8 MBytes  67.8 Mbits/sec                  receiver

iperf Done.
[email protected]:~ $ iperf3 -c 192.168.1.4 -i 1 -R
Connecting to host 192.168.1.4, port 5201
Reverse mode, remote host 192.168.1.4 is sending
[  4] local 192.168.1.100 port 33234 connected to 192.168.1.4 port 5201
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec  11.4 MBytes  95.2 Mbits/sec
[  4]   1.00-2.00   sec  11.2 MBytes  94.1 Mbits/sec
[  4]   2.00-3.00   sec  11.2 MBytes  94.1 Mbits/sec
[  4]   3.00-4.00   sec  11.2 MBytes  94.1 Mbits/sec
[  4]   4.00-5.00   sec  11.2 MBytes  94.1 Mbits/sec
[  4]   5.00-6.00   sec  11.2 MBytes  94.1 Mbits/sec
[  4]   6.00-7.00   sec  11.2 MBytes  94.1 Mbits/sec
[  4]   7.00-8.00   sec  11.2 MBytes  94.1 Mbits/sec
[  4]   8.00-9.00   sec  11.2 MBytes  94.1 Mbits/sec
[  4]   9.00-10.00  sec  11.2 MBytes  94.1 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-10.00  sec   113 MBytes  95.1 Mbits/sec                  sender
[  4]   0.00-10.00  sec   113 MBytes  95.1 Mbits/sec                  receiver

iperf Done.
This now makes me think that the issue is with the ethernet driver (Well, I installed a new driver from https://www.pcsuggest.com/install-rtl8153-driver-linux/ and still the same) or hardware.

I will test the hardware on a different computer to see what comes up next.

Meanwhile any suggestions?

orcunbaslak
Posts: 12
Joined: Wed Mar 29, 2017 8:41 pm

Re: Network Speed Issues & Samba NAS

Mon Jul 16, 2018 6:33 pm

Well, I managed to compile and install driver properly (had issues with linux-kernel download).

Code: Select all

[email protected]:~ $ lsusb -t
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc_otg/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/5p, 480M
        |__ Port 1: Dev 3, If 0, Class=Vendor Specific Class, Driver=smsc95xx, 480M
        |__ Port 2: Dev 5, If 0, Class=Mass Storage, Driver=usb-storage, 480M
        |__ Port 4: Dev 4, If 0, Class=Vendor Specific Class, Driver=r8152, 480M
Now I have correct driver loaded (Driver=r8152).

However the issue is still the same. I believe the problem is a hardware problem but there are no other machines to test the device around.

Suggestions?

ejolson
Posts: 1831
Joined: Tue Mar 18, 2014 11:47 am

Re: Network Speed Issues & Samba NAS

Mon Jul 16, 2018 7:23 pm

orcunbaslak wrote:
Mon Jul 16, 2018 6:33 pm
Suggestions?
Use the built-in 100 Mbit Ethernet or force the gigabit dongle to use 100 Mbit mode. The theoretical 3x speed gain with gigabit connected through USB2 requires working flow control and doesn't happen when simultaneously using USB storage anyway.

orcunbaslak
Posts: 12
Joined: Wed Mar 29, 2017 8:41 pm

Re: Network Speed Issues & Samba NAS

Mon Jul 16, 2018 7:32 pm

ejolson wrote:
Mon Jul 16, 2018 7:23 pm
orcunbaslak wrote:
Mon Jul 16, 2018 6:33 pm
Suggestions?
Use the built-in 100 Mbit Ethernet or force the gigabit dongle to use 100 Mbit mode. The theoretical 3x speed gain with gigabit connected through USB2 requires working flow control and doesn't happen when simultaneously using USB storage anyway.
I see your point but the issue is Gigabit ethernet adapter is actually slower than built-in eth0. My testing environment is USB Harddisk disconnected, eth0 is down.

As you can check from the above posts; iperf3 reaches around 70-80mbit in one direction (with lots of retries) and 95mbit in the opposite direction (with no retries).

It's like the device is limited to 100mbit.

epoch1970
Posts: 1925
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: Network Speed Issues & Samba NAS

Mon Jul 16, 2018 8:03 pm

orcunbaslak wrote:
Sun Jun 24, 2018 8:26 am
and here is the output from USB3.0 Gbit ethernet driver.

Code: Select all

[email protected]:~ $ iperf3 -c 192.168.1.4 -i 1
Connecting to host 192.168.1.4, port 5201
[  4] local 192.168.1.100 port 33230 connected to 192.168.1.4 port 5201
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-1.00   sec  8.26 MBytes  69.3 Mbits/sec   27   41.0 KBytes
Huge amount of retries and small congestion window... Can you try turning TCP segmentation offloading off? ("ethtool -k <interface>" and "ethtool -K tso off", "ethtool -K gso off"). Or perhaps that module has an option related to some TCP quirk?
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

ejolson
Posts: 1831
Joined: Tue Mar 18, 2014 11:47 am

Re: Network Speed Issues & Samba NAS

Mon Jul 16, 2018 8:24 pm

orcunbaslak wrote:
Mon Jul 16, 2018 7:32 pm
It's like the device is limited to 100mbit.
Without working flow control the remote device sends packets at gigabit speeds. More than half of the received packets are dropped since USB2 doesn't have enough bandwidth. This results in timeouts, retransmits and a resulting speed much less than the theoretical maximum.

Since you plan to add USB storage, even if flow control was working, it wouldn't be much faster than 100 Mbit in the end.

Alternatively, is it possible that you have a marginal Ethernet cable?

orcunbaslak
Posts: 12
Joined: Wed Mar 29, 2017 8:41 pm

Re: Network Speed Issues & Samba NAS

Mon Jul 16, 2018 9:06 pm

epoch1970 wrote:
Mon Jul 16, 2018 8:03 pm
Huge amount of retries and small congestion window... Can you try turning TCP segmentation offloading off? ("ethtool -k <interface>" and "ethtool -K tso off", "ethtool -K gso off"). Or perhaps that module has an option related to some TCP quirk?
Hello,

tried that as well..

Code: Select all

[email protected]:~ $ ethtool -k eth1 | grep offload
Cannot get device udp-fragmentation-offload settings: Operation not permitted
tcp-segmentation-offload: off
udp-fragmentation-offload: off
generic-segmentation-offload: off
generic-receive-offload: on
large-receive-offload: off [fixed]
rx-vlan-offload: on
tx-vlan-offload: on
l2-fwd-offload: off [fixed]
hw-tc-offload: off [fixed]
esp-hw-offload: off [fixed]
esp-tx-csum-hw-offload: off [fixed]
rx-udp_tunnel-port-offload: off [fixed]
[email protected]:~ $
still the same...

Code: Select all

[email protected]:~ $ iperf3 -c 192.168.1.4
Connecting to host 192.168.1.4, port 5201
[  4] local 192.168.1.101 port 55642 connected to 192.168.1.4 port 5201
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-1.00   sec  9.39 MBytes  78.8 Mbits/sec   24   38.2 KBytes

Return to “Networking and servers”

Who is online

Users browsing this forum: No registered users and 6 guests