[zeromq-dev] Improving latency with eventfd
Martin Sustrik
sustrik at fastmq.com
Sun Jan 18 09:28:36 CET 2009
Hi all,
There have been a patch added to 0MQ trunk which uses Linux eventfd
mechanism to send notifications to worker I/O threads. The idea is that
eventfd should be faster than the pipe that was originally used for this
purpose.
The testing results are not completely decisive so far. When testing the
latency for messages that are passed within same box via loopback
interface, latency with eventfd was actually slightly worse (~0.5
microsecond) than latency with pipe.
When testing it over untuned 1GbE network, latency got better by 8
microseconds (91.49us vs. 99.46us) when using eventfd.
If there is anybody out there with Linux kernel >= 2.6.22 and glibc >=
2.8 we would appreciate feedback about whether latency has improved on
your system.
To test latency with pipes used for notifications:
svn co http://svn.fastmq.org/svn/zeromq/trunk zeromq
cd zeromq
./autogen.sh
./configure --with-perf --disable-shared
./make
Then run ./zmq_server/zmq_server, ./perf/tests/zmq/local_lat and
./perf/tests/remote_lat
To test latency with eventfd used for notifications:
svn co http://svn.fastmq.org/svn/zeromq/trunk zeromq
cd zeromq
./autogen.sh
export CXXFLAGS=-DZMQ_HAVE_EVENTFD
./configure --with-perf --disable-shared
./make
Then run ./zmq_server/zmq_server, ./perf/tests/zmq/local_lat and
./perf/tests/remote_lat
Thanks!
Martin
More information about the zeromq-dev
mailing list