Johan Haleby wrote:
I'm using Mina to broadcast lots of incoming data from external hardware
devices to connected clients.
But as soon as
we get many clients (> 30 or so) the performance is declining. In some tests
we've done it takes several minutes for the clients to receive all data
after the hardware device has been shutdown.
How is the program behaving? Is it CPU-bound? Does heap size increase
until you shut down the data-producing device?
This is quite inefficient since thousand of small IoBuffer objects
will be sent over the wire instead of creating one buffer with a more
appropriate buffer size").
Have you checked if the buffers are actually sent in separate IP
packets, or combined at some level into larger packets? Have you tuned
send/receive buffer sizes? Does your socket have TCP_NO_DELAY set?