jackrabbit performance looks poor in cluster environment

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

jackrabbit performance looks poor in cluster environment

modelrepository
This post was updated on .
Hi, guys
    Our product is using jackrabbit as the backend content repository. Now, in our production environment, we will have many application servers running. Two servers are running Jackrabbit in cluster mode.  Meanwhile, there are more than 40 other servers that are running other components, that need access (query/update) those 2 JR nodes.

   To make sure each server can have the latest repository content, when getting each new JCR session, we call its refresh API to synchronize its content.  Although we think the update frequency is much smaller compared to the query frequency, the result is that the performance is very bad.
   From the thread dump, I can see that many threads are blocked by the refresh API call, by one writer thread.  
        at org.apache.jackrabbit.core.cluster.ClusterNode.sync(ClusterNode.java:297)
        at org.apache.jackrabbit.core.session.SessionRefreshOperation.perform(SessionRefreshOperation.java:58)
        at org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:200)
        at org.apache.jackrabbit.core.SessionImpl.perform(SessionImpl.java:355)
        at org.apache.jackrabbit.core.SessionImpl.refresh(SessionImpl.java:765)
        at org.apache.jackrabbit.jca.JCASessionHandle.refresh(JCASessionHandle.java:193)
        at .....modeling.repository.sapi.service.jcr.JcrFacadeSessionFactory.getTrunkSession(JcrFacadeSessionFactory.java:39)

The biggest issue to us is that one writer thread always blocks all other threads, on all nodes, no matter reading or writing.
Anyone meet similar issue and have any idea how to resolve this issue.

Regards,
-Liang