https://issues.apache.org/bugzilla/show_bug.cgi?id=56798

--- Comment #2 from Christopher Schultz <ch...@christopherschultz.net> ---
Nice analysis. I think you're on to something, here. The "depth" of the pool
should end up, over time, being roughly equal to the number of connections
actually required to serve the needs of the clients, *but no more*. Using a
LIFO structure does in fact mean that the whole pool will stay "hot" regardless
of how big it becomes... as long as the connections are used frequently enough.

But the frequency of a check-out is not really relevant: only the number of
connections that are used /simultaneously/ is relevant. A site may be able to
get away with a pool with a depth of 2 or 3 connections, but if the pool grows
to 50 connections, they all might stay in the pool and not be evicted due to
the LIFO behavior.

I'm not sure if the LIFO queue gives a performance benefit -- because the head
of the structure is only under contention for check-outs and the tail of the
structure is only under contention for check-ins -- but it's worth
investigating.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to