Session (connection) pooling

Julien.Fontaine
edited January 19, 2017 in Documentum #1

Hello guys,

What's the pros and the cons in enable connection pooling ?

Best Answer

  • kcrkarthik
    edited May 16, 2012 #2 Answer ✓

    In my opinion, session pooling and connection pooling are different. Read through the sections Level1, Level2 pooling in the attached whitepaper...

Answers

  • DCTM_Guru
    edited May 15, 2012 #3

    Pro - improve performance.  App server doesnt have to start a new session and can reuse existing ones.

    Con - in order to do this, some objects get cache.  If you start to notice weird behavior, one of things I tell folks is to disable connection pooling and see if the behavior persist.

  • Julien.Fontaine
    edited May 15, 2012 #4

    Is session pooling and connection pooling the same ?

  • XdctmX
    edited May 15, 2012 #5

    It is same. From CS Fundamentals and Administration Guide

    Con guring connection pooling

    Connection pooling allows applications to reuse sessions. When a session is released or disconnected, the session is held in the pool to be used the next time the user or a different user requests a connection to the repository. DFC uses connection pooling by default. However, explicitly enabling connection pooling is recommended because the most efficient resource management is provided when pooling is explicitly enabled.

    What connection pooling is


    Connection pooling is an feature that allows an explicit repository session to be recycled and used by more than one user. Connection pooling is an automatic behavior implemented in DFC through session managers. It provides performance benefits for applications, especially those that execute frequent connections and disconnections for multiple users.

    How connection pooling works


    Whenever a session is released or disconnected, DFC puts the session into the connection pool. This pool is divided into two levels. The first level is a homogeneous pool. When a session is in the homogeneous pool, it can be re-used only by the same user. If, after a specified interval, the user has not reclaimed the session, the session is moved to the heterogeneous pool. From that pool, the session can be claimed by any user.

    When a session is claimed from the heterogeneous pool by a new user, DFC resets automatically any security and cache-related information as needed for the new user. DFC also resets the error message stack and rolls back any open transactions.

    To obtain the best performance and resource management from connection pooling, connection pooling must be enabled through the dfc.properties file. If connection pooling is not enabled through the dfc.properties file, DFC only uses the homogeneous pool. The session is held in that pool for a longer period of time, and does not use the heterogeneous pool. If the user does not reclaim the session from the homogeneous pool, the session is terminated.

    Simulating connection pooling in an application

    Simulating connection pooling at the application level is accomplished using an IDfSession.assume method. The method lets one user assume ownership of an existing primary repository session. When connection pooling is simulated using an assume method, the session is not placed into the connection pool. Instead, ownership of the repository session passes from one user to another by executing the assume method within the application. When an assume method is issued, the system authenticates the requested new user. If the user passes authentication, the system resets the security and cache information for the session as needed. It also resets the error message stack.

  • Julien.Fontaine
    edited May 15, 2012 #6

    Ok, but you also have an option on the web.xml of the webapps (webtop or taskspace) to enable session pooling !

  • DCTM_Guru
    edited May 15, 2012 #7

    I think its the same thing.  Sometimes marketing/tech writers decide to change names (eg docbase->repository, docbroker->connection broker) and it confuses folks who are not familiar with the feature.

    From the WDK Development Guide:

    "Session pooling

    The dfc.properties file on the WDK host can be configured as a client for server connection pooling

    (dfc.session.pool.enable, was connect_pooling_enabled setting in 5.x dmcl.ini). WDK applications

    take advantage of session pooling, increasing performance over non-pooled sessions."

  • kcrkarthik
    edited May 16, 2012 #8 Answer ✓

    In my opinion, session pooling and connection pooling are different. Read through the sections Level1, Level2 pooling in the attached whitepaper...

  • Julien.Fontaine
    edited May 16, 2012 #9

    Ok... Thanks Karthik !

  • Julien.Fontaine
    edited May 16, 2012 #10

    Effectively, it's bit more complicated than only connection pooling. Thanks you very much, it helps me a lot.

  • DCTM_Guru
    edited May 16, 2012 #11

    Thanks Karthik for posting the whitepaper.  Good reference to have.

  • Dan_M
    edited January 19, 2017 #12

    Hi all,

    Could anyone tell me if connection pooling is enabled by default or not for xCP app?

    In CS admin guide is specified that "To obtain the best performance and resource management from connection pooling, connection pooling must be enabled through the dfc.properties file." - I presume that setting should be at CS level.


    In the same CS admin guide is specified also "Connection pooling is an automatic behavior implemented in DFC

      through session managers"

    As xCP app use dfc, connection pooling is enabled or not?


    Thx all,

    Dan.