commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Wu <>
Subject Re: commons pool benchmark issue
Date Mon, 30 Sep 2013 02:35:47 GMT
Without the pool, it's lightning fast. JProfiler shows most of the time is consumed on locking,
thread dump also shows the pool always waits.
I tried to timing the pool operations, the results proved the JProfiler reports

e,g. with 50 threads, the log shows
Average Response Time:0.06
Average Borrow Time:0.04
Average Return Time:0.02

So, the time are consumed with StringBuilder and GC is negligible, most of the time are wasted
in pool locking.

With 100 threads, the log shows
Average Response Time:1.24
Average Borrow Time:0.90
Average Return Time:0.34

The more threads try to content with the pool, the slower the pool is.

I kind of believe CP is just slow.

Daniel Wu
Sent with Sparrow (

On Monday, September 30, 2013 at 10:02 AM, Phil Steitz wrote:

> On 9/29/13 6:23 PM, Daniel Wu wrote:
> > Hi Phil,
> > 
> > Thanks for your reply
> > 
> > 1) CP Version: I tried both 1.5.5 and 1.6.0, same results. 
> > 2) My machine is a 2010-mid iMac, 3.2GHz i3 with 4 cores, 16G RAM, jdk 1.7u40
> > 3) I don't think StringBuilder is a problem, my profiler tool shows that GC is not
frequent, there is no memory pressure. But the tool shows that most of the time are consumed
at pool locking.
> > 
> Did you try to run it without the pool?
> Did you try timing just the pool operations?
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: (
> For additional commands, e-mail: (

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