Full_Name: Ondrej Kuznik Version: re24/master OS: URL: https://github.com/mistotebe/openldap/tree/its9001 Submission from: (NULL) (82.10.24.68) If a client has thousands or more requests in flight at the same time, it has to look up the right request every time it receives a response. As the requests are tracked in a doubly-linked list, lookup tends to take O(n) steps whichever direction we take and things generally get out of hand from there on. The linked branch puts them into a TAvl for quicker lookup, with another commit to let people test as (t)avl code is part of liblutil at the moment.
On Fri, Mar 29, 2019 at 01:38:30PM +0000, ondra@openldap.org wrote: > Full_Name: Ondrej Kuznik > Version: re24/master > OS: > URL: https://github.com/mistotebe/openldap/tree/its9001 > Submission from: (NULL) (82.10.24.68) > > > If a client has thousands or more requests in flight at the same time, it has to > look up the right request every time it receives a response. As the requests are > tracked in a doubly-linked list, lookup tends to take O(n) steps whichever > direction we take and things generally get out of hand from there on. > > The linked branch puts them into a TAvl for quicker lookup, with another commit > to let people test as (t)avl code is part of liblutil at the moment. A trivial program to expose this behaviour is available at ftp://ftp.openldap.org/incoming/searcher.c The same program takes under a second to handle 100000 searches for cn=monitor and children when linked to the patched libldap. -- Ondřej Kuzník Senior Software Engineer Symas Corporation http://www.symas.com Packaged, certified, and supported LDAP solutions powered by OpenLDAP
*** Issue 6301 has been marked as a duplicate of this issue. ***
See also https://lists.openldap.org/hyperkitty/list/openldap-devel@openldap.org/thread/RMJPLWYNMYOGJUSSA6C2E53L3BSRWL2N/
Created attachment 711 [details] searcher.c
Ondrej to test moving needed liblutil code into libldap
Commits: • e36d1e31 by Ondřej Kuzník at 2021-03-30T15:46:40+01:00 ITS#9001 manual changes • 3bd1b090 by Ondřej Kuzník at 2021-03-30T15:46:40+01:00 ITS#9001 Use a TAvl for request tracking in libldap