hyc@OpenLDAP.org wrote:
Update of /repo/OpenLDAP/pkg/ldap/servers/slapd
Modified Files: connection.c 1.410 -> 1.411 daemon.c 1.414 -> 1.415 proto-slap.h 1.743 -> 1.744 syncrepl.c 1.370 -> 1.371
Log Message: Streamlined Winsock connection management
This patch eliminates all the #ifdef WINSOCK special cases in connection.c, and hides most of the dependencies in daemon.c.
Winsock's select() implementation is pretty non-optimal. Unfortunately using the Microsoft-recommended asynchronous functions would implicitly set all the sockets to non-blocking, and stuff like OpenSSL doesn't behave well with non-blocking sockets.
For reference, the peak throughput with back-null on the previous code was only 7,800 auths/sec (with 8 client threads). With this patch it's 11,140 auths/sec. In both cases the throughput declines as more client threads are used. (Compare to 35,553 auths/sec for the same machine running Linux, and no drop in throughput all the way up to hundreds/thousands of connections.)
Peak throughput on the new code with back-hdb is 7,972 auths/sec (with 12 client threads). With the previous code it was 6,252 auths/sec (with 8 client threads). (The 7,972 figure is also after setting processor affinities for the threads, forcing the listener to use core #0 and forcing the worker threads to use cores #1-7. Without that tweak, the peak is only 7,717/sec.)