Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13
Hi all, I'm new to the forums but was recommended by a friend as a good place to start as a beginner. We have recently installed a new server with ...
  1. #1
    Just Joined!
    Join Date
    May 2009
    Posts
    7

    Samba Share running very slow

    Hi all,

    I'm new to the forums but was recommended by a friend as a good place to start as a beginner.

    We have recently installed a new server with CentOS, and now due to various disagreements, approaching the people that installed CentOS and setup the internal server is out of the question.

    At present we have a selection of Mac's and PC's with varying Operating Systems installed however they all lag when connecting to the server. (it can take 20-30 seconds to save a .css file in varying editors)

    We have a setup where all machines have a mapped drive to the Samba Share, and we all work off it remotely rather than bringing our work locally. This is because local work doesn't get backed up + its time consuming to move back and forth.

    The odd thing is that http/ftp/ssh are very quick when connecting and transferring/saving files to the server, however when working remotely saving a mere .php or .txt file can hang for about 20-30 seconds, however it does save instantly sometimes like it should (not often). The machine is on a 1000/100mb card with a 1000/100mb router connecting us all to it as is our older machine which at present is quicker to work off remotely (its 11 years old running Redhat 6 or 7!)

    The new machine has 8g ramm, a dual xeon inside, and 1x0S hdd and 2x raid 500gb as I said before I can't see it being hdd or connection else surely _everything_ would be slow?

    I have root SSH access to the machine so let me know if there is any tests I can do to help diagnosis, but I am not very good with SSH other than chown,chmod,mv (basic stuff a developer uses on a daily basis)

    Thanks in advance guys, I have faith in the Linux gurus around here!

    Regards,

    Andy

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    We'd need to look at your samba configuration file(s). I run CentOS and have Windows and Mac systems accessing it via Samba and access/updates are quite quick. In fact, I use it for UML development database access from XP and I can't tell the difference between that and using a local database. Of course, I have a gigabit ethernet connection at both ends, so that helps keep latency down and thruput up.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Just Joined!
    Join Date
    May 2009
    Posts
    7
    If you could let me know the commands to retrieve information or where certain files are so I can vi and pastebin I will.

    Our network is also gigabit, except for the last 1-2metres of line where the hub splits the line into a connection for 2 people. but the servers are on gigabit completely. so if we are all connecting it shouldn't really prove to be a problem.

    Also if any kind of logging should be turned on/off let me know and I'll look into. Apologies for the "n00b" approach but I'm just a webdeveloper at heart

  4. #4
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    Get /etc/samba/smb.conf for a start.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  5. #5
    Just Joined!
    Join Date
    May 2009
    Posts
    7
    Hi, I have the paste of it here:

    Apparently I am not allowed to paste urls to other sites till i have posted 15 posts so here is the pasted version:

    Code:
    # 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 (perhaps too
    # many!) most of which are not shown in this example
    #
    # Any line which starts with a ; (semi-colon) or a # (hash)
    # is a comment and is ignored. In this example we will use a #
    # for commentry and a ; for parts of the config file that you
    # may wish to enable
    #
    # 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]
            log file = /var/log/samba/samba.log
            load printers = yes
            smb passwd file = /etc/samba/smbpasswd
            passwd chat = *New*password* %n\n *Retype*new*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
            obey pam restrictions = yes
            socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
            force directory mode = 0775
            delete veto files = no
            username map = /etc/samba/smbusers
            hide dot files = yes
            encrypt passwords = yes
            veto files = .AppleDB/.AppleDouble/.DS_Store/Desktop Folder/Network Trash Folder/.ds_store/._Temporary Items/._Trash/Temporary Items/Trash/2EDS_~!3/._*/
            passwd program = /usr/bin/passwd %u
            dns proxy = no
            netbios name = centos
            printing = cups
            server string = Samba Server
            locking = no
            unix password sync = yes
            workgroup = CITE
            force create mode = 0755
            os level = 20
            debug level = 10
            printcap name = /etc/printcap
            security = user
            winbind cache time = 10
            pam password change = yes
    
    [homes]
        comment = Home Directory Of %u
        browseable = no
        writable = yes
    
    [root]
        comment = Root Filesystem
        writeable = yes
        force user = root
        force group = root
        path = /
    
    [work]
        comment = Work Filesystem - Deprecated
        writeable = yes
        guest ok = yes
        path = /home/work
        force user = nobody
        force group = nobody
    
    [mac]
            delete veto files = no
            guest ok = yes
            force user = nobody
            comment = Work Filesystem - Mac
            writeable = yes
            veto files =
            path = /home/work
            force group = nobody
    
    [windows]
        comment = Work Filesystem - Windows
        writeable = yes
        guest ok = yes
        path = /home/work
        force user = nobody
        force group = nobody
    I also tailed the log file a bit (moves really quick) but it keeps mentioning our older server which is also a samba share on the network:
    Code:
    [2009/05/28 09:51:59, 4] nmbd/nmbd_workgroupdb.c:find_workgroup_on_subnet(171)
      find_workgroup_on_subnet: workgroup search for CITE on subnet 192.168.1.11: found.
    [2009/05/28 09:51:59, 10] nmbd/nmbd_sendannounce.c:announce_myself_to_domain_master_browser(372)
      announce_myself_to_domain_master_browser: no unicast subnet, ignoring.
    [2009/05/28 09:51:59, 4] nmbd/nmbd_workgroupdb.c:dump_workgroups(282)
      dump_workgroups()
       dump workgroup on subnet    192.168.1.11: netmask=  255.255.255.0:
            CITE(1) current master browser = LINUX
                    CENTOS 40819a03 (Samba Server)
                    LINUX 40049a03 (Samba Server)
    Not sure if the new server not being the master browser is a bad thing, but let me know.

    let me know if there is more tests I can do to help diagnosis.

  6. #6
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    Well, your winbind cache time setting is only 10 seconds. A value more like 300 seconds (5 minutes) would reduce the frequency of accessing a Windows Server for user and group information on each connection.

    Setting debug level to 10 is too high. You are writing a LOT of data to the log I think. A debug level of 1 will log errors and warnings and not all the other cruft. This can have a noticeable impact on performance as the server is spending a lot of time writing messages to the log file(s).

    These are the only issues I can see in a quick scan of your smb.conf file. I don't know if the socket options settings are sane, but I think so. In any case, try changing the values for the winbind cache time and debug level settings to see what happens.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  7. #7
    Just Joined!
    Join Date
    May 2009
    Posts
    7
    Do I need to restart Samba in order for this to take effect? If so is there a command to check my syntax and then restart it the same as php.ini?

    If so would you be kind enough to let me know the command(s). Thanks.

  8. #8
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    You can restart the server easily enough. Go to Start -> System -> Service Management (services). You will be asked for the root password. Enter that and you should then get the Service Configuration window. Go down to the entry 'smb', click on that, and then click on the Restart button. That will restart the Samba server with the new settings.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  9. #9
    Just Joined!
    Join Date
    May 2009
    Posts
    7
    When you say start-> etc are you referring to GUI? as I don't have one installed presently.

    I do have virtualmin/webmin though I think I can restart through there.

  10. #10
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    Quote Originally Posted by udjamaflip View Post
    When you say start-> etc are you referring to GUI? as I don't have one installed presently.

    I do have virtualmin/webmin though I think I can restart through there.
    Not a problem. You can restart it from the command line as root.
    Code:
    service smbd restart
    If that gives you an error, then do this:
    Code:
    service smbd stop
    service smbd start
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Page 1 of 2 1 2 LastLast

Posting Permissions

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