[Date Prev][Date Next]
(ITS#3967) Use of select in os-ip.c
Full_Name: Jeff Lewis
Submission from: (NULL) (18.104.22.168)
This is something to add to the wish-list for a future enhancement rather than a
The OpenLDAP client likes to use select() to wait on fds to become ready for
reading or writing. In our environment, it would be better if OpenLDAP could
make use of poll() instead and build its pollfds up dynamically.
The reason this is important to us is we run in a server environment where there
can be over 5000 open files when we're under extreme load. Additionally, we do
occasional LDAP queries that result in us typically using 1 fd inside the
OpenLDAP client and that fd can be quite large. To allocate fd_set structures
(4, I think) for one very large fd is less than optimal from our point of view.
For us, poll would be a much better choice.
It would be nice if OpenLDAP had a knob of some sort that would allow us to use
poll instead of select. If the configure script could figure that out, so much
the better. Even if OpenLDAP uses select by default, but gives us an
OPENLDAP_POLL macro or something similar that we could use in a -D option on the
compile commands would be hugely appreciated.
As far as which O/S's we use, they are:
AIX (32 and 64 bit Power)
HP-UX (ia64, 32 and 64 bit PA)
MP-RAS (our own proprietary SRV4 variant)
Linux (Red Had for ia64, x8664, i386; SuSE for x8664 and i386)
Solaris (32 and 64 bit Sparc)
I did check the latest stable source release and it appears to still use select.
I'd be very happy to learn that I'm wrong about that. :-)