The heap size doesn't increase until the data-producing device is shutdown, it fluctuates like it should do (after tweaking the GC). The CPU usage goes up dangerously close to 100% pretty fast though.
I've tried experimenting with the TCP_NO_DELAY settings after your tip, enabling it (i.e. disabling Naggle's algorithm) gives me lower write throughput but also lower CPU usage. I've not changed the default receive buffer size (it's not an issue afaik) but I'm using a 64k as write buffer size. I'll try wireshark to check if the buffers are sent in seperate packets asap. /Johan On Fri, Aug 15, 2008 at 11:48 AM, Tuure Laurinolli < [EMAIL PROTECTED]> wrote: > 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? > >
