[zeromq-dev] Odd numbers with zeromq

Robert G. Jakabosky bobby at sharedrealm.com
Sat Sep 22 01:28:15 CEST 2012


On Wednesday 19, Christian Martinez wrote:
> Maybe I'm missing something here, but are people asserting here that one
> can't do a request reply MEP with various RPC technologies and exceed 1000
> 1KB messages a second?

With only 1 client and 1 concurrent request, then yes.  The msg/sec throughput 
will be limited by latency in this case.  Both client & server will be maxing 
out their CPUs, each will be sitting idle most of the time waiting for a reply 
from the other side.  If you want more throughput, then you need to increase 
the number of concurrent requests sent by the clients.

I did a quick comparison of zmq & (nginx + ab).

Hardware:
Client: Laptop 100Mbit connection 1 core 2.2Ghz AMD
Server: desktop 1Gbit connection 8 core 3.6Ghz AMD

Test parameters:
requests: 400,000
max concurrent: 8 concurrent requests, 8 concurrent TCP sockets
request/response size: 1k

zmq: (using lua-zmq + LuaJIT, see attached Lua scripts)
Client: 8 threads, so 8 concurrent requests, cpu maxed out.
Server: 1 thread, low cpu usage
throughput: 10,990 reqs/sec, about 90Mbits (both directions)
bottleneck: client cpu maxed & client bandwidth.

nginx: (1k post data including HTTP headers, 1k response data including HTTP 
headers)
Client: ab (apache bench) keep-alive, 8 concurrent requests, cpu maxed out.
Server: nginx keepalive_requests = 400,000, limited to 1 worker process.
throughput: 9,055 reqs/sec, about 74Mbits (both directions)
bottleneck: client cpu maxed.

For reference using PUB/SUB the server can push 1k size messages out at 11,335 
msg/sec, or about 92Mbits (in one direction server -> client).  The bottleneck 
here is the 100Mbit client connection.

-- 
Robert G. Jakabosky
-------------- next part --------------
A non-text attachment was scrubbed...
Name: local_lat.lua
Type: text/x-lua
Size: 2000 bytes
Desc: not available
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120921/b003a97a/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: remote_thread_lat.lua
Type: text/x-lua
Size: 2771 bytes
Desc: not available
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120921/b003a97a/attachment-0001.bin>


More information about the zeromq-dev mailing list