<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
On 22/01/2015 15:16, Michael Ströder wrote:<br>
<blockquote cite="mid:54C11453.10000@stroeder.com" type="cite">
<pre wrap="">Mark R Bannister wrote:
</pre>
<blockquote type="cite">
<pre wrap="">On 21/01/2015 09:16, Michael Ströder wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Mark R Bannister wrote:
</pre>
<blockquote type="cite">
<pre wrap="">I've been using the new ldap.OPT_DESC feature introduced in python-ldap 2.4.17
and have a question concerning the use of it with asynchronous search
operations and paged search controls.
</pre>
</blockquote>
<pre wrap="">Never used that myself.
Why are you using paging? This only makes sense if you want to retrieve more
than 1000 entries from MS AD.
</pre>
</blockquote>
<pre wrap="">
I've tested this now without paged search controls and get the same problem.
</pre>
</blockquote>
<pre wrap="">
Ok, my local tests show the same results (openSUSE Linux 13.2, OpenLDAP RE24
from git, python-ldap 2.4.19). And ldap.resiter is not really usable for
msgid=ldap.RES_ANY.
I vaguely remember having seen this many years ago. Because at that time I had
rewritten LDAPObject.result() to internally poll for results which made the
process a CPU hog. :-/
So yes, you should take this to openldap-technical mailing list.
For there you should ideally present C code depmonstrating the issue. ;-)
Ciao, Michael.
</pre>
</blockquote>
<br>
I had time to play with this some more, and it emerged that if I did
this:<br>
<br>
<small><font face="Courier New">result = ldap.result(timeout=0.0001)</font></small><br>
<br>
(i.e. instead out <small><font face="Courier New">timeout=0</font></small>),
it behaves much more the way I expected. The number of <small><font
face="Courier New">select()</font></small> calls drops from over
80,000 to about 3,000 and testing different values this seemed to be
the most optimal setting (on the hardware I was testing on anyway).<br>
<br>
So this is definitely one for the openldap-technical mailing list.
It seems that <small><font face="Courier New">timeout=0</font></small>
implies that I want one result at a time, when in fact I need a way
of requesting all the data currently available in kernel buffers but
without waiting around for new network packets to arrive.<br>
<br>
Best regards,<br>
Mark.<br>
<br>
</body>
</html>