You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by ChadDavis <ch...@gmail.com> on 2011/07/08 01:58:40 UTC

Performance Work on Davex Remoting

I'm doing some work to try to improve my performance with a davex
remoting set up.  Here are the steps I've taken.

1) I have created a patch that allows the total number of HTTP
connections to the server to be configured ( it was previously using
the HTTPClient default of 2 per host )

2) This gave me great performance improvements, but caused my web
application to begin to consume 100% cpu

3) The cause of the cpu usage appears to be high concurrency on access
to a HashMap in the RepositoryServiceImpl.  Declaration below:

      private final Map<SessionInfo, HttpClient> clients = new
HashMap<SessionInfo, HttpClient>();


Question:

 As far as I can tell, the "clients" map is meant to keep HTTPClient
objects so that the same JCR session ( they are keyed on by session )
can reuse the same HttpClient objects.  From what I'm observing, there
is some accrual of entries in this map.  Should there be?  As far as I
can see, when a session is closed, the entry should be removed.  Are
there any HTTPClient objects that are persistent across JCR sessions?
I do notice that one is created by my getRepository call, and is keyed
under the null value, but I actually see more than just that one
accruing.