Prior to the 18.1 release, Berkeley DB's replication manager managed connections
using the select()
call which has a limitation of 1024 open
file descriptors. Application working with a very large number of databases, files
or network connections and thus consuming more than 1024 file descriptors, were
likely to run into this limitation.
Berkeley DB's 18.1 release offers the use of poll()
and/or epoll()
in preference to select()
.
In the new implementation, poll()
is preferred over
select()
because it does not limit the number of open file
descriptors. If epoll()
is available and the number of
open file descriptors is greater than 1024, epoll()
is
preferred over poll()
because it scales better.
No changes are necessary to use the new defaults, but new flags have been added
for the user to disable poll()
and epoll()
and
fall back to select()
.
DB_REPMGR_CONF_DISABLE_POLL
A new flags
parameter value for the
DB_ENV->rep_set_config()
method to indicate that poll()
should not be used.
DB_REPMGR_CONF_DISABLE_EPOLL
A new flags
parameter value for the
DB_ENV->rep_set_config()
method to
indicate that epoll()
should be used (if supported
by the target OS). Note that this flag needs to be explicitly
specified for epoll()
to be used by the replication
subsystem.