Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 22

Thread: Is Samba read/write rate performance on Ubuntu 20.04 capped at around 11MB/s?

  1. #11
    Join Date
    Mar 2007
    Beans
    969

    Re: Is Samba read/write rate performance on Ubuntu 20.04 capped at around 11MB/s?

    Since this is a SAMBA problem you might want to try the Samba mailing list. The SAMBA devs visit there and there are a number of people intimately familiar with what it does.

  2. #12
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Is Samba read/write rate performance on Ubuntu 20.04 capped at around 11MB/s?

    Could be a network config issue if you have both NICs enabled. The routing table might be messed up.

    The UDP numbers are worse than the TCP ones! 2.25 Mbps is terrible!
    Could the client be over wifi with 3 cement walls in the way?

    9.00 MBytes/sec seems like a 100 base-tx NIC is being used.

    Code:
    $ iperf3 -V -b 1Gbps  –length 1000 -c hadar
    iperf 3.7
    Linux regulus 5.4.0-72-generic #80-Ubuntu SMP Mon Apr 12 17:35:00 UTC 2021 x86_64
    Control connection MSS 1448
    Time: Thu, 29 Apr 2021 16:43:44 GMT
    Connecting to host hadar, port 5201
          Cookie: gwx4qjrqqlcslresbrway3cbixlczcycrnwx
          TCP MSS: 1448 (default)
          Target Bitrate: 1000000000
    [  5] local 172.22.22.3 port 60930 connected to 172.22.22.6 port 5201
    Starting Test: protocol: TCP, 1 streams, 131072 byte blocks, omitting 0 seconds, 10 second test, tos 0
    [ ID] Interval           Transfer     Bitrate         Retr  Cwnd
    [  5]   0.00-1.00   sec   119 MBytes   999 Mbits/sec    0    130 KBytes       
    [  5]   1.00-2.00   sec   119 MBytes  1.00 Gbits/sec    0    168 KBytes       
    [  5]   2.00-3.00   sec   119 MBytes  1.00 Gbits/sec    0    239 KBytes       
    [  5]   3.00-4.00   sec   119 MBytes  1.00 Gbits/sec    0    264 KBytes       
    [  5]   4.00-5.00   sec   119 MBytes   999 Mbits/sec    0    264 KBytes
    Your samba config seems extremely complex. Mine is all defaults, except I force a different workgroup and set
    Code:
    min protocol = SMB2
    server signing = mandatory
    In the "homes" share,
    Code:
    [homes]
      comment = Home Directories
      hosts allow = 127.0.0.1 172.22.22.0/24 
      hosts deny = 0.0.0.0/0
      browseable = yes
      guest ok = no
      writable = yes
      create mask = 0640
      directory mask = 0750
      valid users = %S
    That's it. 65-75 MB/s from Windows.

    As I said, it is something about your setup.
    Morphus posts about Samba in these forums. For Win10 clients: https://ubuntuforums.org/showthread.php?t=2434383

    Samba changed some defaults with 20.04, then Microsoft changed their defaults on Win10. Both these changes happened fairly quickly and broke connections for many people - mainly those with older SMB1 devices which had zero security.

    If all your clients are Win10, use
    Code:
    min protocol = SMB3
    server signing = mandatory
    for better performance and better security in the global smb.conf section.

    I should be clear about my iperf3 run. That's a VM on the same host talking with the host directly.
    Code:
    $ iperf3 -c hadar
    Connecting to host hadar, port 5201
    [  5] local 172.22.22.3 port 60946 connected to 172.22.22.6 port 5201
    [ ID] Interval           Transfer     Bitrate         Retr  Cwnd
    [  5]   0.00-1.00   sec  3.07 GBytes  26.3 Gbits/sec    0   2.25 MBytes       
    [  5]   1.00-2.00   sec  2.97 GBytes  25.5 Gbits/sec    0   2.39 MBytes       
    [  5]   2.00-3.00   sec  2.84 GBytes  24.4 Gbits/sec    0   2.52 MBytes
    From separate physical machines, I only see
    $ iperf3 -c hadar
    Connecting to host hadar, port 5201
    [ 4] local 172.22.22.4 port 50076 connected to 172.22.22.6 port 5201
    [ ID] Interval Transfer Bandwidth Retr Cwnd
    [ 4] 0.00-1.00 sec 114 MBytes 954 Mbits/sec 0 376 KBytes
    [ 4] 1.00-2.00 sec 112 MBytes 942 Mbits/sec 0 376 KBytes
    and one of xfers had 35 retries. I reran it with your setup and it was still 932+ Mbps.

    To see issues with the routing table:
    Code:
    route -n
    or
    Code:
    ip route | column -t
    Last edited by TheFu; 1 Week Ago at 06:05 PM.

  3. #13
    Join Date
    Nov 2007
    Location
    London, England
    Beans
    7,220
    Distro
    Xubuntu 20.04 Focal Fossa

    Re: Is Samba read/write rate performance on Ubuntu 20.04 capped at around 11MB/s?

    It may be worth running the command
    Code:
    ip link -s -s
    and see if there are any errors.

  4. #14
    Join Date
    Jun 2018
    Beans
    160

    Re: Is Samba read/write rate performance on Ubuntu 20.04 capped at around 11MB/s?

    What type of storage is used on your Linux system? If it is encrypted, how? Have you verified that your Linux system actually has a gigabit connection to the (I assume) router? Even if a cable is rated for gigabit, cheap (or really long) ones will not allow more than 100M. Maybe try with a cable you know will allow gigabit bandwidth.
    Have a ubuntastic day!

  5. #15
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Is Samba read/write rate performance on Ubuntu 20.04 capped at around 11MB/s?

    On 20.04, I just setup a samba server.
    Code:
    sudo apt install samba
    sudo ufw allow  samba
    Added a local samba user using smbpasswd
    Code:
    sudo smbpasswd -L -a thefu
    Edited the smb.conf file:
    sudoedit /etc/samba/smb.conf

    Left everything as default, except ...
    Code:
    [global]
       workgroup = MyWorkGroupNameNotYours
    ...
       client min protocol = SMB2
       min protocol = SMB2
       server signing = mandatory
    
    [homes]
       comment = Home Directories
       hosts allow = 127.0.0.1 172.22.22.0/24
       hosts deny = 0.0.0.0/0
       browseable = yes
       guest ok = no
       writable = yes
       create mask = 0640
       directory mask = 0750
       valid users = %S
    Restart samba.
    Code:
    sudo service smbd restart
    Changed to Windows. In the URL textentry field, put in \\regulus\thefu <enter>
    was prompted to enter a username and password. Filled those in. My network has a DNS server, so regulus lookup is automatic. Use the IP if that doesn't work on your network.

    Then searched for files to to copy - larger sized files will have less overhead - found some home movies and copied about 2GB of files. Saw 50-54 MB/sec. That's 400 Mbps ... the target storage is an SSD with ext4 on LVM. Tests to a WD-Blue HDD showed the same throughput.

    That's the total effort involved. Nothing else. I checked my command history. If that doesn't work for you, I don't know. Maybe purge samba and start over with an empty /etc/samba/?

  6. #16
    Join Date
    Apr 2014
    Beans
    736

    Re: Is Samba read/write rate performance on Ubuntu 20.04 capped at around 11MB/s?

    I know people love to do custom configs and stuff and I'm sure they do make a difference. I find minimal changes to stock unless absolutely necessary. That being said have you tried an unmodified as installed smb.conf with only the minimum required for your shares? I was getting 90MBs to my server when it was in my house over ethernet. Now across the yard via wireless bridge it maxes transfer speed at around 50-60MBs. Still well ahead of yours. My config is as stock as it gets save for adding my specific snapraid pool share. The only files that really take long enough to get a read are 1-2 gig ripped dvd mkvs.

    *EDIT* Sorry. TheFu beat me to it.

    *EDIT 2* Just had an idea. I know you ran a command to show the interfaces and tried a different cable. Post the output of

    Code:
    sudo ethtool "$INTERFACE" | grep Speed
    That should tell you the current negotiated speed. 11MBs is about the max on a 10/100 line so I can't help but wonder about that. Theoretically the rj45 port could be bad and even though it reads the chip as a gigabit nic it only negotiates at 10/100.

    It's a reach I suppose. I did spend about 20 minutes chasing down a problem with my headphones today only to discover that I had plugged the 3.5 mic plug into the ear plug and vice versa. They were fine the whole time. In your case, maybe you are looking at the wrong light?
    Last edited by Tadaen_Sylvermane; 1 Week Ago at 04:03 AM.

  7. #17
    Join Date
    Dec 2009
    Beans
    6,516

    Re: Is Samba read/write rate performance on Ubuntu 20.04 capped at around 11MB/s?

    Quote Originally Posted by Tadaen_Sylvermane View Post
    I know people love to do custom configs and stuff and I'm sure they do make a difference. I find minimal changes to stock unless absolutely necessary.
    Yep, I'm right there with you. Especially in this case since had the OP run testparm on his smb.conf he would have received an unusually long warning:
    WARNING: The "allocation roundup size" option is deprecated
    Loaded services file OK.
    WARNING: socket options = TCP_NODELAY SO_RCVBUF=131072 SO_SNDBUF=131072 SO_KEEPALIVE IPTOS_THROUGHPUT
    This warning is printed because you set one of the
    following options: SO_SNDBUF, SO_RCVBUF, SO_SNDLOWAT,
    SO_RCVLOWAT
    Modern server operating systems are tuned for
    high network performance in the majority of situations;
    when you set 'socket options' you are overriding those
    settings.
    Linux in particular has an auto-tuning mechanism for
    buffer sizes (SO_SNDBUF, SO_RCVBUF) that will be
    disabled if you specify a socket buffer size. This can
    potentially cripple your TCP/IP stack.

    Getting the 'socket options' correct can make a big
    difference to your performance, but getting them wrong
    can degrade it by just as much. As with any other low
    level setting, if you must make changes to it, make
    small changes and test the effect before making any
    large changes.
    I'm not very good at this aspect of samba since it's never been a problem - at least not to the extent detailed here. About the only time I did do something was for one particular user in which I had him add the following:
    Code:
    socket options = IPTOS_LOWDELAY TCP_NODELAY
    And only because the samba documentation suggested it.

    It made a difference but nothin' to write home about.

  8. #18
    Join Date
    May 2005
    Beans
    141
    Distro
    Ubuntu 20.04 Focal Fossa

    Lightbulb Re: Is Samba read/write rate performance on Ubuntu 20.04 capped at around 11MB/s?

    Some good suggestions on what to look at for sure. I took TheFU's minimal conf suggestion and surprisingly it made no apparent difference in performance. Which is a big indication that the conf settings I was experimenting with are unnecessary. It looks like I didn't mention that the shared folder drives on the SAMBA server are actually encrypted. I guess I should expect that to impact performance to some degree. However, the shared folder on the Windows 10 server is encrypted also, and writing to that folder from a remote client still gets about 100 MBytes/sec. I'm going to try to mount another unencrypted disk to see if there's a bit of an impact. I should have thought of that earlier.

    some of the suggested network analysis:
    Code:
    sudo ethtool enp7s0 | grep Speed
    	Speed: 1000Mb/s
    network config: I am only using one ethernet port, enp7s0
    Code:
    ifconfig
    enp6s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
            ether ...  txqueuelen 1000  (Ethernet)
            RX packets 0  bytes 0 (0.0 B)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 0  bytes 0 (0.0 B)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
            device memory 0xfa300000-fa37ffff  
    
    enp7s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
            inet 10.1.10.20  netmask 255.255.0.0  broadcast 10.1.255.255
            ...  prefixlen 64  scopeid 0x20<link>
            ether ...  txqueuelen 1000  (Ethernet)
            RX packets 53723907  bytes 77409275233 (77.4 GB)
            RX errors 0  dropped 806  overruns 728  frame 0
            TX packets 20634883  bytes 18238685671 (18.2 GB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
            device memory 0xfa200000-fa27ffff
    All of the Windows, MacOS, and Linux SAMBA serves are going through the same netgear gs108 gigabit switch that is up-linked to an orbi router extension to a verizon router.
    Code:
    route -n
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    0.0.0.0         10.1.10.1       0.0.0.0         UG    100    0        0 enp7s0
    10.1.0.0        0.0.0.0         255.255.0.0     U     100    0        0 enp7s0
    10.1.0.0        0.0.0.0         255.255.0.0     U     100    0        0 enp7s0
    169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 enp7s0
    Last edited by mike4ubuntu; 1 Week Ago at 05:29 PM.

  9. #19
    Join Date
    Jun 2018
    Beans
    160

    Re: Is Samba read/write rate performance on Ubuntu 20.04 capped at around 11MB/s?

    If you are using a managed router, try to enter the settings of the router and see if the link speed for the slow performing system is as it should be. On my NETGEAR router, the information is located under "Advanced -> Internet Port -> Show Statistics" and reads "1000M/Full" under "Status" for devices with gigabit connection.
    Have a ubuntastic day!

  10. #20
    Join Date
    May 2005
    Beans
    141
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Is Samba read/write rate performance on Ubuntu 20.04 capped at around 11MB/s?

    Quote Originally Posted by dinkidonk View Post
    If you are using a managed router, try to enter the settings of the router and see if the link speed for the slow performing system is as it should be. On my NETGEAR router, the information is located under "Advanced -> Internet Port -> Show Statistics" and reads "1000M/Full" under "Status" for devices with gigabit connection.
    no, The GS 108 is just an unmanaged 8-port switch. There are no settings like that. The LEDs indicate that all of the servers connected to it are connected at 1Gbps. Again, the MacOS and the Win10 serves seem to communicate with each other at 1Gbps (100MBps), but the LINUX servers are slow. I thought it was just SAMBA, but now I believe it's probably the ethernet connection. The disks are encrypted with LUKS, which may be contributing to it, but I haven't mounted an unencrypted disk to test that yet.

Page 2 of 3 FirstFirst 123 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •