commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Wu <daniel.y....@gmail.com>
Subject Re: commons pool benchmark issue
Date Mon, 30 Sep 2013 05:29:41 GMT
I removed the line obj.append("x"), so the worker threads simple borrow and return. 
Same result, StringBuilder and GC are negligible.

-- 
Daniel Wu
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)


On Monday, September 30, 2013 at 12:04 PM, Phil Steitz wrote:

> On 9/29/13 7:35 PM, Daniel Wu wrote:
> > 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.
> What happens when you replace the append with a no-op?
> 
> Phil
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org (mailto:user-unsubscribe@commons.apache.org)
> For additional commands, e-mail: user-help@commons.apache.org (mailto:user-help@commons.apache.org)
> 
> 



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