Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[paho-dev] Throttling on massive message publish in Java client

Hello,

I am using Ecipse Paho Java (1.0.1) implementation in a height
throughput environment.
I did some experiments and am experiencing some weird things.

The scenario is a client using Paho, and a broker using Mosca (NodeJS
implementation, said to handle 20k msg/s). We have a websocket browser
application for visualization.
I have tried the synchronous and asynchronous client as well as
different QoS parameters.

First of all, the async client is much much slower when using QoS 1
then using the synchronous client directly, which should be
equivalent. But I am achieving the below listed values:

MqttClient (QoS1): 1500 - 1700 mps
MqttAsyncClient (QoS1): 20 - 100 mps
MqttAsyncClient (QoS0):
    - first second 1-2mps then 0 mps
    - some seconds pause
    - then 4000 - 8000 mps

The pictures [1,2] are in the done with the MqttAsyncClient and QoS 1.
Where [1] shows the counted packages per second arriving at the
broker. As you can see there are some packages sent (99, 1131) until
the throughout drops dramatically. After pausing the client the
throughput stays some seconds low until it explodes. In [2] you see
the graph in which the x-axis is time and y-axis is millisecond
between send <-> receive (broker) <-> receive (webclient). The huge
increase in time is the point in time where I made the client stop
sending. This is where in [1] those (1675, 2040, 1577) packages begin
to fly in.

The scenario is the very same when using the async client with QoS 0.

I've been using Fedora 21, Ubuntu 14.10 for testing this. Those
pictures where taken in a local environment. Using Wireshark I
calculated that by requesting the client to send 10 bytes messages the
TCP package arrived will be 113 bytes. But doing the math I cannot see
that my 100/10 Ethernet will be the limiting factor.

Maybe you have some ideas on how to investigate further.

Regards,
    Lars

[1] https://drive.google.com/file/d/0B2mHWmdGeL4pM0J4VHBlTlBUd0E/view?usp=sharing
[2] https://drive.google.com/file/d/0B2mHWmdGeL4peHFsdEFPbHdCNE0/view?usp=sharing


Back to the top