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

--- Comment #5 from Christopher Schultz <ch...@christopherschultz.net> ---
(In reply to Sebb from comment #3)
> (In reply to Christopher Schultz from comment #2)
> 
> > 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.
> 
> Surely you mean FIFO here?

Yes, I meant FIFO. Sorry for the confusing typo.

> > 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.
> 
> Ditto
>  
> > 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
> 
> Huh? Is that really true of a LIFO queue?

A queue is FIFO, a stack LIFO. To align the nomenclature, here, queue is FIFO /
LRU and stack is LIFO / MRU.

For a stack/LIFO/MRU structure, there is only one "hot" end of the structure:
both check-ins and check-outs are happening in the same place (the "top" of the
stack). For a queue/FIFO/LRU structure, check-ins are happening at one end and
check-outs are happening at the other end. So, depending upon the
synchronization techniques used, the queue may offer better performance at the
structure level -- even if the stack model gives a better outcome. It was just
a thought.

-- 
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