Planning Analytics

Planning Analytics

Get AI-infused integrated business planning

 View Only
  • 1.  Multi-threading Wait State Issue

    Posted Tue November 16, 2021 11:49 AM
    Hi,

    When we have a multi-thread process running and it enters a wait state, when the cause of the wait state completes, the rest of the threads complete serially instead of in parallel.   Does anyone know of a way to get them back to parallel, other than to let everything complete?

    Here is an example of what happened:
    A process was running.
    A modeler tried to create a new object, so this thread went into wait state for the process to finish.
    The multi-thread processes started and entered wait state.
    The original process finished.
    The object was created and that thread disappeared.
    Then one thread of the multi-threaded processes started to run, but the others stay in wait state.
    Each thread completed one at a time.

    Most of the time the multi-threaded process works fine in parallel.

    ------------------------------
    Scott Brown
    ------------------------------

    #PlanningAnalyticswithWatson


  • 2.  RE: Multi-threading Wait State Issue

    Posted Wed November 17, 2021 08:14 AM
    Hi Scott,

    Please see: https://www.ibm.com/support/pages/how-troubleshoot-tm1-server-lock-contention

    The lock exception debug logging should help you understand what object the lock is on.  It might help to know what object the modeler was creating?

    ------------------------------
    Stuart King
    IBM Planning Analytics Offering Manager
    ------------------------------



  • 3.  RE: Multi-threading Wait State Issue

    Posted Wed November 17, 2021 11:37 AM
    Hi Stuart,
    Thank you for the reply.  The issue is not about what caused the locks, but is there a way to get threads back to running in parallel after a lock condition occurred and has been resolved.  What we have been doing is cancelling all the threads and then re-running the chore once nothing is in wait status.

    ------------------------------
    Scott Brown
    ------------------------------



  • 4.  RE: Multi-threading Wait State Issue

    Posted Wed November 17, 2021 11:43 AM
    No, it's not possible.   You need to prevent the lock contention.

    ------------------------------
    Stuart King
    IBM Planning Analytics Offering Manager
    ------------------------------



  • 5.  RE: Multi-threading Wait State Issue

    Posted Thu November 18, 2021 02:09 AM
    What caused the lock is really important to understand how to get things running again. The lock issue persists and causes serial execution because of what holds the lock and how long it takes for it to release it. Stuart is correct in that there is no "unlock" method, and instead you need to proactively manage locking.

    Therefore I would start by finding what object is being locked and forcing the serialization, then I would identify the thread that has acquired the lock and where it originated. Finally I would revise my code to remove shared objects (like subsets) , reduce object updates (dimension changes or log update functions) , or refractor it so the offending thread ends quicker (using run process for example)

    ------------------------------
    Ryan Clapp
    ------------------------------