One more change for v3 I think

Matthew Newton mcn4 at
Tue Feb 24 18:54:23 CET 2015

On Tue, Feb 24, 2015 at 11:58:55AM -0500, Alan DeKok wrote:
>   I put a change into master which should probably go into v3, too:
>   The connection pool re-uses connections based on “most
>   recently used”.  But the exact definition of MRU is important.
>   It turns out that “last returned to the pool” is a bad metric.
>   Because the connection could be blocked / slow.  And re-using
>   that connection would mean re-using a blocked / slow
>   connection.

That makes sense - and the FB link is an interesting read. Not
something I'd normally think about with link aggregation!

So essentially when things start to get busy, a connection may
fail quicky, meaning it goes back into the pool and is then picked
up again rather than other entries that have been hanging around
idle for a while.

>   The solution is to define MRU as “most recently removed from
>   the pool, and returned to the pool”.  This change prioritizes
>   connections which are fast.
>   The code is a bit complicated, because it has to keep track of
>   more information.  But it should result in systems which are
>   more stable.

Quick skim through and it looks OK to me, as long as the code in
src/lib/heap.c is well behaved (which I've not stared that hard



Matthew Newton, Ph.D. <mcn4 at>

Systems Specialist, Infrastructure Services,
I.T. Services, University of Leicester, Leicester LE1 7RH, United Kingdom

For IT help contact helpdesk extn. 2253, <ithelp at>

More information about the Freeradius-Devel mailing list