commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Steitz <phil.ste...@gmail.com>
Subject [pool] GKOP clearOldest behavior
Date Sat, 25 Dec 2010 16:44:36 GMT
I notice now that in the doco cleanup before pool 1.5, we left one more
inscrutable "feature" of GKOP undocumented, namely the behavior determined
by the clearOldest method added in pool 1.3.   This (non-optional) feature
destroys 15% of the "oldest" idle instances in the union of the pools to
"make room" when a borrowObject attempt bumps up against maxTotal and there
are idle instances (with other keys) that could be sacrificed.  This
behavior makes sense for the DBCP use case (prepared statement pools), but
may not always be desirable.  I think it should be configurable (whether or
not to do it and possibly the trimming %) and documented.   The 1.5 changes
to take factory methods out of synch blocks also increase the activation
rate of clearOldest, since the internal processing count is included in the
guard.  It might actually be better to eliminate that from a performance
perspective (i.e. only activate when _totalActive + _totalIdle >=
_maxTotal).

This feature was implemented in POOL-49.  Prior versions just invoked
clear() to eliminate all idle instances when maxTotal was attained.

Phil

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message