John Robinson from Vertica Systems posted a patch to the
Spread-users mailing list for converting the Spread client library
to use poll instead of
select. I went ahead and modified the
patch to enable the use of poll only when
HAVE_POLL is defined instead of removing the original
select code altogeher.
In addition, I modified the Spread events interface to
use epoll on Linux when
HAVE_EPOLL is defined. This change can improve the
performance of a Spread daemon when it is serving hundreds of
client connections.
To enable the poll patch to sp.c, configure with:
CFLAGS="-O2 -DHAVE_POLL"
To enable the the epoll patch to events.c configure with:
CFLAGS="-O2 -DHAVE_EPOLL"
To enable both configure with:
CFLAGS="-O2 -DHAVE_POLL -DHAVE_EPOLL"
![]() | Warning |
|---|---|
The Also, the patch's simple hash into
|
| Patch File | Comment |
|---|---|
| spread-4.0.0-poll-epoll.patch | Even though it has been tested, this patch is highly experimental and not polished final code. It's really a quick and dirty hack. Use it at your own risk. This patch is constantly evolving and may result in an all-out rewrite of the spread event handling system. |







![[Warning]](../images/docbook/warning.gif)
