The scenario

I have a SUSE SLES 11.1 SP1 machine as Samba master PDC with LDAP backend. In one share there are Database files for a Client-Server application. I log XP and Windows 7 machines to the local domain (example.local), the login is a little slow but works. In the client computers have an executable which opens, reads and writes the database files from the server share.

The Problem

When running Samba with LDAP password backend the client application runs VERY SLOW with a maximum transfer rate of 2500 MBit per second. If disable LDAP the client app speed increases 20x, with transfer rate of >50Mbit/sec and running smoothly.

I'm doing test with just two users and two machines, so concurrency, or LDAP size shouldn't be the problem here.

The suspect

LDAP, Smb.conf [global] section configuration.

The Question

What can I do? I've googled a lot, but still have no answer.

Slow smb.conf WITH LDAP

        workgroup = zmartsoft.local
        passdb backend = ldapsam:ldap://
        printing = cups
        printcap name = cups
        printcap cache time = 750
        cups options = raw
        map to guest = Bad User
        logon path = \\%L\profiles\.msprofile
        logon home = \\%L\%U\.9xprofile
        logon drive = P:
        usershare allow guests = Yes
        add machine script = /usr/sbin/useradd  -c Machine -d /var/lib/nobody -s
 /bin/false %m$
        domain logons = Yes
        domain master = Yes
        local master = Yes
        netbios name = server
        os level = 65
        preferred master = Yes
        security = user
        wins support = Yes
        idmap backend = ldap:ldap://
        ldap admin dn = cn=Administrator,dc=zmartsoft,dc=local
        ldap group suffix = ou=Groups
        ldap idmap suffix = ou=Idmap
        ldap machine suffix = ou=Machines
        ldap passwd sync = Yes
        ldap ssl = Off
        ldap suffix = dc=zmartsoft,dc=local
        ldap user suffix = ou=Users
  • You can't just share database files like this, you will end up with corruption. – JamesRyan Feb 19 '11 at 21:05

Finally after months of look everywhere I read this article http://www.linuxtopia.org/online_books/network_administration_guides/samba_reference_guide/24_locking_08.html

and started to play with oplock values. The Windows application did a lot of read write operations, each time changing permissions, when disabling the oplocks things started to going better.

| improve this answer | |

You may want to check to see if your name-service cache daemon (nscd) is working right. The slowdown you're seeing may be related to username->UID lookups. You might get some speedups by mounting that volume with noatime as that'll prevent the lookups from happening as often. But those values should be cached for a certain period.

| improve this answer | |
  • I just noticed that the share only run fast if the password backend in [global] is set to smbpass. Either ldap and tdbsam are slow – hmartian Mar 4 '11 at 1:18
  • mounting noatime was helpful into gaining some performance. – hmartian Jun 29 '11 at 1:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.