Hi All,
I've been doing some fairly heavy performance tests with rabbit to see if it can suit my needs as a messaging layer to replace an existing system, and after some testing I'm hitting some apparent latency on the sending side that I'm trying to track down. I'm using many separate publisher/consumer applications in C# to emulate load from our application, accross about 65 queues. As part of their logging, the senders track how long it takes the IModel.BasicPublish call to happen and I've logged fairly frequent spikes of > 100ms.
Any idea what could cause it to get hung up like that? subsequent messages will go through fine, and there doesn't seem to be any pattern as to when these spikes occur. Is BasicPublish asynchronous under the hood?
Testing plan:
Here's my plan setup running at roughly 27,000 messages/second. I should note that overall rabbitmq is doing a fairly solid job keeping up with overall throughput, its just individual messages getting delayed that is the problem.
The Test Server (its late, pretty sure this is a cluster of 4 servers each with these specs ill get back and confirm on this tomorrow):
-Ubuntu 14.04.1 16 core, 16 GB memory
-Rabbitmq 3.6.12 with Erlang 19.3.6.2.
The Test Client Software:
The test software consists of two C# programs using the rabbitmq client library. One program is a dedicated producer, the other a consumer.
The producer sends 1.5KB messages at a set rate/second after a warm-up period on a single thread. Each producer only sends to a single exchange
The consumers subscribe to a single queue and process messages with the async consumer
Both consumers and producers track their messages sent/received and log results to a database for easy perusal
The Test Client Systems:
10x Quad Core, 8GB memory systems
-Each system is running 3-4 producers at 350 msgs/second to a topic exchange (C) with 26 routing keys to queues C_1-C_26 (6 clients send 1050/s, 4 clients send 700/s)
-Each system consumes a single queue B_1-B_10
3x Quad Core, 8GB memory systems
-Each system is running 9-10 producers at 115 msgs/s to a topic exchange (A), with 26 routing keys to queues A_1-A_26 (2 clients send 1150, one sends 1035, 115/s per route)
4x Hex-core, 16GB memory systems, 2 of these systems are producing a total of 3000msgs/sec (3x300+2x1200), while 2 are producing 4200 msgs/sec(2x300+3x1200)
-Each system is running 2-3 producers at 300 msgs/second to a topic exchange (B), with 10 routing keys B_1-B_10
-Each system is running 2-3 producers at 1200 msgs/second to a direct exchange (D), with one queue D_1
-Each system is running 13 consumers. half of which are queues from A, half are queues from C (covering the entire A_1-A-26, and C_1-C-26)
1x Hex-core 16GB system that just consumes a total 3,000 messages/second sent by the
-This system is running 4 consumers that consume D_1