You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Mark Thomas <ma...@apache.org> on 2011/03/23 20:36:27 UTC
[POOL] Ready for 1.5.6
Phil,
I believe all the pool issues for 1.5.x have been resolved. Over to
you... :)
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [POOL] Ready for 1.5.6
Posted by Mark Thomas <ma...@apache.org>.
On 28/03/2011 10:03, Mark Thomas wrote:
> On 28/03/2011 03:44, Phil Steitz wrote:
>> borrowObject, returnObject and invalidatObject also call allocate
>> within synch blocks. Since clearOldest can be kicked off from
>> within any activation of allocate, it seems to me we either need to
>> find a different way to get clearOldest activated or move all of the
>> allocate activations outside of synch blocks.
>
> I was looking at moving the allocate() calls outside of the syncs.
>
>> I have not made or
>> tested all of these changes, but on first look it seems to me that
>> the only impact of doing this would be slight performance impact due
>> to some additional allocate activations.
>
> Working on this now. I'll keep on eye on the performance impact via
> Tomcat's jdbc-pool tests that compare DBCP and jdbc-pool.
All done. I don't see any noticeable performance difference.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [POOL] Ready for 1.5.6
Posted by Phil Steitz <ph...@gmail.com>.
On 3/28/11 7:06 AM, Phil Steitz wrote:
> On 3/28/11 2:03 AM, Mark Thomas wrote:
>> On 28/03/2011 03:44, Phil Steitz wrote:
>>> borrowObject, returnObject and invalidatObject also call allocate
>>> within synch blocks. Since clearOldest can be kicked off from
>>> within any activation of allocate, it seems to me we either need to
>>> find a different way to get clearOldest activated or move all of the
>>> allocate activations outside of synch blocks.
>> I was looking at moving the allocate() calls outside of the syncs.
>>
>>> I have not made or
>>> tested all of these changes, but on first look it seems to me that
>>> the only impact of doing this would be slight performance impact due
>>> to some additional allocate activations.
>> Working on this now. I'll keep on eye on the performance impact via
>> Tomcat's jdbc-pool tests that compare DBCP and jdbc-pool.
> Rerunning soak tests now.
Looking good so far. The POOL-180 test (high incidence of
validation failures on return) that took 793 mins before the
allocate moves just finished in 23 mins. Nice work, Mark!
Phil
> One note on the dbcp tests. In some of my tests, I saw significant
> improvements when I used DBCP PoolingDataSource directly instead of
> BasicDataSource. This is because of the synchronized call to
> createDataSource in BDS#getConnection (DBCP-300). If possible, you
> might try running the Tomcat tests with PoolingDataSource in place
> of BDS to get a better comparison of the underlying pool performance.
>
> Phil
>> Mark
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [POOL] Ready for 1.5.6
Posted by Phil Steitz <ph...@gmail.com>.
On 3/28/11 2:03 AM, Mark Thomas wrote:
> On 28/03/2011 03:44, Phil Steitz wrote:
>> borrowObject, returnObject and invalidatObject also call allocate
>> within synch blocks. Since clearOldest can be kicked off from
>> within any activation of allocate, it seems to me we either need to
>> find a different way to get clearOldest activated or move all of the
>> allocate activations outside of synch blocks.
> I was looking at moving the allocate() calls outside of the syncs.
>
>> I have not made or
>> tested all of these changes, but on first look it seems to me that
>> the only impact of doing this would be slight performance impact due
>> to some additional allocate activations.
> Working on this now. I'll keep on eye on the performance impact via
> Tomcat's jdbc-pool tests that compare DBCP and jdbc-pool.
Rerunning soak tests now.
One note on the dbcp tests. In some of my tests, I saw significant
improvements when I used DBCP PoolingDataSource directly instead of
BasicDataSource. This is because of the synchronized call to
createDataSource in BDS#getConnection (DBCP-300). If possible, you
might try running the Tomcat tests with PoolingDataSource in place
of BDS to get a better comparison of the underlying pool performance.
Phil
> Mark
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [POOL] Ready for 1.5.6
Posted by Mark Thomas <ma...@apache.org>.
On 28/03/2011 03:44, Phil Steitz wrote:
> borrowObject, returnObject and invalidatObject also call allocate
> within synch blocks. Since clearOldest can be kicked off from
> within any activation of allocate, it seems to me we either need to
> find a different way to get clearOldest activated or move all of the
> allocate activations outside of synch blocks.
I was looking at moving the allocate() calls outside of the syncs.
> I have not made or
> tested all of these changes, but on first look it seems to me that
> the only impact of doing this would be slight performance impact due
> to some additional allocate activations.
Working on this now. I'll keep on eye on the performance impact via
Tomcat's jdbc-pool tests that compare DBCP and jdbc-pool.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [POOL] Ready for 1.5.6
Posted by Phil Steitz <ph...@gmail.com>.
borrowObject, returnObject and invalidatObject also call allocate
within synch blocks. Since clearOldest can be kicked off from
within any activation of allocate, it seems to me we either need to
find a different way to get clearOldest activated or move all of the
allocate activations outside of synch blocks. I have not made or
tested all of these changes, but on first look it seems to me that
the only impact of doing this would be slight performance impact due
to some additional allocate activations.
Phil
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [POOL] Ready for 1.5.6
Posted by Phil Steitz <ph...@gmail.com>.
On 3/24/11 4:34 AM, Mark Thomas wrote:
> On 23/03/2011 20:01, Mark Thomas wrote:
>> On 23/03/2011 19:54, Phil Steitz wrote:
>>> On 3/23/11 12:36 PM, Mark Thomas wrote:
>>>> Phil,
>>>>
>>>> I believe all the pool issues for 1.5.x have been resolved. Over to
>>>> you... :)
>>>>
>>> Thanks! You are awesome, Mark!
>>>
>>> I will finish reviewing your last set of commits and then roll an RC.
>>>
>>> Did you see my (hopefully baseless) memory leak fear about the fix
>>> for POOL-181?
>> I just did. My mail was slow this afternoon. Looking at it now. I think
>> a few changes will be required.
> Changes complete and test cases updated. I think we are good to go now.
>
I saw the following in a thread dump during execution of one of my
soak tests (the one that led to POOL-180). While there is no
deadlock, it does violate our invariant that factory methods should
not be invoked within pool-synchronized scope and kills pool
performance when destroy has latency:
java] "pool-1-thread-115" prio=5 tid=102a3a800 nid=0x111857000
waiting on condition [111856000]
[java] java.lang.Thread.State: TIMED_WAITING (sleeping)
[java] at java.lang.Thread.sleep(Native Method)
[java] at
org.apache.commons.performance.pool.WaiterFactory.doWait(Unknown Source)
[java] at
org.apache.commons.performance.pool.WaiterFactory.destroyObject(Unknown
Source)
[java] at
org.apache.commons.performance.pool.WaiterFactory.destroyObject(Unknown
Source)
[java] at
org.apache.commons.pool.impl.GenericKeyedObjectPool.destroy(GenericKeyedObjectPool.java:1470)
[java] at
org.apache.commons.pool.impl.GenericKeyedObjectPool.clearOldest(GenericKeyedObjectPool.java:1424)
[java] at
org.apache.commons.pool.impl.GenericKeyedObjectPool.allocate(GenericKeyedObjectPool.java:1330)
[java] at
org.apache.commons.pool.impl.GenericKeyedObjectPool.addObjectToPool(GenericKeyedObjectPool.java:1642)
[java] - locked <7f44e1950> (a
org.apache.commons.pool.impl.GenericKeyedObjectPool)
[java] at
org.apache.commons.pool.impl.GenericKeyedObjectPool.returnObject(GenericKeyedObjectPool.java:1556)
[java] at
org.apache.commons.performance.pool.PoolClientThread.execute(Unknown
Source)
[java] at
org.apache.commons.performance.ClientThread.run(Unknown Source)
[java] at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
[java] at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
[java] at java.lang.Thread.run(Thread.java:680)
The problem is that addObjectToPool calls allocate within a synch
block and while allocate itself lets go of its lock before calling
destroy, the end result is factory destroy called while holding the
pool lock.
Phil
> Mark
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [POOL] Ready for 1.5.6
Posted by Phil Steitz <ph...@gmail.com>.
On 3/24/11 4:34 AM, Mark Thomas wrote:
> On 23/03/2011 20:01, Mark Thomas wrote:
>> On 23/03/2011 19:54, Phil Steitz wrote:
>>> On 3/23/11 12:36 PM, Mark Thomas wrote:
>>>> Phil,
>>>>
>>>> I believe all the pool issues for 1.5.x have been resolved. Over to
>>>> you... :)
>>>>
>>> Thanks! You are awesome, Mark!
>>>
>>> I will finish reviewing your last set of commits and then roll an RC.
>>>
>>> Did you see my (hopefully baseless) memory leak fear about the fix
>>> for POOL-181?
>> I just did. My mail was slow this afternoon. Looking at it now. I think
>> a few changes will be required.
> Changes complete and test cases updated. I think we are good to go now.
Thanks, Mark. Looks good now. I will rerun my soak tests and roll
an RC this weekend.
Phil
> Mark
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [POOL] Ready for 1.5.6
Posted by Jim Jagielski <ji...@jaguNET.com>.
On Mar 24, 2011, at 7:34 AM, Mark Thomas wrote:
> On 23/03/2011 20:01, Mark Thomas wrote:
>> On 23/03/2011 19:54, Phil Steitz wrote:
>>> On 3/23/11 12:36 PM, Mark Thomas wrote:
>>>> Phil,
>>>>
>>>> I believe all the pool issues for 1.5.x have been resolved. Over to
>>>> you... :)
>>>>
>>> Thanks! You are awesome, Mark!
>>>
>>> I will finish reviewing your last set of commits and then roll an RC.
>>>
>>> Did you see my (hopefully baseless) memory leak fear about the fix
>>> for POOL-181?
>>
>> I just did. My mail was slow this afternoon. Looking at it now. I think
>> a few changes will be required.
>
> Changes complete and test cases updated. I think we are good to go now.
>
fwiw: looks good based on my testing...
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [POOL] Ready for 1.5.6
Posted by Mark Thomas <ma...@apache.org>.
On 23/03/2011 20:01, Mark Thomas wrote:
> On 23/03/2011 19:54, Phil Steitz wrote:
>> On 3/23/11 12:36 PM, Mark Thomas wrote:
>>> Phil,
>>>
>>> I believe all the pool issues for 1.5.x have been resolved. Over to
>>> you... :)
>>>
>> Thanks! You are awesome, Mark!
>>
>> I will finish reviewing your last set of commits and then roll an RC.
>>
>> Did you see my (hopefully baseless) memory leak fear about the fix
>> for POOL-181?
>
> I just did. My mail was slow this afternoon. Looking at it now. I think
> a few changes will be required.
Changes complete and test cases updated. I think we are good to go now.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [POOL] Ready for 1.5.6
Posted by Mark Thomas <ma...@apache.org>.
On 23/03/2011 19:54, Phil Steitz wrote:
> On 3/23/11 12:36 PM, Mark Thomas wrote:
>> Phil,
>>
>> I believe all the pool issues for 1.5.x have been resolved. Over to
>> you... :)
>>
> Thanks! You are awesome, Mark!
>
> I will finish reviewing your last set of commits and then roll an RC.
>
> Did you see my (hopefully baseless) memory leak fear about the fix
> for POOL-181?
I just did. My mail was slow this afternoon. Looking at it now. I think
a few changes will be required.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [POOL] Ready for 1.5.6
Posted by Phil Steitz <ph...@gmail.com>.
On 3/23/11 12:36 PM, Mark Thomas wrote:
> Phil,
>
> I believe all the pool issues for 1.5.x have been resolved. Over to
> you... :)
>
Thanks! You are awesome, Mark!
I will finish reviewing your last set of commits and then roll an RC.
Did you see my (hopefully baseless) memory leak fear about the fix
for POOL-181?
Phil
> Mark
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org