Session management. Horse races

Just raw results without explanation…

Horses: Session, SessionI, SessionII, SessionIII, SessionIV, SessionV, SessionVI, SessionVII, DarkHorse – implement different patterns to acquire DFC-session

DFC Settings:

  • default – means default settings
  • reuse_limit – dfc.session.reuse_limit = 2147483647
  • global_pool – dfc.session.global_pool_enabled=true
  • old pool – dfc.compatibility.useD7SessionPooling=false

Results: DFC benchmark


DNF (did not finish) means enabling global pool causes thread-safety issues like:

        at java.util.LinkedList.getFirst(
        at com.documentum.fc.client.impl.session.GlobalSessionPool.get(
        at com.documentum.fc.client.impl.session.PooledSessionFactory.newSession(
        at com.documentum.fc.client.impl.session.SessionManager.getSessionFromFactory(
        at com.documentum.fc.client.impl.session.SessionManager.newSession(
        at com.documentum.fc.client.impl.session.SessionManager.getSession(
        at tel.panfilov.documentum.benchmark.impl.Session.doOp(
        at tel.panfilov.documentum.benchmark.impl.SessionI.doOp(

        at java.util.LinkedList$ListItr.checkForComodification(
        at java.util.LinkedList$ListItr.remove(
        at com.documentum.fc.client.impl.session.GlobalSessionPool.flush(
        at com.documentum.fc.client.impl.session.PooledSessionFactory.flush(
        at com.documentum.fc.client.impl.session.SessionManager.flushSessions(
        at com.documentum.fc.client.impl.session.SessionManager.flushSessions(
        at tel.panfilov.documentum.benchmark.impl.SessionIII.doOp(

Exception in thread "Global Session pool worker" java.util.ConcurrentModificationException
        at java.util.LinkedList$ListItr.checkForComodification(
        at java.util.LinkedList$
        at com.documentum.fc.client.impl.session.GlobalSessionPool.flushExpiredSessions(
        at com.documentum.fc.client.impl.session.GlobalSessionPool$

2 thoughts on “Session management. Horse races

  1. Hi Andrey,

    I just test your benchmark script using a 7.1DFC P02 (because it’s the one I have installed the machine where I’m working today).

    And I didn’t have any problem using global_pool and multi-threading I try 10 and 50 successfully, If you want I can send you my results.


  2. Pierre,
    nice catch! Unfortunately it’s hard to reproduce thread-safety issues because to deal with such mistakes we need to design another tests, and your statement does not prove anything – my tests were not designed to demonstrate thread-safety issues, but, fortunately, I caught some of them.

    GlobalSessionPool implementation:

    class GlobalSessionPool {
      private final m_mutex = new Object();
      private static Map<String, LinkedList<PoolEntry>> m_sessions = new HashMap();
      public ISession get(IDocbaseSpec docbasespec, IDfLoginInfo logininfo) {
        synchronized(m_mutex) {
           some m_sessions related logic
      public void put(ISession session) {
        synchronized(m_mutex) {
           some m_sessions related logic
      // 6.7SP2 implementation, not implemented in 7.1
      public int flush(IDocbaseSpec docbaseSpec) {
        synchronized(this) {
           some m_sessions related logic
      static void flushExpiredSessions() {
        synchronized(SessionPool.class) {
           some m_sessions related logic

    GlobalSessionPool.put() and GlobalSessionPool.get() are synchronized on the same monitor object, but GlobalSessionPool.flush() and GlobalSessionPool.flushExpiredSessions() use another monitors – this is obviously a bug. In my scenario calling IDfSessionManager.flushSessions() adds more concurrency in 6.7SP2 rather than in 7.1 due to missing implementation of GlobalSessionPool.flush() method in 7.1.

    But yeah, it’s worth to add 7.1 column in my results, I think I will update post soon.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s