-
1. Re: Performance improvement to default mcp.
jesper.pedersen May 13, 2014 8:21 AM (in response to whitingjr)a) Moved the condition check on the 'kill' variable outside the synchronized block.
Modifications of 'cls' needs to be under a lock - or maybe you are looking at old code ?
b) Moved the call to ConnectionListener.used() outside the synchronized block.
That needs further investigation, as it has side effects for the ManagedConnectionPool contract.
c) Removed the assignment of a ConnectionListener local variable.
Possible, yes.
Which code branch should I apply the changes and then share for you to review them ?
Pull requests are against either the 1.2 branch or master.
-
2. Re: Performance improvement to default mcp.
whitingjr May 13, 2014 9:05 AM (in response to jesper.pedersen)Modifications of 'cls' needs to be under a lock - or maybe you are looking at old code ?
The change retains the modification of cls under a lock.
I'll create a branch off 1.2 and push to my fork.
-
3. Re: Performance improvement to default mcp.
whitingjr May 13, 2014 10:51 AM (in response to jesper.pedersen)I created a branch called "sem-armcp-reduced-work-during-lock" from 1.2 tip.
whitingjr/ironjacamar at sem-armcp-reduced-work-during-lock · GitHub
-
4. Re: Performance improvement to default mcp.
whitingjr May 14, 2014 8:21 AM (in response to jesper.pedersen)Modifications of 'cls' needs to be under a lock - or maybe you are looking at old code ?
So modifying the cls is still under a lock for both branches of the if statement
and
How does that look to you ?
b) Moved the call to ConnectionListener.used() outside the synchronized block.
That needs further investigation, as it has side effects for the ManagedConnectionPool contract.
Which part of the contract does it affect ?
Possible, yes.
That should achieve the same outcome unless I am mistaken. Or have I missed something.
Pull requests are against either the 1.2 branch or master.
Ok I branched off 1.2 to keep the change as close to 1.x as possible.
-
5. Re: Re: Performance improvement to default mcp.
jesper.pedersen Jun 16, 2014 2:05 PM (in response to whitingjr)I have investigated this issue. The cl.used() call can happen outside any possible lock controlling the free connections data structure. It is up to the actual implementation of the ManagedConnectionPool interface to account for this.
For SemaphoreArrayListManagedConnectionPool this gives an improvement when there is no load on the XAResource instance, so I have merged the change plus a developer guide update into the 1.2 branch.
NoLoad: DO_RAMPUP=true
Load: DO_RAMPUP=false, TX_BEGIN_DURATION=2L, TX_COMMIT_DURATION=10L
The rest of the performance test suite parameters left at default.
-
new-load.dat.zip 248 bytes
-
new-load.png 14.7 KB
-
new-noload.dat.zip 435 bytes
-
new-noload.png 18.0 KB
-
orig-load.dat.zip 254 bytes
-
orig-load.png 15.1 KB
-
orig-noload.dat.zip 438 bytes
-
orig-noload.png 17.6 KB
-