You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Steve Bate <st...@technoetic.com> on 2006/03/13 19:33:47 UTC

Strategies for managing write queue size in 0.8.2?

Hello,

Again, this is version 0.8.2.

I'm currently having a problem with a fast writer and
slower reader causing the writer's memory consumption to
grow rapidly. The memory consumption appears to be caused
by the unbounded write buffer queue in the SocketSession.

What strategies do you recommend to control the writer's
memory usage in these scenarios?

Thanks,

Steve


Re: Strategies for managing write queue size in 0.8.2?

Posted by Trustin Lee <tr...@gmail.com>.
Hi Steve,

On 3/14/06, Steve Bate <st...@technoetic.com> wrote:
>
> Hello,
>
> Again, this is version 0.8.2.
>
> I'm currently having a problem with a fast writer and
> slower reader causing the writer's memory consumption to
> grow rapidly. The memory consumption appears to be caused
> by the unbounded write buffer queue in the SocketSession.
>
> What strategies do you recommend to control the writer's
> memory usage in these scenarios?


If you know the average (or maximum) buffer size per message, then you can
calculate the total size of data from IoSession.getScheduledWriteRequests().
So you can delay writing messages considering it.  That's all for now.  For
more accurate calculation, we probably need to add
IoSession.getScheduledWriteBytes() in 0.9 stream.  You can track this issue
here:

http://issues.apache.org/jira/browse/DIRMINA-191

Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP key fingerprints:
* E167 E6AF E73A CBCE EE41  4A29 544D DE48 FE95 4E7E
* B693 628E 6047 4F8F CFA4  455E 1C62 A7DC 0255 ECA6