[ 
http://issues.apache.org/jira/browse/DIRMINA-176?page=comments#action_12367652 
] 

dave irving commented on DIRMINA-176:
-------------------------------------

Indeed... In fact, in one of my applications I have a similar pooling issue 
(non Mina) - where many buffers are small, and ocassionally there are much 
larger buffers required. It is desireable to pool both types.

What I do is partition the pool in to ranges.

This works for me, as I always know in advance what size "range" im likely to 
be in for a given read or write.
I suppose for Mina you could maybe supply a "hint" when aquiring a buffer for 
write.
And for reads, I suppose its possible to find out from the NIO API how much 
data is likely to be read in the current read?

Just thinking out loud really....

> ByteBuffer pool manager which prevents endlessly increasing pool size.
> ----------------------------------------------------------------------
>
>          Key: DIRMINA-176
>          URL: http://issues.apache.org/jira/browse/DIRMINA-176
>      Project: Directory MINA
>         Type: New Feature
>     Reporter: Trustin Lee
>      Fix For: 0.9.3

>
> The current implementation of ByteBuffer pool is designed to increase its 
> size for ever; it doesn't decrease at all.  This is often a cause of 
> OutOfMemoryError and unexpedly huge heap size.  There's one viable solution 
> for this issue:
> * Remove the buffers which have been unused for a long time from the pool.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to