Page 4 of 4 FirstFirst ... 234
Results 31 to 38 of 38

Thread: Slow Samba performance on Ubuntu 10.10

  1. #31
    Join Date
    Sep 2009
    Location
    Norway
    Beans
    46
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: Slow Samba performance on Ubuntu 10.10

    Quote Originally Posted by ottsm View Post
    SO_RCVBUF=8192 SO_SNDBUF=8192
    socket options = TCP_NODELAY
    Enabling this code in Samba also works for my Ubuntu 10.10-64 server. I get close to 1000Mbit, but after a few seconds speed gets slower (770M file). I think this is caused by a relatively slow HDD that do not handle the speed. Changing above values from 8192 to 16384 seems to give me top speed a bit longer.
    Thanks for tip !

  2. #32
    Join Date
    Apr 2011
    Beans
    4

    Re: Slow Samba performance on Ubuntu 10.10

    have same issue non of the tweak helps. any idea i am stuck right now. i am learning Linux but facing error of those type may make my concept worst

  3. #33
    Join Date
    Oct 2008
    Location
    Cambridge, UK
    Beans
    223

    Lightbulb Re: Slow Samba performance on Ubuntu 10.10

    Quote Originally Posted by sirtcp View Post
    have same issue non of the tweak helps. any idea i am stuck right now. i am learning Linux but facing error of those type may make my concept worst
    Hmmm, yes how's about something that actually works!

    I can stream stutter-free 1080p video and get 30 Mbyte/sec transfer rates (over Gb ethernet - with a switch that doesn't support Jumbo frames) Ubuntu 10.10 <-> 10.10. NB server machine has an updated 2.6.38 kernel (from a ppa - not sure if this is necessary). The transfer ~6Gb test file was read from an NTFS partition (using the latest NTFS-3G driver compiled from source). Using the smb: networking protocol (in XBMC) glitches constantly with even SD content streaming - requiring a lengthy re-buffering process (~5 seconds).

    I am using mount.cifs to create local mounts of Samba shares and not the smb: mechanism which is decidedly flaky at the best of times. For ultra reliability I would recommend the use of a static IP address for your Samba server machine(s) (most routers can be setup to assign these by MAC address of your machines/devices). Large read/ write buffers are specified for the remote Samba shares to be mounted.

    On your server machine(s) type:
    Code:
    gksu gedit /etc/modprobe.d/modprobe.conf
    or for Kubuntu users:
    Code:
    kdesudo kate /etc/modprobe.d/modprobe.conf
    Add this one line to the (hopefully/normally empty) file:
    Code:
    options cifs CIFSMaxBufSize=130048


    A BASH script for mounting remote shares (assumes you are authenticating by user and guest user access is allowed):
    Code:
    #!/bin/bash
    
    for cifs_share in "**SHARE NAME 1**" "**SHARE NAME 2**"
    do
            sudo mkdir "/mnt/${cifs_share}/"
            sudo mount.cifs "//192.168.1.1/${cifs_share}/" "/mnt/${cifs_share}/" --verbose -o user='guest',password='',domain='WORKGROUP',ro,exec,noperm,uid=**UNIX USERNAME @CLIENT MACHINE**,gid=**UNIX GROUPNAME @CLIENT MACHINE**,rsize=130048,wsize=130048,directio
    done
    Ok so I won't win any awards for my BASH scripting skills! Replace the **...** items with something sensible. I put my mounts in /mnt/ - to stop them getting messed up with Ubuntu removable media mounts. The script will ask for your root user password when starting.

    If you want read/write user access to the shares put in your Samba Servers (share) username and password in (replacing: guest, and the blank password). Replace the mount.cifs mount option ro with rw. For (minimal) security reasons I would recommend giving the script root only access:
    Code:
    sudo chown root:root **SCRIPT NAME**
    sudo chmod 700 **SCRIPT NAME**
    Any security boffins point out a way to not use a plain text password in this script file??


    Also in my /etc/samba/smb.conf file:
    Code:
    socket options = TCP_NODELAY SO_RCVBUF=65536 SO_SNDBUF=65536
    Don't trust me on this - it goes against all the guides! (Lower values are considered optimal! Stick with 8192!) I did find a graph somewhere on the interwebs - once - with different values of the write and read buffers vs. throughput...

    I am no networking expert - so Caveat Emptor!!

    Good luck!
    Bob

  4. #34
    Join Date
    Jan 2013
    Location
    DK - DE - ES - GB
    Beans
    30
    Distro
    Ubuntu

    Re: Slow Samba performance on Ubuntu 10.10

    Same problem with 12.04 and Samba getting files from a NAS from Lacie.

    Describing (and showing) the problem here also: http://youtu.be/cSZ9X9y9_hc

    Have tried to add the following two lines (
    placed under 'Misc', all 3 combinations) in /etc/samba/smb.conf:
    SO_RCVBUF=8192 SO_SNDBUF=8192
    socket options = TCP_NODELAY

    - First when I wrote them in ONE LINE, like this, it worked a little better:
    socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

    - The speed jumped from 1MB or less to around 3 MB. Nice, but still not anything like 1000Mb/s


    Checked eth0 with mii-tool and ethtool:

    mii-tool says half duplex and ethtool says full duplex.
    Tried to change the setting 'in' mii-tool, but that didn't change anything.
    Don't know why the different results and what to try at this point to manage these two different results.

    I'll continue to search for a solution ... given no other options ... xD

    ------------------
    Using testparm didn't reveal anything interesting, as far as I can see:

    Code:
    laila@laila:~$ testparm
    Load smb config files from /etc/samba/smb.conf
    rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
    Processing section "[printers]"
    Processing section "[print$]"
    Loaded services file OK.
    ERROR: lock directory /var/run/samba does not exist
    ERROR: pid directory /var/run/samba does not exist
    Server role: ROLE_STANDALONE
    Press enter to see a dump of your service definitions
    
    [global]
        server string = %h server (Samba, Ubuntu)
        map to guest = Bad User
        obey pam restrictions = Yes
        pam password change = Yes
        passwd program = /usr/bin/passwd %u
        passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
        unix password sync = Yes
        syslog = 0
        log file = /var/log/samba/log.%m
        max log size = 1000
        dns proxy = No
        usershare allow guests = Yes
        panic action = /usr/share/samba/panic-action %d
        idmap config * : backend = tdb
    
    [printers]
        comment = All Printers
        path = /var/spool/samba
        create mask = 0700
        printable = Yes
        print ok = Yes
        browseable = No
    
    [print$]
        comment = Printer Drivers
        path = /var/lib/samba/printers

  5. #35
    Join Date
    Jan 2013
    Location
    DK - DE - ES - GB
    Beans
    30
    Distro
    Ubuntu

    Re: Slow Samba performance on Ubuntu 10.10

    Here the formulation of the problem from the YouTube page:

    The NAS and the Ubuntu 12.04-laptop are connected to the same switch - and these three parts run a 1000 Mbit/s-network.

    The Ubuntu 10.04-PC is connected to the internet-routeren with a 100 Mbit/s-network - and this internet-routeren feeds also the switchen where the NAS and the Ubuntu 12.04-laptop is connected to.

    THE PART OF THE NETWORK WITH 1000 Mbit/s:
    The NAS can deliver op to 100 MByte/s = 800 Mbit/s (losely calculated)
    The network of the switch can deliver 1000 Mbit/s = 125 MByte/s (losely calculated)
    The Ubuntu 12.04-laptop runs with 1000 Mbit/s and a test shows that it downloads from the NAS with around 8.0 MByte/s = 16 Mbit/s (losely calculated). (THIS SLOW SPEED IS A PROBLEM!)

    THE PART OF THE NETWORK WITH 100 Mbits/s:
    The network of the internet-router delivers 100 Mbit/s = 12.5 MByte/s (losely calculated)
    The Ubuntu 10.04-PC runs 100 Mbit/s and a test shows that it downloads from the NAS with around 4.7 MByte/s. (only half of the possible speed, but not the problem right here)

    As I was chatting on a IRC channel next to testing the download from the NAS I came on the idea to isolate the switch from the router - not that this interfered with the download between the NAS and the Ubuntu 12.04-laptop. The speed dropped to far under 1 MByte/s !!! even thou it is supposed to be between 50 MByte/s and 100 MByte/s !!! ...

    ... thus confirming the original test (from when the video was uploaded) described in the following:



    First I store from the Ubuntu 10.04-PC some bulky files around 14 GB on the LaCie. This runs with 9.3 MByte/s. This speed fits perfect into the capacity of the 100 Mbit/s ethernet card of this computer.

    When the files are completely transferede to the NAS server I go on with the next steps.

    From the Ubuntu 12.04-laptop (a brand new laptop by Okt. 2012 with all of the best) I now drag and drop the same files from the NAS server to the desktop. The transfer rate is now ONLY 1 - 2 MB/s !!! - What happens?... This is actually a computer with a 1.000 Mbit/s ethernet card!!! A card ten times faster than that on the other computer.


    NO COMES THE FUNNY PART: While the Ubuntu 12.04-laptop is fetching the data from the NAS, I now start to fetch another big bulky file from the same NAS to the desktop on same computer. When these two cuncurrent transfers are running from the same NAS to the same computer, then the transfer rate jumps to what ist expected: around 50 - 100 MByte/s. ... Thats weird!

    As soon as the second transfer stops, the speed of the first transfer drops to 1 - 2 MByte/s again.

    Crazy stuff! - What happens?... Is it Lacie, Ubuntu or Samba?...

  6. #36
    Join Date
    Aug 2007
    Location
    idaho
    Beans
    394
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: Slow Samba performance on Ubuntu 10.10

    Ubuntu 10.10 is End Of Life try upgrading to 12.04 or 12.10.
    If Ubuntu had 31 flavors then we could call it Baskin' Ubuntu.

  7. #37
    Join Date
    Jan 2013
    Location
    DK - DE - ES - GB
    Beans
    30
    Distro
    Ubuntu
    Thanks, that helped a lot! ...
    - oh, no, sorry, I just saw I'm already on 12.04 Long Term Support - and the problem persists. Well don't aks me to tell my opinion on 12.04 compared to 10.04, because that belongs somewhere else in different places with all it's problems.

    And my laptop is with the newest i7 3840qm 2.8 GHz for mobile units, ssd & ordinary hd, r8168 eth. card and a lot of other fine stuff.

    More suggestions?....

    Came on the idea to try a sftp session to the NAS from the 12.04-machine. Speed is around 4.7 MB/s.

    Could this exclude Samba as reason?... Is it more in eth0 in generel I have to look?....



    Quote Originally Posted by jmate24 View Post
    Ubuntu 10.10 is End Of Life try upgrading to 12.04 or 12.10.
    - Is it better if I moved my questions to the 12.04-part of this forum?....
    Last edited by overdrank; January 6th, 2013 at 08:40 PM.

  8. #38
    Join Date
    Feb 2007
    Beans
    23,519
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Slow Samba performance on Ubuntu 10.10

    Hi and please start a new thread for your issues. Thread closed

Page 4 of 4 FirstFirst ... 234

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
  •