[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: why does select in do_ldap_select takes so long?



We are searching for an exact match entry with length 488 bytes.
ldap_search_s contains the folloing function tree:

ldap_search_s
        ldap_search
        ldap_result
                wait4msg
                        do_ldap_select
				select				

Each time  ldap_search_s (not including binding), 
we found that wait4msg is called once, but the 
do_ldap_select is called twice. 
We supposed that the first time the entry is returned, and the 
second time the result status (i.e., SUCCESS) is returned.

But it is interesting to see that 
that the first time do_ldap_select is called, it took
17 ms (similar to the do_search time 14 ms), while the second time the 
do_ldap_select is called, which is waiting for the status, it took 45 ms. 
By comparing the sending time from slapd and the 
do_ldap_select time, we found that the time is cost at
select. 

We'd like to know why it takes so long for the second select 
(waiting for the SUCCESS) to return, 
while the first select return quicky.
Note in both case, the slapd send has sent out the 
results. 

Any help will be greatly appreciated.

Xin