Results 1 to 3 of 3

Thread: Optimize LDAP connection

  1. #1
    Join Date
    Jan 2009
    Posts
    46

    Optimize LDAP connection

    Hello,
    I need a little help for a LDAP connection.I look desperate but not understand anything. i feel falling low connection so looking for way to optimize it. i used windows server 2000 please help me.
    Thank you in advance.

  2. #2
    Join Date
    Feb 2008
    Posts
    2,635

    Re: Optimize LDAP connection

    When setting up a Sametime server to authenticate against LDAP, the network connection and performance of the LDAP server contributes significantly to the load times and response times of the Sametime server.

    Upon server startup, the Sametime server will open several connections to the LDAP server. At the same time, the people and groups are loaded from the Sametime server. When all of the Sametime services are running, the server is available for client logins and the directory cache continues until it has completed loading all of the users from the LDAP directory.

    In order to prevent the LDAP server from being overwhelmed with the requests from the Sametime server, the server limits the number of requests in flight between the Sametime server and the LDAP server to a maximum of 10 (by default) and all further requests will be queued for processing. When the responses are received from the LDAP server, more requests will sent only if the queue size drops down to a size of 5 (by default)

    In certain cases the queue size for sending LDAP requests will exceed a maximum number allowed by the server and the following error message

  3. #3
    Join Date
    May 2008
    Posts
    3,516

    Re: Optimize LDAP connection

    with this VbScript - Optimize LDAP connection you can try

    the technique easier to identify a user in Active Directory and found its LDAP connection string and do this:

    Set oADSystemInfo = CreateObject ( "ADSystemInfo")
    Set oUser = GetObject ( "LDAP ://"& oADSystemInfo.UserName)

    The concern of this is that the function "Set oADSystemInfo = CreateObject (" ADSystemInfo ")" may take some time to execution (about 30 seconds on a P4 2.8 and 1 min on a P3 833 c therefore has particularly slow link via the ad)


    in fact instead of calling a Set oADSystemInfo = CreateObject ( "ADSystemInfo") to find the connection string of the current user, I find a function that has flat login allows the user to find the string LDAP thereof


    Set oRootDSE = GetObject ( "LDAP: / / RootDSE")
    Set oShell = WScript.CreateObject ( "WScript.Shell")
    sUserName = oShell.Environment ( "PROCESS"). Item ( "username")
    Set oUser = GetObject ( "LDAP: / /" & GetoUser (sUserName))

    GetoUser Function (ByVal LogonAccount)
    Const ADS_PROPERTY_CLEAR = 1
    Const ADS_NAME_INITTYPE_GC = 3
    Const ADS_NAME_TYPE_NT4 = 3
    Const ADS_NAME_TYPE_1779 = 1
    'Determine the DNS domain name from the object RootDSE.
    strDNSDomain = oRootDSE.Get ( "defaultNamingContext")

    Uses the object NameTranslate to find the netbios name of the domain name from the dns
    Set objTrans = CreateObject ( "NameTranslate")
    objTrans.Init ADS_NAME_INITTYPE_GC, ""
    objTrans.Set ADS_NAME_TYPE_1779, strDNSDomain
    strNetBIOSDomain = objTrans.Get (ADS_NAME_TYPE_NT4)
    'Suprime the last backslash
    strNetBIOSDomain = Left (strNetBIOSDomain, Len (strNetBIOSDomain) - 1)
    strUserNTName = Trim (LogonAccount)
    Uses the object NameTranslate to convert the NT name in LDAP string.
    'On Error Resume Next
    objTrans.Set ADS_NAME_TYPE_NT4, strNetBIOSDomain & "\" & strUserNTName
    If Err.Number <> 0 Then
    On Error GoTo 0
    WScript.Echo "ERROR: Login not found in Active Directory:" & strUserNTName
    Else
    On Error GoTo 0

    strUserDN = objTrans.Get (ADS_NAME_TYPE_1779)

    'On Error Resume Next
    GetoUser = strUserDN
    End If
    End Function

    function required less than 1 second to run,
    if this will seem unnecessary, I assure you that if you develop a apps that relies on Active Directory would be very happy to make the connection as short as possible since losing 30 to 45 seconds each time for nothing c It is quite heavy when it's for your user.

    yes adding that a LDAP connection like this:
    Set oUser = GetObject ( "LDAP: / / SERVERNAME /" & GetoUser (sUserName))
    can cause the same delays that the other function
    for landing, so the privilegier
    Set oUser = GetObject ( "LDAP: / / DOMAINEDNS /" & GetoUser (sUserName))
    .

Similar Threads

  1. Tips to optimize your Network Connection and Wireless Connection
    By Computer_Freak in forum Tips & Tweaks
    Replies: 3
    Last Post: 18-01-2012, 08:30 PM
  2. Replies: 4
    Last Post: 29-12-2011, 06:01 AM
  3. Optimize the connection to the database in mysql
    By Bottlenecked in forum Software Development
    Replies: 8
    Last Post: 09-09-2010, 10:24 PM
  4. How to optimize your internet connection
    By kex in forum Tips & Tweaks
    Replies: 3
    Last Post: 28-07-2009, 04:08 PM
  5. Replies: 2
    Last Post: 08-08-2008, 04:19 AM

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
  •  
Page generated in 1,714,011,693.23194 seconds with 16 queries